Skip to navigation

Aviator on the BBC Micro

Dashboard: IndicatorB

Name: IndicatorB [Show more] Type: Subroutine Category: Dashboard Summary: Update the brakes indicator ("B")
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * NewGame calls IndicatorB * UpdateFlightModel (Part 3 of 4) calls IndicatorB
.IndicatorB LDA #%01110111 \ Set A to a four-pixel block with pixels 0, 1 and 2 in \ white, to act as the centre of the brakes indicator \ when turned on LDX brakesStatus \ If brakesStatus is non-zero then the brakes are on, so BNE indb1 \ jump to indb1 LDA #%01010101 \ Set A to a four-pixel block with pixels 0 and 2 in \ white, to act as the centre of the brakes indicator \ when turned off .indb1 LDX #2 \ Set X = 2 to use as a pixel row counter for the three \ pixel rows in the brakes indicator .indb2 STA row30_block37_2,X \ Update pixel row X of the brakes indicator to the \ pixel pattern in A DEX \ Decrement the byte counter to the pixel row above BPL indb2 \ Loop back to update the next row of the indicator RTS \ Return from the subroutine