Skip to navigation

BBC Micro Elite

Utility routines: ZES1 (Disc version)

Name: ZES1 [View in context] Type: Subroutine Category: Utility routines Summary: Zero-fill the page whose number is in X
Arguments: X The page we want to zero-fill
.ZES1 STX SC+1 \ We want to zero-fill page X, so store this in the \ high byte of SC, so SC(1 0) is now pointing to page X LDA #0 \ If we set Y = SC = 0 and fall through into ZES2 STA SC \ below, then we will zero-fill 255 bytes starting from TAY \ SC, then SC + 255, and then the rest of the page - in \ other words, we will zero-fill the whole of page X