Skip to navigation

Revs on the BBC Micro

Screen mode: KillCustomScreen

Name: KillCustomScreen [Show more] Type: Subroutine Category: Screen mode Summary: Disable the custom screen mode and switch to mode 7 Deep dive: Hidden secrets of the custom screen mode
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * MainDrivingLoop (Part 5 of 5) calls KillCustomScreen
.KillCustomScreen SEI \ Disable interrupts so we can update the interrupt \ vector and VIA LDA irq1Address \ Set the IRQ1V vector to irq1Address, which removes the STA IRQ1V \ custom screen interrupt handler from the chain LDA irq1Address+1 STA IRQ1V+1 LDA #%01000000 \ Set 6522 User VIA interrupt enable register IER STA VIA+&6E \ (SHEILA &4E) bit 6 (i.e. disable the Timer1 interrupt \ from the User VIA, as we no longer neeed it) CLI \ Re-enable interrupts JSR FlushSoundBuffers \ Flush all four sound channel buffers \ Fall througn into SetScreenMode7 to switch to mode 7