Login
Forum Help



Post Your Message
="hidden" name="cat" value="Programming">
Username: (Login)

Topic:
Message:
 


Previous Messages
Posted By

Fuzzweed
on 2024-12-11
09:02:35
 Re: Resetting the machine from code

Graçias. Understood.

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.

Posted By

Fuzzweed
on 2024-12-11
07:45:19
 Resetting the machine from code

If I want to reset the +4 from an assembly program is it as simple as banking the ROM back in and settng the P/C to 0000 and it will then boot up it's BASIC screen normally? Or would I have to change a load of registers back to their initial condition too?


Copyright © Plus/4 World Team, 2001-2024. Support Plus/4 World on Patreon