I have a 16-bit address in the A register. I need to make a long jump to this address, however it seems there is no way to do this with assembly code. By looking at some assembly produced by Keil, when they want to do this type of jump then end up doing:
LJMP ?C?ICALL
Good point. I'll have to modify my code to account for the registers used in the functions. Thanks.
That's why in the assembly code I posted earlier left the MCU with nothing modified at the time of the "jump". If you had a single variable of "bit" type that holds the boot/mission status you could do a bit test (which doesn't disturb the MCU state) and "jump" accordingly to boot or mission ISR's. With no MCU state disturbed using this technique, you can write the ISR's without worrying about what's been modified at entry. More ideas, which by now you've got plenty of. --Dan Henry
I hope your returning with RETI not RET in those functions your calling from your ISR. If you don't RETI you'll never get another interrupt until you reset (or stumble across a RETI). - Mark
I hope your returning with RETI not RET in those functions your calling from your ISR. If you don't RETI you'll never get another interrupt until you reset (or stumble across a RETI). I am. Thanks.