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: Drawing the screen
Clear the top part of the screen (the space view) and draw a white border along the top and sides.
Other entry points: BOX Just draw the border and (if this is a space view) the view name. This can be used to remove the border and view name, as it is drawn using EOR logic
This variation is blank in the Cassette, Disc (flight), Disc (docked), 6502 Second Processor and Master versions.
BORDER Just draw the border
This variation is blank in the Cassette, Disc (flight), 6502 Second Processor, Master and Electron versions.
Other entry points: BOL1-1 Contains an RTS
The default case for enhanced text tokens is Sentence Case.
See below for more variations related to this code.
This variation is blank in the Cassette, Disc (flight) and Electron versions.
JSR MT2 \ Switch to Sentence Case when printing extended tokens
This variation is blank in the Cassette, Disc (flight), Disc (docked) and Electron versions.
Tap on a block to expand it, and tap it again to revert.
LDA #%10000000 \ Set bit 7 of QQ17 to switch to Sentence Case STA QQ17
Code variation 9 of 25
See variation 7 above for details.
This variation is blank in the Cassette, Disc (flight) and Electron versions.
STA DTW2 \ Set bit 7 of DTW2 to indicate we are not currently \ printing a word
This variation is blank in the Cassette, Disc (docked) and Electron versions.
JSR FLFLLS \ Call FLFLLS to reset the LSO block
This variation is blank in the Cassette, Disc (flight), Disc (docked), Master and Electron versions.
LDA #YELLOW \ Send a #SETCOL YELLOW command to the I/O processor to JSR DOCOL \ switch to colour 2, which is yellow
This variation is blank in the Master version.
Tap on a block to expand it, and tap it again to revert.
This variation is blank in the Disc (docked) version.
Tap on a block to expand it, and tap it again to revert.
This variation is blank in the Master version.
Tap on a block to expand it, and tap it again to revert.
LDA QQ11 \ If this is not a space view, jump to tt66 to skip BNE tt66 \ displaying the view name
This variation is blank in the Cassette, Disc (flight), Disc (docked) and Electron versions.
Tap on a block to expand it, and tap it again to revert.
LDA VIEW \ Load the current view into A: \ \ 0 = front \ 1 = rear \ 2 = left \ 3 = right ORA #&60 \ OR with &60 so we get a value of &60 to &63 (96 to 99) JSR TT27 \ Print recursive token 96 to 99, which will be in the \ range "FRONT" to "RIGHT" JSR TT162 \ Print a space LDA #175 \ Print recursive token 15 ("VIEW ") JSR TT27 .tt66
This variation is blank in the Cassette, Disc (flight), Disc (docked), Master and Electron versions.
This variation is blank in the Cassette, Disc (flight), Disc (docked), Master and Electron versions.
LDA #YELLOW \ Send a #SETCOL YELLOW command to the I/O processor to JSR DOCOL \ switch to colour 2, which is yellow
DEX \ Set X2 = 255 STX X2
This variation is blank in the Master version.
Tap on a block to expand it, and tap it again to revert.
LDA #2 \ Set X1 = X2 = 2 STA X1 STA X2 JSR BOS2 \ Call BOS2 below, which will call BOS1 twice, and then \ fall through into BOS2 again, so we effectively do \ BOS1 four times, decrementing X1 and X2 each time \ before calling LOIN, so this whole loop-within-a-loop \ mind-bender ends up drawing these four lines: \ \ (1, 0) to (1, 191) \ (0, 0) to (0, 191) \ (255, 0) to (255, 191) \ (254, 0) to (254, 191) \ \ So that's a 2-pixel wide vertical border along the \ left edge of the upper part of the screen, and a \ 2-pixel wide vertical border along the right edge .BOS2 JSR BOS1 \ Call BOS1 below and then fall through into it, which \ ends up running BOS1 twice. This is all part of the \ loop-the-loop border-drawing mind-bender explained \ above .BOS1 LDA #0 \ Set Y1 = 0 STA Y1 LDA #2*Y-1 \ Set Y2 = 2 * #Y - 1. The constant #Y is 96, the STA Y2 \ y-coordinate of the mid-point of the space view, so \ this sets Y2 to 191, the y-coordinate of the bottom \ pixel row of the space view DEC X1 \ Decrement X1 and X2 DEC X2