Skip to navigation


Drawing planets: PL2

[BBC Micro cassette version]

Name: PL2 [Show more] Type: Subroutine Category: Drawing planets Summary: Remove the planet or sun from the screen
Context: 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 PL2 * PROJ calls via PL2-1

Other entry points: PL2-1 Contains an RTS
.PL2 LDA TYPE \ Shift bit 0 of the planet/sun's type into the C flag LSR A BCS P%+5 \ If the planet/sun's type has bit 0 clear, then it's \ either 128 or 130, which is a planet; meanwhile, the \ sun has type 129, which has bit 0 set. So if this is \ the sun, skip the following instruction JMP WPLS2 \ This is the planet, so jump to WPLS2 to remove it from \ screen, returning from the subroutine using a tail \ call JMP WPLS \ This is the sun, so jump to WPLS to remove it from \ screen, returning from the subroutine using a tail \ call