Skip to navigation

BBC Micro Elite

Drawing planets: PL2 (6502SP version)

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 \ Shift bit 0 of the planet/sun's type into the C flag LSR A BCS PL57 \ 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, jump to PL57 to skip the following \ instructions JSR LS2FL \ Call LS2FL to send the ball line heap to the I/O \ processor for drawing on-screen STZ LSP \ Reset the ball line heap by setting the ball line heap \ pointer to 0 RTS \ Return from the subroutine .PL57 JMP WPLS \ This is the sun, so jump to WPLS to remove it from \ screen, returning from the subroutine using a tail \ call