OS_Fc, Select fast code (fast bank switching)

Register parameters

RST 20H, DEFB $8A
IN:
     A = 1, for fast bank switching
     DE = address to copy code into
     HL = 0, for code to terminate with RET
     HL <> 0, for code to terminate with JP (HL)
     C = segment for bank switching (MS_Sx)
OUT:
     Fc = 0
Registers changed after return:
     ..BCDEHL/IXIY same
     AF....../.... different

The OS_Fc fast bank switching code has now been established. 
Subsequent calls to OS_Fc with:
 
 IN:  
     A = bank to bind to segment specified by OS_Fc initialization

OUT:
     AFBCDEHL/IXIY/afbcdehl same
     ......../..../........ different

Notes

OS_Fc has only been implemented with the above bank switching routine.

OZ V4.1 and newer: Applications should use OZ_Mpb - which is a RST 30H with same API as OS_Mpb. All system code in OZ V4.1 and newer uses OZ_Mpb for optimal bank switching speed. Applications using OZ_Mpb are able to run only in OZ V4.1 and newer.

Related system calls

OS_Bix, Bind in extended address
OS_Box, restore bindings after OS_Bix
OS_Mal, allocate memory
OS_Mcl, close memory (free memory pool)
OS_Mfr, free (previously allocated block) memory
OS_Mgb, get current bank binding in segment
OS_Mop, open memory (allocate memory pool)
OS_Mpb, set new bank binding in segment
OZ_Mgb, get current bank binding in segment
OZ_Mpb, set new bank binding in segment

web analytics