System variables for disks
This page was last modified 10:56, 15 August 2018 by Gdx. Based on work by Mars2000you.

Disk Variables

This area is not used on system without disk.

Address Name Length Description
File Management Under Basic:
F85Fh MAXFIL 1 High legal file number.
F860h FILTAB 2 Starting address of of file data area.
F862h NULBUF 2 Points to file 0 buffer ( used in SAVE & LOAD st.)
F864h PTRFIL 2 Points to file data of currently accessing file.
F866h RUNFLG 1 Non-zero when Basic program run after load.
F866h FILNAM 11 File name from Disk-Basic instruction used.
F871h FILNM2 11 Second file name from Disk-Basic instruction used. (NAME, COPY, MOVE, etc)
F87Ch NLONLY 1 When loading program. (0 = NON Basic / other = Basic)
F87Dh SAVEND 2 End address specified in BSAVE.
Data Area used By Disk-Basic / MSX-DOS:
FB20h HOKVLD 1 Bit 0 of this byte indicates the presence of an extended Bios.
0 = No Bios, 1 = There is at least one Bios that can be called at the address 0FFCAh (EXTBIO).
FB21h DRVINV 1 Number of drives connected to master disk interface.
FB22h DRVINV 8 Slot ID and number of drives connected to disk interfaces
DRVINV+0 = Slot ID of master disk interface.
DRVINV+1 = Number of drives connected to master disk interface.
DRVINV+2 = Slot ID of disk interface 2
DRVINV+3 = Number of drives connected to disk interface 2
DRVINV+4 = Slot ID of disk interface 3
DRVINV+5 = Number of drives connected to disk interface 3
DRVINV+6 = Slot ID of disk interface 4
DRVINV+7 = Number of drives connected to disk interface 4
FB29h DRVINT 12 Slot ID and address of each interrupt handler of disk interfaces. (3*4 bytes)
DRVINT+0 = Slot ID of each interrupt handler of master interface.
DRVINT+1 = Address of interrupt handler of master interface.
DRVINT+3 = Slot ID of each interrupt handler of interface 2
DRVINT+4 = Address of interrupt handler of interface 2
DRVINT+6 = Slot ID of each interrupt handler of interface 3
DRVINT+7 = Address of interrupt handler of interface 3
DRVINT+9 = Slot ID of each interrupt handler of interface 4
DRVINT+10 = Address of interrupt handler of interface 4
FCBEh RUNBNF 1 Run Binary File After loading ( Bload"File.Bin",R )
0 = Don't Run / 1 = Run
FCBFh SAVENT 1 Start address for BSAVE / BLOAD operations.
FD99h DEVICE 1 This byte increases to 255 when SHIFT key was pressed at startup to prevent the installation of disks. Otherwise, this byte remains reseted. (Disk-Basic)