Skip to navigation

Drawing the screen: DET1

[BBC Micro disc version, Docked]

Name: DET1 [Show more] Type: Subroutine Category: Drawing the screen Summary: Show or hide the dashboard (for when we die)
Context: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: No direct references to this subroutine in this source file

This routine sets the screen to show the number of text rows given in X. It is used when we are killed, as reducing the number of rows from the usual 31 to 24 has the effect of hiding the dashboard, leaving a monochrome image of ship debris and explosion clouds. Increasing the rows back up to 31 makes the dashboard reappear, as the dashboard's screen memory doesn't get touched by this process.
Arguments: X The number of text rows to display on the screen (24 will hide the dashboard, 31 will make it reappear)
Returns: A A is set to 6
.DET1 LDA #6 \ Set A to 6 so we can update 6845 register R6 below SEI \ Disable interrupts so we can update the 6845 STA VIA+&00 \ Set 6845 register R6 to the value in X. Register R6 STX VIA+&01 \ is the "vertical displayed" register, which sets the \ number of rows shown on the screen CLI \ Re-enable interrupts RTS \ Return from the subroutine