This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
Name: ZES2 Type: Subroutine Category: Utility routines Summary: Zero-fill a specific page
Arguments:
X The high byte (i.e. the page) of the starting point of the zero-fill
.ZES2SC The low byte (i.e. the offset into the page) of the starting point of the zero-fill
Returns: Z flag Z flag is set
The disc version's flight code has a different ZES2 routine - it still zero-fills a part of a page, but it fills the opposite part of the page to the other versions.
See below for more variations related to this code.
This variation is blank in the Disc (flight) version.
Tap on a block to expand it, and tap it again to revert.
.ZEL1 STA (SC),Y \ Zero the Y-th byte of the block pointed to by SC, \ so that's effectively the Y-th byte before SC
Code variation 5 of 5
See variation 4 above for details.
Tap on a block to expand it, and tap it again to revert.
BNE ZEL1 \ Loop back to zero the next byte RTS \ Return from the subroutine