Skip to navigation

Elite on the BBC Micro

Dashboard: msblob [Elite-A, Docked]

Name: msblob [Show more] Type: Subroutine Category: Dashboard Summary: Display the dashboard's missile indicators in green
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * BR1 (Part 2 of 2) calls msblob * EQSHP calls msblob * n_buyship calls msblob

Display the dashboard's missile indicators, with all the missiles reset to green/cyan (i.e. not armed or locked). Returns: X X is set to &FF Y Y is set to 0
.msblob \ --- Mod: Original Acornsoft code removed: -----------> \ LDX #4 \ Set up a loop counter in X to count through all four \ \ missile indicators \ --- And replaced by: --------------------------------> LDX #3 \ Set up a loop counter in X to count through all four \ missile indicators (in Elite-A the missile indicators \ are numbered 0-3 rather than 1-4) \ --- End of replacement ------------------------------> .ss \ --- Mod: Original Acornsoft code removed: -----------> \ 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 in \ \ green/cyan \ LDY #0 \ 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 #&EE \ Draw the missile indicator at position X in green/cyan \ JSR MSBAR \ DEX \ Decrement the counter to point to the next missile \ BNE SAL8 \ Loop back to SAL8 if we still have missiles to draw \ --- And replaced by: --------------------------------> LDY #0 \ If X >= NOMSL, then jump down to miss_miss with Y = 0 CPX NOMSL \ to draw the missile indicator at position X in black BCS miss_miss LDY #&EE \ Set the colour of the missile indicator to green/cyan .miss_miss JSR MSBAR \ Draw the missile indicator at position X in colour Y, \ and return with Y = 0 DEX \ Decrement the counter to point to the next missile BPL ss \ Loop back to ss if we still have missiles to draw, \ ending when X = &FF \ --- End of replacement ------------------------------> RTS \ Return from the subroutine