Skip to navigation

Elite on the BBC Micro and NES

Utility routines: SwitchToFileSys

[Elite-A, I/O processor]

Name: SwitchToFileSys [Show more] Type: Subroutine Category: Utility routines Summary: Restore the filing system workspace to &C000 on a BBC Master
Context: See this subroutine in context in the source code References: This subroutine is called as follows: * tube_wrch calls SwitchToFileSys
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 ENDIF