This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
Type: Subroutine Category: Dashboard
This variation is blank in the Cassette, Disc (flight), Disc (docked) and Electron versions.
Tap on a version to expand it, and tap it again to show to all variations.
The advanced versions have wider "E" and "S" dashboard indicators than the original versions.
This variation is blank in the Cassette, Disc (flight), Disc (docked) and Electron versions.
6502SP, Master
LDA #16*8 \ The space station bulb is in character block number 48 STA SC \ (counting from the left edge of the screen), with the \ first half of the row in one page, and the second half \ in another. We want to set the screen address to point \ to the second part of the row, as the bulb is in that \ half, so that's character block number 16 within that \ second half (as the first half takes up 32 character \ blocks, so given that each character block takes up 8 \ bytes, this sets the low byte of the screen address \ of the character block we want to draw to LDA #&7B \ Set the high byte of SC(1 0) to &7B, as the bulbs are STA SC+1 \ both in the character row from &7A00 to &7BFF, and the \ space station bulb is in the right half, which is from \ &7B00 to &7BFF LDY #15 \ Now to poke the bulb bitmap into screen memory, and \ there are two character blocks' worth, each with eight \ lines of one byte, so set a counter in Y for 16 bytes .BULL LDA SPBT,Y \ Fetch the Y-th byte of the bulb bitmap EOR (SC),Y \ EOR the byte with the current contents of screen \ memory, so drawing the bulb when it is already \ on-screen will erase it STA (SC),Y \ Store the Y-th byte of the bulb bitmap in screen \ memory DEY \ Decrement the loop counter BPL BULL \ Loop back to poke the next byte until we have done \ all 16 bytes across two character blocks