Skip to navigation

Utility routines: ZES2

[BBC Micro disc version, Flight]

Name: ZES2 [Show more] Type: Subroutine Category: Utility routines Summary: Zero-fill a specific page
Context: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: No direct references to this subroutine in this source file

Zero-fill from address (X SC) to (X SC) + Y.
Arguments: Y The offset from (X SC) where we start zeroing, counting down to 0 SC 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
.ZES2 .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 DEY \ Decrement the loop counter BNE ZEL1 \ Loop back to zero the next byte RTS \ Return from the subroutine