; *********************************** ; * MSX-DOS and CP/M function calls * ; *********************************** _TERM0 equ 000h ; Program terminate _CONIN equ 001h ; Console input _CONOUT equ 002h ; Console output _AUXIN equ 003h ; Auxiliary input _AUXOUT equ 004h ; Auxiliary output _LSTOUT equ 005h ; Printer output _DIRIO equ 006h ; Direct console I/O _DIRIN equ 007h ; Direct console input _INNOE equ 008h ; Console input without echo _STROUT equ 009h ; String output _BUFIN equ 00ah ; Buffered line input _CONST equ 00bh ; Console status _CPMVER equ 00ch ; Return version number _DSKRST equ 00dh ; Disk reset _SELDSK equ 00eh ; Select disk _FOPEN equ 00fh ; Open file [FCB] _FCLOSE equ 010h ; Close file [FCB] _SFIRST equ 011h ; Search for first [FCB] _SNEXT equ 012h ; Search for next [FCB] _FDEL equ 013h ; Delete file [FCB] _RDSEQ equ 014h ; Sequential read [FCB] _WRSEQ equ 015h ; Sequential write [FCB] _FMAKE equ 016h ; Create file [FCB] _FREN equ 017h ; Rename file [FCB] _LOGIN equ 018h ; Get login vector _CURDRV equ 019h ; Get current drive _SETDTA equ 01ah ; Set disk transfer address _ALLOC equ 01bh ; Get allocation information ; 01ch..020h missing _RDRND equ 021h ; Random read [FCB] _WRRND equ 022h ; Random write [FCB] _FSIZE equ 023h ; Get file size [FCB] _SETRND equ 024h ; Set random record [FCB] ; 025h missing _WRBLK equ 026h ; Random block write [FCB] _RDBLK equ 027h ; Random block read [FCB] _WRZER equ 028h ; Random write with zero fill [FCB] _GDATE equ 02ah ; Get date _SDATE equ 02bh ; Set date _GTIME equ 02ch ; Get time _STIME equ 02dh ; Set time _VERIFY equ 02eh ; Set/reset verify flag _RDABS equ 02fh ; Absolute sector read _WRABS equ 030h ; Absolute sector write _DPARM equ 031h ; Get disk parameters ; 032h..03fh undefined _FFIRST equ 040h ; Find first entry _FNEXT equ 041h ; Find next entry _FNEW equ 042h ; Find new entry _OPEN equ 043h ; Open file handle _CREATE equ 044h ; Create file handle _CLOSE equ 045h ; Close file handle _ENSURE equ 046h ; Ensure file handle _DUP equ 047h ; Duplicate file handle _READ equ 048h ; Read from file handle _WRITE equ 049h ; Write to file handle _SEEK equ 04ah ; Move file handle pointer _IOCTL equ 04bh ; I/O control for devices _HTEST equ 04ch ; Test file handle _DELETE equ 04dh ; Delete file or subdirectory _RENAME equ 04eh ; Rename file or subdirectory _MOVE equ 04fh ; Move file or subdirectory _ATTR equ 050h ; Get/set file attributes _FTIME equ 051h ; Get/set file date and time _HDELETE equ 052h ; Delete file handle _HRENAME equ 053h ; Rename file handle _HMOVE equ 054h ; Move file handle _HATTR equ 055h ; Get/set file handle attributes _HFTIME equ 056h ; Get/set file handle date and time _GETDTA equ 057h ; Get disk transfer address _GETVFY equ 058h ; Get verify flag setting _GETCD equ 059h ; Get current directory _CHDIR equ 05ah ; Change current directory _PARSE equ 05bh ; Parse pathname _PFILE equ 05ch ; Parse filename _CHKCHR equ 05dh ; Check character _WPATH equ 05eh ; Get whole path string _FLUSH equ 05fh ; Flush disk buffers _FORK equ 060h ; Fork to child process _JOIN equ 061h ; Rejoin parent process _TERM equ 062h ; Terminate with error code _DEFAB equ 063h ; Define abort exit routine _DEFERR equ 064h ; Define disk error handler routine _ERROR equ 065h ; Get previous error code _EXPLAIN equ 066h ; Explain error code _FORMAT equ 067h ; Format a disk _RAMD equ 068h ; Create or destroy RAM disk _BUFFER equ 069h ; Allocate sector buffers _ASSIGN equ 06ah ; Logical drive assignment _GENV equ 06bh ; Get environment item _SENV equ 06ch ; Set environment item _FENV equ 06dh ; Find environment item _CHKDSK equ 06eh ; Get/set disk check status _DOSVER equ 06fh ; Get MSX-DOS version number _REDIR equ 070h ; Get/set redirection state ; ************************ ; * MSX-DOS2 error codes * ; ************************ ; Command errors .OVDEST equ 081h ; Cannot overwrite previous destination file .COPY equ 082h ; File cannot be copied onto itself .BADEST equ 083h ; Cannot create destination file .NOCAT equ 084h ; Cannot concatenate destination file .BADVER equ 085h ; Wrong version of MSX-DOS .NOHELP equ 086h ; File for HELP not found .BADNO equ 087h ; Invalid number .IOPT equ 088h ; Invalid option .NOPAR equ 089h ; Missing parameter .INP equ 08ah ; Too many parameters .IPARM equ 08bh ; Invalid parameter .OKCMD equ 08ch ; *NO MESSAGE FOR THIS ERROR* .BUFUL equ 08dh ; Command too long .BADCM equ 08eh ; Unrecognized command .BADCOM equ 08fh ; Wrong version of COMMAND ; Program termination errors .INERR equ 09bh ; Error on standard input .OUTERR equ 09ch ; Error on standard output .ABORT equ 09dh ; Disk operation aborted .CTRLC equ 09eh ; Ctrl-C pressed .STOP equ 09fh ; Ctrl-STOP pressed ; MSX-DOS function errors .ISBFN equ 0b8h ; Invalid sub-function number .EOL equ 0b9h ; *NO MESSAGE FOR THIS ERROR* .HDEAD equ 0bah ; File handle has been deleted .NRAMD equ 0bbh ; RAM disk does not exist .RAMDX equ 0bch ; RAM disk (drive H:) already exists .ITIME equ 0bdh ; Invalid time .IDATE equ 0beh ; Invalid date .ELONG equ 0bfh ; Environment string too long .IENV equ 0c0h ; Invalid environment string .IDEV equ 0c1h ; Invalid device operation .NOPEN equ 0c2h ; File handle not open .IHAND equ 0c3h ; Invalid file handle .NHAND equ 0c4h ; No spare file handles .IPROC equ 0c5h ; Invalid process id .ACCV equ 0c6h ; File access violation .EOF equ 0c7h ; End of file .FILE equ 0c8h ; File allocation error .OV64K equ 0c9h ; Cannot transfer above 64K .FOPEN equ 0cah ; File already in use .FILEX equ 0cbh ; File exists .DIRX equ 0cch ; Directory exists .SYSX equ 0cdh ; System file exists .DOT equ 0ceh ; Invalid . or .. operation .IATTR equ 0cfh ; Invalid attributes .DIRNE equ 0d0h ; Directory not empty .FILRO equ 0d1h ; Read only file .DIRE equ 0d2h ; Invalid directory move .DUPF equ 0d3h ; Duplicate filename .DKFUL equ 0d4h ; Disk full .DRFUL equ 0d5h ; Root directory full .NODIR equ 0d6h ; Directory not found .NOFIL equ 0d7h ; File not found .PLONG equ 0d8h ; Pathname too long .IPATH equ 0d9h ; Invalid pathname .IFNM equ 0dah ; Invalid filename .IDRV equ 0dbh ; Invalid drive .IBDOS equ 0dch ; Invalid MSX-DOS call ; 0ddh missing .NORAM equ 0deh ; Not enough memory .INTER equ 0dfh ; Internal error ; Disk errors .IFORM equ 0f0h ; Cannot format this drive .NOUPB equ 0f1h ; *NO MESSAGE FOR THIS ERROR* .IFAT equ 0f2h ; Bad file allocation table .SEEK equ 0f3h ; Seek error .WFILE equ 0f4h ; Wrong disk for file .WDISK equ 0f5h ; Wrong disk .NDOS equ 0f6h ; Not a DOS disk .UFORM equ 0f7h ; Unformated disk .WPROT equ 0f8h ; Write protected disk .RNF equ 0f9h ; Sector not found .DATA equ 0fah ; Data error .VERFY equ 0fbh ; Verify error .NRDY equ 0fch ; Not ready .DISK equ 0fdh ; Disk error .WRERR equ 0feh ; Write error .NCOMP equ 0ffh ; Incompatible disk