| ??? 02/21/03 06:12 Read: times |
#39613 - Re: How to force program restart without |
Hello, all
I have got a question, see following code first. ; interrupt vectors: ORG 00h AJMP Reset ; RESET start ORG 03h LJMP Intr0 ; external INT_0 (comms test) ORG 0Bh LJMP Timr0 ; TIMER_0 (timeout) ORG 13h LJMP Intr1 ; external INT_1 (RTC wakeup) ORG 1Bh RETI ; TIMER_1 (not used) ORG 23h RETI ; UART (not used) ORG 30h ; start of program ;------------- MAIN PROGRAM ------------- ; ; restart on comms int (INT_0) in manual mode SDIReset: MOV SP,#Stack ; force stack pointer AJMP Res_T ; goto reset testing ; start on power up - after RESET (delay = 3ms) Reset: MOV SP,#Stack ; stack pointer MOV PCON,#00h ; UART mode /2 SMOD=0 MOV SCON,#50h ; serial port mode 1, REN=1 MOV TMOD,#21h ; timer_1 in mode 2 (8-bit auto reload internal control timer) ( ignored ) Intr0: MOV DPTR,#SDIReset ; INT_0 int - comms detection in manual mode PUSH DPL ; restart the system PUSH DPH CLR EX0 ; dissable INT_0 RETI My question is when the program starts from "SDIReset" which is at the address 30h ? So far, my knowledge is that program simply jumps to the place labeled with "Reset:" only due to the hardware reset or power on,. I can not figure out in what case program jumps to "SDIReset". I realize that "SDIReset" only appears in two places, one is as label at address 30h, another is in Intr0 (interrupt 0) service routine (see above code), where address of SDIReset (30h) is passed to DPTR, then,How to force the program to jump to place labeled "SDIReset" ? What I can not figure out is how Intr0 be able to force program start from SDIReset ? thanks! Daniel |
| Topic | Author | Date |
| Re: How to force program restart without | 01/01/70 00:00 | |
| Re: How to force program restart without | 01/01/70 00:00 | |
| Re: How to force program restart without | 01/01/70 00:00 | |
Re: How to force program restart without | 01/01/70 00:00 |



