Skip to navigation

Elite on the BBC Micro

Dashboard: msblob (Electron version)

Name: msblob [View in context] Type: Subroutine [Compare versions] Category: Dashboard Summary: Display the dashboard's missile indicators as white squares
Display the dashboard's missile indicators, with all the missiles reset to white squares (i.e. not armed or locked).
.msblob LDX #4 \ Set up a loop counter in X to count through all four \ missile indicators .ss CPX NOMSL \ If the counter is equal to the number of missiles, BEQ SAL8 \ jump down to SQL8 to draw remaining the missiles, as \ the rest of them are present and should be drawn as \ white squares LDY #&04 \ Draw the missile indicator at position X in black JSR MSBAR DEX \ Decrement the counter to point to the next missile BNE ss \ Loop back to ss if we still have missiles to draw RTS \ Return from the subroutine .SAL8 LDY #&09 \ Draw the missile indicator at position X as a white JSR MSBAR \ square DEX \ Decrement the counter to point to the next missile BNE SAL8 \ Loop back to SAL8 if we still have missiles to draw RTS \ Return from the subroutine