Skip to navigation

BBC Micro Elite

Drawing planets: PL2

Name: PL2 [View in context] Type: Subroutine Category: Drawing planets Summary: Remove the planet or sun from the screen
Other entry points: PL2-1 Contains an RTS
.PL2 { LDA TYPE \ If the planet/sun's type has bit 0 clear, then it's LSR A \ either 128 or 130, which is a planet; meanwhile, the BCS P%+5 \ sun has type 129, which has bit 0 set. So if this is \ the sun planet, 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 }