Skip to navigation


Dashboard: msblob

[NES version, Bank 0]

Name: msblob [Show more] Type: Subroutine Category: Dashboard Summary: Display the dashboard's missile indicators in black or grey
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * SOS1 calls msblob * TT66 calls msblob

Display the dashboard's missile indicators, with all the missiles reset to black (i.e. not armed or locked), or grey if there is no missile.
.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 SAL8 to draw the remaining missiles, as ; the rest of them are present and should be drawn in ; black LDY #133 ; Set the pattern for the missile indicator at position JSR MSBAR ; X to 133, which is the same grey as the dashboard, ; so this effectively hides the indicator 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 #108 ; Set the pattern for the missile indicator at position JSR MSBAR ; X to 108, which is a black indicator 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