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 11 of 12) Type: Subroutine Category: Drawing ships
This part adds all the visible edges to the ship line heap, so we can draw them in part 12.
Other entry points: LL81+2 Draw the contents of the ship line heap, used to draw the ship as a dot from SHPPT
The cassette, disc and 6502SP versions add all the lines in a ship to the heap and then draw them all in one go, whereas the Master version erases and draws lines as they are added to the ship line heap.
See below for more variations related to this code.
This variation is blank in the Master version.
.LL80 LDY U \ Fetch the ship line heap pointer, which points to the \ next free byte on the heap, into Y LDA XX15 \ Add X1 to the end of the heap STA (XX19),Y INY \ Increment the heap pointer LDA XX15+1 \ Add Y1 to the end of the heap STA (XX19),Y INY \ Increment the heap pointer LDA XX15+2 \ Add X2 to the end of the heap STA (XX19),Y INY \ Increment the heap pointer LDA XX15+3 \ Add Y2 to the end of the heap STA (XX19),Y INY \ Increment the heap pointer STY U \ Store the updated ship line heap pointer in U CPY T1 \ If Y >= T1 then we have reached the maximum number of BCS LL81 \ edge lines that we can store in the ship line heap, so \ skip to LL81 so we don't loop back for the next edge
.LL78
Code variation 4 of 8
See variation 3 above for details.
Tap on a block to expand it, and tap it again to revert.
Code variation 6 of 8
See variation 3 above for details.
Tap on a block to expand it, and tap it again to revert.
.LL81
Code variation 7 of 8
See variation 3 above for details.
Tap on a block to expand it, and tap it again to revert.