Email: Password: Remember Me | Create Account (Free)

Back to Subject List

Old thread has been locked -- no new posts accepted in this thread
???
06/20/01 14:34
Read: times


 
#12649 - RE: Return vector for interrupts
Yes you can. As you may know the return address is stored on the stack. The stack itself is part of the internal RAM. The stack pointer points just behind the last byte pushed. So if you copy the stack pointer to R0 (or R1), then decrement it and do a MOV A,@R0, you get the last byte that was pushed to the stack. Decrementing R0 once more and doing a MOV A,@R0 again gives you the second to last byte that was pushed.
I don't remember if addressH or addressL is pushed first, but you should be able to find that out yourself.

Happy programming.

List of 14 messages in thread
TopicAuthorDate
Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      
RE: Return vector for interrupts            01/01/70 00:00      

Back to Subject List