Skip to navigation

Elite on the BBC Micro

Version analysis of ZES1

This code appears in the following versions (click to see it in the source code):

Code variations between these versions are shown below.

Name: ZES1 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

Code variation 1 of 1Specific to an individual platform

Changes required because the flight version of ZES2 is different, but the function of this routine doesn't change.

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

Cassette, Docked, 6502SP, Master

Flight

Electron

LDY #0 \ If we set Y = SC = 0 and fall through into ZES2 STY SC \ below, then we will zero-fill 255 bytes starting from \ SC - in other words, we will zero-fill the whole of \ page X
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
LDY #0 \ If we set Y = SC = 0 and fall through into ZES2 STY SC \ below, then we will zero-fill 255 bytes starting from \ SC - in other words, we will zero-fill the whole of \ page X 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
RSS Feed