.ZERO 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 bytes LDA #0 \ Set A = 0 so we can zero the variables .ZEL2 STA FRIN,X \ Zero the X-th byte of FRIN to de DEX \ Decrement the loop counter BPL ZEL2 \ Loop back to zero the next variable until we have done \ them all RTS \ Return from the subroutineName: ZERO [Show more] Type: Subroutine Category: Utility routines Summary: Reset the local bubble of universe and ship statusContext: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * RES2 calls ZERO * RESET calls ZERO

This resets the following workspaces to zero: * 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

[X]

Label ZEL2 is local to this routine