.PL9 JSR LS2FL \ Call LS2FL to send the ball line heap to the I/O \ processor for drawing on-screen, which will erase the \ planet from the screen STZ LSP \ Reset the ball line heap by setting the ball line heap \ pointer to 0 JSR CIRCLE \ Call CIRCLE to draw the planet's new circle BCS PL20 \ If the call to CIRCLE returned with the C flag set, \ then the circle does not fit on-screen, so jump to \ PL20 to return from the subroutine LDA K+1 \ If K+1 is zero, jump to PL25 as K(1 0) < 256, so the BEQ PL25 \ planet fits on the screen and we can draw meridians or \ craters .PL20 JMP LS2FL \ The planet doesn't fit on-screen, so jump to LS2FL to \ send the ball line heap to the I/O processor for \ drawing on-screen, returning from the subroutine using \ a tail call .PL25 LDA TYPE \ If the planet type is 128 then it has an equator and CMP #128 \ a meridian, so this jumps to PL26 if this is not a BNE PL26 \ planet with an equator - in other words, if it is a \ planet with a crater \ Otherwise this is a planet with an equator and \ meridian, so fall through into the following to draw \ themName: PL9 (Part 1 of 3) [Show more] Type: Subroutine Category: Drawing planets Summary: Draw the planet, with either an equator and meridian, or a craterContext: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * PLANET calls PL9
Draw the planet with radius K at pixel coordinate (K3, K4), and with either an equator and meridian, or a crater.
Arguments: K(1 0) The planet's radius K3(1 0) Pixel x-coordinate of the centre of the planet K4(1 0) Pixel y-coordinate of the centre of the planet INWK The planet's ship data block
[X]
Subroutine CIRCLE (category: Drawing circles)
Draw a circle for the planet
[X]
Subroutine LS2FL (category: Drawing circles)
Draw the contents of the ball line heap by sending an OSWRCH 129 command to the I/O processor
[X]
The ball line heap pointer, which contains the number of the first free byte after the end of the LSX2 and LSY2 heaps (see the deep dive on The ball line heap for details)
[X]
Label PL20 is local to this routine
[X]
Label PL25 is local to this routine
[X]
Label PL26 in subroutine PL9 (Part 3 of 3)