\ --- Mod: Code added for Elite-A: --------------------> IF _BUG_FIX .wsstatecopy EQUB 0 \ We store a copy of the wstate here so we know which \ state to switch back to after printing .SwitchToCharSet \ This routine switches the MOS character definitions \ into memory at &C000 on a BBC Master when CATF is \ non-zero \ \ Call it at SwitchToCharSet+5 to switch the character \ set irrespective of the value of CATF LDX CATF \ If CATF = 0, jump to char1, otherwise we are BEQ char1 \ printing a disc catalogue LDA #0 \ Call OSBYTE with A = 0 and X = 1 to fetch bit 0 of the LDX #1 \ operating system version into X JSR OSBYTE CPX #3 \ If X =< 3 then this is not a BBC Master, so jump to BCC char1 \ char1 to continue drawing the character LDA wsstate \ Copy wsstate into wsstatecopy STA wsstatecopy JSR savews \ Call savews to put the character set in the correct \ place .char1 LDA K3 \ Set A to the character to print RTS \ Return from the subroutine ENDIF \ --- End of added code ------------------------------->Name: SwitchToCharSet [Show more] Type: Subroutine Category: Utility routines Summary: Switch the MOS character definitions into memory at &C000 on a BBC MasterContext: See this subroutine in context in the source code References: This subroutine is called as follows: * CHPR calls SwitchToCharSet * DOENTRY calls via SwitchToCharSet+5 * MEBRK calls via SwitchToCharSet+5
Other entry points: SwitchToCharSet+5 Switch the character set irrespective of the value of CATF
[X]
Configuration variable OSBYTE = &FFF4
The address for the OSBYTE routine
[X]
Label char1 is local to this routine
[X]
Configuration variable savews = &DD06
The address for the savews workspace routine from the loader so we can call it to ensure the MOS characterdefinitions are loaded before printing text on the BBC Master
[X]
Configuration variable wsstate = &DDBA
The address for the wsstate workspace routine from the loader so we can call it to ensure the MOS characterdefinitions are loaded before printing text on the BBC Master
[X]
Variable wsstatecopy is local to this routine
We store a copy of the wstate here so we know which state to switch back to after printing