??? 03/02/05 05:46 Modified: 03/02/05 06:06 Read: times Msg Score: -1 -1 Message Not Useful |
#88841 - Jump to a specific point Responding to: ???'s previous message |
Rahul Sadagopan said:
can i use ljmp to jump from an interrupt service routine to the main program...
Dear Rahul Jump to a specific point from interrupt(main program here) Means that change return address from interrupt so you have only one ways, that is changing return addreess in ISR. See the below code: ORG 00H LJMP MAIN ISR: ... ... ... RETURN: MOV SP,#9 ;maybe stack is anything first you load 9 on it POP 7 ;with 2 pop you provide changing return addr POP 7 MOV R7,#01H ;change upper address in pc PUSH 7 MOV R7,#00H ;change lower address in pc PUSH 7 RETI ORG 100H ;or xxxxH < 1F00H MAIN: ... ... ... ... Regards Mehdi |