IF _BUG_FIX .SwitchToFileSys \ This routine restores the filing system workspace to \ &C000 on a BBC Master, but only if we overwrote it in \ SwitchToCharSet 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 file1 \ file1 to continue drawing the character BIT wsstatecopy \ If bit 7 of wsstatecopy is set then the character set BMI file1 \ was already present before this call, so skip the \ following so we don't change that JSR restorews \ Call restorews to restore the filing system workspace .file1 RTS \ Return from the subroutine ENDIFName: SwitchToFileSys [Show more] Type: Subroutine Category: Utility routines Summary: Restore the filing system workspace to &C000 on a BBC MasterContext: See this subroutine in context in the source code References: This subroutine is called as follows: * tube_wrch calls SwitchToFileSys
[X]
Configuration variable OSBYTE = &FFF4
The address for the OSBYTE routine
[X]
Label file1 is local to this routine
[X]
Configuration variable restorews = &DD65
The address for the restorews 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 in subroutine SwitchToCharSet
We store a copy of the wstate here so we know which state to switch back to after printing