This code appears in the following versions (click to see it in the source code):
Code variations between these versions are shown below.
Name: LL9 (Part 12 of 12) Type: Subroutine Category: Drawing ships Summary: Draw ship: Draw all the visible edges from the ship line heap Deep dive: Drawing ships
This variation is blank in the Cassette, Disc (flight), Disc (docked), Master and Electron versions.
If NEEDKEY is non-zero, then this routine also scans the keyboard for a key press and returns the internal key number in X (or 0 for no key press).
This variation is blank in the Cassette, Disc (flight), Disc (docked), 6502 Second Processor and Electron versions.
Other entry points: LSCLR Draw any remaining lines from the old ship that are still in the ship line heap LSC3 Contains an RTS
This variation is blank in the Cassette, Disc (flight), Disc (docked), Master and Electron versions.
LDA NEEDKEY \ If NEEDKEY is zero, jump to notneed to skip the next BEQ notneed \ two instructions, so we only read the keyboard if \ NEEDKEY is non-zero STZ NEEDKEY \ Set NEEDKEY = 0 JSR RDKEY \ Scan the keyboard for a key press and return the \ internal key number in A and X (or 0 for no key press) .notneed
This variation is blank in the Master version.
Tap on a block to expand it, and tap it again to revert.
The cassette, disc and 6502SP versions do all their line drawing at the very end of the LL9 ship-drawing routine, but the Master has already redrawn most of the ship by this point and only needs to erase any remaining lines.
See below for more variations related to this code.
Tap on a block to expand it, and tap it again to revert.
Code variation 8 of 10
See variation 7 above for details.
Tap on a block to expand it, and tap it again to revert.
Code variation 9 of 10
See variation 7 above for details.
Tap on a block to expand it, and tap it again to revert.
This variation is blank in the Disc (flight), Disc (docked), Master and Electron versions.
Tap on a block to expand it, and tap it again to revert.
RTS \ Return from the subroutine