This page (revision-4) was last changed on 03-Feb-2023 15:21 by Florian Dingler 

This page was created on 17-Jul-2010 18:30 by Florian Dingler

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
4 03-Feb-2023 15:21 1 KB Florian Dingler to previous
3 01-Apr-2019 21:09 1 KB Florian Dingler to previous | to last
2 17-Jul-2010 18:30 700 bytes Florian Dingler to previous | to last
1 17-Jul-2010 18:30 669 bytes Florian Dingler to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 5 changed one line
* All 6502 registers have to be saved before and restored after the interrupt (before the RTI instruction).
* All 6502 registers have to be saved before and restored after the interrupt (before the RTI instruction).
* an example to save registers and variables in the language "Action!" [Interrupts in ACTION]
At line 8 changed one line
!!!Example
!!Example for saving and restoring the processor registers
{{{
;we need to push to stack, first A, then X, then Y
PHA ;push ACCU to Stack
TXA ;transfer X to ACCU
PHA ;push ACCU (now X) to Stack
TYA ;transfer Y to ACCU
PHA ;push ACCU (now Y) to Stack
;
;... routine goes in here ...
;
;now we need to pull from stack first Y, then X, then Y
PLA ;pull Y from STACK to ACCU
TAY ;transfer ACCU to Y
PLA ;pull X from STACK to ACCU
TAX ;transfer ACCU to X
PLA ;pull ACCU from STACK
RTI ;end interrupt routine with ReTurn from Interrupt
}}}
!!Example for setting your interrupt routine
At line 32 added one line
* clear bit 7 of [NMIEN] to disable the interrupt