.COLD LDA #LO(NEWBRK) \ Set BRKV to point to the NEWBRK routine STA BRKV LDA #HI(NEWBRK) STA BRKV+1 LDA #LO(CHPR) \ Set WRCHV to point to the CHPR routine STA WRCHV LDA #HI(CHPR) STA WRCHV+1 JSR setzp \ Call setzp to copy the top part of zero page into \ the buffer at &3000 JSR SETINTS \ Call SETINTS to set various vectors, interrupts and \ timers JMP SOFLUSH \ Call SOFLUSH to reset the sound buffers and return \ from the subroutine using a tail call IF _SNG47 .NMIpissoff CLI \ These instructions are never reached and have no RTI \ effect ENDIFName: COLD [Show more] Type: Subroutine Category: Save and load Summary: Set the standard BRKV handler for the gameContext: See this subroutine in context in the source code Variations: See code variations for this subroutine in the different versions References: This subroutine is called as follows: * S% calls COLD
[X]
Configuration variable BRKV = &0202
The break vector that we intercept to enable us to handle and display system errors
[X]
Subroutine CHPR (category: Text)
Print a character at the text cursor by poking into screen memory
[X]
Subroutine NEWBRK (category: Utility routines)
The standard BRKV handler for the game
[X]
Subroutine SETINTS (category: Loader)
Set the various vectors, interrupts and timers
[X]
Subroutine SOFLUSH (category: Sound)
Reset the sound buffer and turn off all sound channels
[X]
Configuration variable WRCHV = &020E
The WRCHV vector that we intercept to implement our own custom OSWRCH commands for communicating over the Tube
[X]
Subroutine setzp (category: Utility routines)
Copy the top part of zero page (&0090 to &00FF) into the buffer at &3000