Is there a SYS to perform a run/stop-restore?

Basic and Machine Language

Moderator: Moderators

Post Reply
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Is there a SYS to perform a run/stop-restore?

Post by Boray »

Is there a SYS to perform a run/stop-restore? There doesn't seem to be a RESTORE button on the vic20-emulator on Amiga, so I would need a SYS to do the same thing as the button combination. (By first pressing break and then typing in the SYS manually)... Anyone?

/Anders
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

In theory, I believe the BRK instruction (op-code 00) will cause a NMI interrupt just like pressing the RESTORE key will do. SYS 65234 should cause a Basic Warm Start, which occurs when a BRK is reached.

See also the document http://www.ftp.funet.fi/pub/cbm/documen ... c20rom.doc and similar ones (C64 may do too) for other hints.

SYS 58471 supposedly warm-starts Basic without clearing the screen like the other one above, but you really want it to appear like you hit RUN/STOP + RESTORE?
Anders Carlsson

Image Image Image Image Image
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

More in detail, SYS 65234 will restore Kernal vectors (IRQ etc at $0314), then initialise (prepare?) I/O and initialize (restore?) I/O and finally call the Basic routine at 58471 to restart Basic.
Anders Carlsson

Image Image Image Image Image
Boray
Musical Smurf
Posts: 4064
Joined: Mon May 03, 2004 10:47 am

Post by Boray »

sys65234 works great! Thanks!!! And it's an easy number to remember too! Thanks!

/Anders
Post Reply