Posted By
siz on 2024-12-11 08:17:31
| Re: Resetting the machine from code
On the 6502 family of processors the vectors are at the end of the memory (unlike Z80 where it's at 0000). $fffe is the vector for the interrupt handler, $fffc for reset and $fffa for NMI (which is not present in the 7501/8501). So you have to use an indirect jump to $fffc: jmp ($fffc) if you haven't overwritten the top of the memory you don't even have to page in KERNAL as the default value of the reset vector is $fff6 which contains the following code: sta $ff3f jmp $f2a4
The reset routine copies this code and the reset vector value to RAM so it will work with RAM paged in.
|