Disc Communication Area (Disk-ROM 1.xx)
Disc Communication Area (Disk-ROM 1.xx)
Disc Communication Area is an fixed area from F1C9h to F37Fh added by a disk interface in addition to reserved variables for the disks in System variables and work area. Disc Communication Area contains information about the dynamic work area above F1C9h that can be determined by the variable HIGHMEM (F37Fh) or the table SLTWRK (0FD09h).
The dynamic work area includes work space used by the disk drivers which are initialized at boot time and various buffers and tables. The definition of the work space used by the various disk drivers are not standardized, so should not be used by user programs to cause incompatibility.
Address | Length | Name | Description |
F1C9h | 24 | Routine used by the function 09h from BDOS to print a text string until '$' is found. | |
F1E2h | 6 | Routine to interrupt a program in case of error. | |
F1E8h | 12 | Call to a Main-RAM routine on bank 4000h~7FFFh when the Disk-ROM is selected.
Entry: Content of address pointed by HL | |
F1F4h | 3 | Routine to check filename. Results stored in pointer (DE)
Entry: HL=pointer to the file name | |
F1F7h | 4 | Device names for the printer. Contains 50h,52h,4Eh,20h ("PRN ") by default. | |
F1FBh | 4 | Device names for listing print. Contains 4Ch,53h,54h,20h ("LST ") by default. | |
F1FFh | 4 | Device names for no device. Contains 4Eh,55h,4Ch,20h ("NUL ") by default. | |
F203h | 4 | Device names for auxiliary I/O extension. Contains 41h,55h,58h,20h ("AUX ") by default. | |
F207h | 4 | Device names for the console. Contains 43h,4Fh,4Eh,20h ("CON ") by default. | |
F20Bh | 11 | Device filename found (with extension) at the device. | |
F216h | 1 | Current device number. (PRN = -5, LST = -4, NUL = -3, AUX = -2, CON = -1) | |
F221h | 2 | DATE of found file from the FCB | |
F223h | 2 | TIME of found file from the FCB | |
F22Bh | 12 | Table containing the number of days in each month of the year, excluding leap years.
F22Bh+0 = Number of days in January of of the year F22Bh+1 = Number of days in February of the year F22Bh+2 = Number of days in March of the year F22Bh+3 = Number of days in April of the year F22Bh+4 = Number of days in May of the year F22Bh+5 = Number of days in June of the year F22Bh+6 = Number of days in July of the year F22Bh+7 = Number of days in August of the year F22Bh+8 = Number of days in September of the year F22Bh+9 = Number of days in October of the year F22Bh+10 = Number of days in November of the year F22Bh+12 = Number of days in December of the year | |
F237h | 4 | BUFINP | Work area for BDOS function 10. |
F23Bh | 1 | Flag to send characters to the printer. 0 = Do not send, Other value = Send to the printer. | |
F23Dh | 2 | Current address of DTA (Disk Transfer Area). (0080h by default under DOS) | |
F23Fh | 4 | Number of current sector of the disk. | |
F243h | 2 | DPB address of the current drive. | |
F245h | 1 | Relative sector number inside current folder, Used by SEARCH FIRST and NEXT routines. (Add the first sector number of the folder to find the actual sector number.) | |
F246h | 1 | Current drive. (0=A, 1=B, etc) | |
F247h | 1 | Default drive.(0=A, 1=B, etc) | |
F248h | 3 | Day, Month and Year. 0 = 1980, 1 = 1981, 2 = 1982, etc for the year. Values stored when the command DATE or TIME is used. (MSX-DOS) | |
F24Ch | 2 | Hour and minute, Values stored when the command DATE or TIME is used. (MSX-DOS) | |
F24Eh | 1 | Day of the week. 0 = Sunday, 1 = Monday, 2 = Tuesday, etc., Value stored when the command DATE or TIME is used. (MSX-DOS) | |
Hooks called at the beginning of following routines: | |||
---|---|---|---|
F24Fh | 3 | H.PROMPT | Displaying the message "Insert disk for drive" when emulation of a second drive. When calling this hook, the register A contains the letter of the drive name in ASCII code. |
F252h | 3 | H. | Get FAT entry content. For when connecting a new device. |
F255h | 3 | Fix-filename. | |
F258h | 3 | SearchDir. (Useful for changing 0F2DCh to find also hidden files.) | |
F25Bh | 3 | DIRENT increase routine, after this the new DIRENT value is stored in [AF]. | |
F25Eh | 3 | Loads the next sector of the current disque. | |
F261h | 3 | Fix filename. | |
F264h | 3 | Routine OPEN. | |
F267h | 3 | Get latest FAT. | |
F26Ah | 3 | SFIRST | Search for first FCB. |
F26Dh | 3 | Write FAT. | |
F270h | 3 | H.DISKREAD | Read sectors (BDOS:2Fh). |
F273h | 3 | Disk error. | |
F276h | 3 | Write folder sector hook | |
F279h | 3 | H.DISKWRT | Write sectors. (BDOS:30h) |
F27Ch | 3 | HL=DE*BC | |
F27Fh | 3 | BC=BC/DE, HL=rest | |
F282h | 3 | Get absolute cluster. | |
F285h | 3 | Get next absolute cluster. | |
F288h | 3 | Partical sector read. | |
F28Bh | 3 | Partical sector write. | |
F28Eh | 3 | Start of read record operation from disk. | |
F291h | 3 | Finish read record operation from disk. | |
F294h | 3 | End of read record operation from disk. | |
F297h | 3 | Record operation error. | |
F29Ah | 3 | Start write record operation to disk. | |
F29Dh | 3 | Finish write record operation to disk. | |
F2A0h | 3 | Calculate sequential sectors. | |
F2A3h | 3 | Get sector number of cluster. | |
F2A6h | 3 | Allocate FAT chain. | |
F2A9h | 3 | Release FAT chain. | |
F2ACh | 3 | H.BUFINP | Add a data in buffer. |
F2AFh | 3 | H.CONOUT | Console output. (Function BDOS 02h) |
F2B2h | 3 | Get time and date of file. | |
F2B5h | 3 | Leap Year calculation. (February = 28/29 days) | |
F2B8h | 1 | Possition of current file in folder. | |
F2B9h | 11 | Current opened filename and its extension (at 0F2C1h). (DOS & Disk-Basic) | |
F2C4h | 1 | Attributes of opened file. If bit 7 is set then files with a NOT attribute to 0 can be opened. This can be done by setting bit 7 of the FCB-drive byte, when calling BDOS OPEN routine. (=FCB+0) | |
F2CFh | 2 | Time | |
F2D1h | 2 | Date | |
F2D3h | 2 | First cluster. (The first file is allways 2) | |
F2D5h | 4 | Opened file size. | |
F2D9h | 1 | ||
F2DAh | 1 | ||
F2DBh | 1 | ||
F2DCh | 1 | If Not Zero, Files with a NOT attribute to 0 will be accepted. (F2C4h bit 7 overrules this!) | |
F2E0h | 1 | ||
F2E1h | 1 | DRIVE | Current drive of absolute disk read/write. (0~7) |
F2E2h | 2 | Sub counter for drive. | |
F2FEh | 2 | Sub counter DrvCountDown. | |
F302h | 2 | Pointer to abort handler. (MSX-DOS) | |
F304h | 2 | Temporary storage for Stack Pointer (SP). | |
F306h | 1 | Default drive of MSX-DOS. | |
F307h | 2 | Storage of DE (DE=FCB pointer), Same as [C] > 11, in the BDOS call (0F37Dh) | |
F309h | 2 | storage of the DPB address by Search first and next. | |
F30Bh | 2 | ||
F30Dh | 1 | RAWFLG | Verify state (NZ=on) |
F30Eh | 1 | Date format (0 = YYMMDD, 1 = MMDDYY, 2 = DDMMYY) | |
F30Fh | 4 | KANJTABLE | Area used by Kanji-ROM |
F313h | 1 | DISKVE | Contains Disk-Basic Version. 0 = Disk Basic 1.x, other value = Disk-basic 2.x |
F323h | 2 | ERRADR | Stores a address to jump to, if an error occurs |
F325h | 2 | CTRLCAD | Address of routine to call when CTRL+C keys are pressed. |
Hooks for COM port and BDOS call evaluation: | |||
F327h | 5 | Hook called at begining of the AUXINP routine. | |
F32Ch | 5 | Hook called at begining of the AUXOUT routine. | |
F331h | 5 | BDOSCALL | Hook called at begining of a BDOS function. |
Keys under MSX-DOS: | |||
F336h | 1 | Flag for Key pressed. Contains 0FFh when a key is pressed. Contains 03h if CTRL+STOP are pressed. | |
F337h | 1 | Flag for Key pressed. Contains the ASCII code of the key pressed. Contains 03h if CTRL+STOP are pressed. In some routines if F336h <> 0 then CTRL+S is possible | |
MSX-DOS variables: | |||
F338h | 1 | Real Time Clock (RTC) flag (0 if no RTC, other value if RTC is present) | |
F339h | 7 | Stores SP at F339h when calling (input-current-date routine) from (DISK-ROM) Stores HL at F33Bh when calling RTC routine. | |
F340h | 1 | REBOOT | IF = 0 DOS will initialized all settings again. |
F341h | 1 | RAMAD0 | Slot ID of RAM in bank 0 (MSX-DOS) |
F342h | 1 | RAMAD1 | Slot ID of RAM in bank 1 (MSX-DOS) |
F343h | 1 | RAMAD2 | Slot ID of RAM in bank 2 (MSX-DOS/Disk-Basic) |
F344h | 1 | RAMAD3 | Slot ID of RAM in bank 3 (MSX-DOS/Disk-Basic) |
F345h | 1 | Is used when calculating free buffers (025h) | |
F346h | 1 | Flag to know if system is booted on MSX-DOS. 0 = No, other value = yes (CALL SYSTEM is possible). | |
F347h | 1 | NMBDRV | Total number logical drives connected (0~7) (CALL FORMAT reads this variable.) |
F348h | 1 | MASTERS | Slot ID of the master DISK-ROM. |
F349h | 2 | HIMSAV | Start address of the disk work area. |
F34Bh | 2 | End address of MSX-DOS kernel. (MSX-DOS, Contient 0000h by default under Basic.) Note: Start address of MSX-DOS kernel is stored at 0006h. MSX-DOS.SYS file is loaded in this area at boot. | |
F34Dh | 1 | SECBUF | Temporary storage for FAT sector pointer |
F34Fh | 2 | BUFFER | Temporary storage for DATA sector pointer |
F351h | 2 | DIRBUF | Pointer to the read sector or to write, Used by the instruction DSKI$ & DSKO$ of Basic. |
DPB addresses: | |||
F353h | 2 | DPBBASE | Address of current DPB |
F355h | 2 | DPBLIST | Table of DPB address for all drive.
DPBLIST+0 = DPB address of drive A DPBLIST+1 = DPB address of drive B DPBLIST+2 = DPB address of drive C DPBLIST+3 = DPB address of drive D DPBLIST+4 = DPB address of drive E DPBLIST+5 = DPB address of drive F DPBLIST+6 = DPB address of drive G DPBLIST+7 = DPB address of drive H |
Routines used by the MSX-DOS: | |||
F365h | 3 | Routine reading of the state of the primary Slots. Output: A = Primary Slot Status. | |
F368h | 3 | SETROM | ROMUSE Switch DISK-ROM to page 1 (MSX-DOS) |
F36Bh | 3 | SETRAM | RAMUSE Switch RAM to page 1 (MSX-DOS) |
Inter slot Move: | |||
F36Eh | 3 | SLTMOV | Move ROM to RAM HL = source, DE = destination, BC = length (DOS only) |
F371h | 3 | AUXINP | Input to auxiliary device. Ouput: A = Read value. 1Ah when CTRL+Z |
F374h | 3 | AUXOUT | Output to auxiliary device. Entry: A = Value to send. |
F377h | 3 | BLDCHK | BLOAD Routine of the Disk-Basic. (Contains JP 0000h under MSX-DOS) |
F37Ah | 3 | BSVCHK | BSAVE Routine of the Disk-Basic. (Contains JP 0000h under MSX-DOS) Entry: C = Number of the Routine to call. |
F37Dh | 3 | ROMBDOS | Call to a BDOS function. |