Code variation 1 of 3A variation in the comments only

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, Docked, Electron

6502SP, Master

Summary:Zero-fill pages &9, &A, &B, &C and &D

Summary:Reset the local bubble of universe and ship status

This resets the following workspaces to zero:

Code variation 2 of 3A variation in the comments only

Tap on a version to expand it, and tap it again to show to all variations.

Cassette, Flight, Docked

6502SP, Master

Electron

* The ship data blocks ascending from K% at &0900
* The ship line heap descending from WP at &0D40
* WP workspace variables from FRIN to de, which include the ship slots for
the local bubble of universe, and various flight and ship status variables
(only a portion of the LSX/LSO sun line heap is cleared)

* UP workspace variables from FRIN to de, which include the ship slots for
the local bubble of universe, and various flight and ship status variables

* The ship data blocks ascending from K% at &0900
* The ship line heap descending from WP at &0BE0
* WP workspace variables from FRIN to de, which include the ship slots for
the local bubble of universe, and various flight and ship status variables
(only a portion of the LSO space station line heap is cleared)

.ZERO

Code variation 3 of 3Specific to an individual platform

Tap on a version to expand it, and tap it again to show to all variations.

Cassette

Flight, Docked, 6502SP, Master

Electron

LDX#&D\ Point X to page &D.ZELJSRZES1\ Call ZES1 to zero-fill the page in XDEX\ Decrement X to point to the next pageCPX#9\ If X is > 9 (i.e. is &A, &B or &C), then loop backBNEZEL\ up to clear the next page\ Then fall through into ZES1 with X set to 9, so we\ clear page &9 too

LDX#(de-FRIN)\ We're going to zero the UP workspace variables from\ FRIN to de, so set a counter in X for the correct\ number of bytesLDA#0\ Set A = 0 so we can zero the variables.ZEL2STAFRIN,X\ Zero the X-th byte of FRIN to deDEX\ Decrement the loop counterBPLZEL2\ Loop back to zero the next variable until we have done\ them allRTS\ Return from the subroutine

LDX#&B\ Point X to page &BJSRZES1\ Call ZES1 to zero-fill the page in XDEX\ Decrement X to point to the next page (&A)JSRZES1\ Call ZES1 to zero-fill the page in XDEX\ Decrement X to point to the next page\ Then fall through into ZES1 with X set to 9, so we\ clear page &9 too