This is an old revision of the document!
DOS CALL MANUAL
DOS Call list
Code | Name | Description |
$ff00 | _EXIT | Program end |
$ff01 | _GETCHAR | Get keyboard input (with echo) |
$ff02 | _PUTCHAR | Put character |
$ff03 | _COMINP | RS-232C 1 byte input |
$ff04 | _COMOUT | RS-232C 1 byte output |
$ff05 | _PRNOUT | Printer 1 character output |
$ff06 | _INPOUT | Character I/O |
$ff07 | _INKEY | Get one character from the keyboard (no break check) |
$ff08 | _GETC | Get one character from the keyboard (with break check) |
$ff09 | _PRINT | Print string |
$ff0a | _GETS | Get character string (with break check) |
$ff0b | _KEYSNS | Key input state check |
$ff0c | _KFLUSH | Keyboard input after buffer flush |
$ff0d | _FFLUSH | Disk reset |
$ff0e | _CHGDRV | Current drive setting |
$ff0f | _DRVCTRL | Drive status check/setting |
Code | Name | Description |
$ff10 | _CONSNS | Screen output check |
$ff11 | _PRNSNS | Printer output check |
$ff12 | _CINSNS | RS-232C input check |
$ff13 | _COUTSNS | RS-232C output check |
$ff17 | _FATCHK | File concatenation state check |
$ff18 | _HENDSP | Kanji conversion control |
$ff19 | _CURDRV | Get current drive |
$ff1a | _GETSS | Get character string (no break check) |
$ff1b | _FGETC | Get character from file |
$ff1c | _FGETS | Get string from file |
$ff1d | _FPUTC | Write one character to file |
$ff1e | _FPUTS | Write string to file |
$ff1f | _ALLCLOSE | Close all files |
Code | Name | Description |
$ff20 | _SUPER | Supervisor/user mode setting |
$ff21 | _FNCKEY | Get/set redefinable key |
$ff22 | _KNJCTRL | Kana-to-kanji conversion |
$ff23 | _CONCTRL | Console control/direct output |
$ff24 | _KEYCTRL | Console state check/direct input |
$ff25 | _INTVCS | Set vector processing address |
$ff26 | _PSPSET | Create process management pointer |
$ff27 | _GETTIM2 | Get time (longword) |
$ff28 | _SETTIM2 | Set time (longword) |
$ff29 | _NAMESTS | Filename expansion |
$ff2a | _GETDATE | Get date |
$ff2b | _SETDATE | Set date |
$ff2c | _GETTIME | Get time |
$ff2d | _SETTIME | Set time |
$ff2e | _VERIFY | Set verify flag |
$ff2f | _DUP0 | Force file handle copy |
Code | Name | Description |
$ff30 | _VERNUM | Get OS version |
$ff31 | _KEEPPR | Terminate and stay resident |
$ff32 | _GETDPB | Get drive parameter block |
$ff33 | _BREAKCK | Set break check |
$ff34 | _DRVXCHG | Replace drive |
$ff35 | _INTVCG | Get vector processing address |
$ff36 | _DSKFRE | Get disk space remaining |
$ff37 | _NAMECK | Filename expansion |
$ff39 | _MKDIR | Create subdirectory |
$ff3a | _RMDIR | Remove subdirectory |
$ff3b | _CHDIR | Change current directory |
$ff3c | _CREATE | Create file |
$ff3d | _OPEN | Open file |
$ff3e | _CLOSE | Close file |
$ff3f | _READ | Read file |
Code | Name | Description |
$ff40 | _WRITE | Write file |
$ff41 | _DELETE | Delete file |
$ff42 | _SEEK | Seek file |
$ff43 | _CHMOD | Set/get file modes |
$ff44 | _IOCTRL | Device driver ioctrl direct I/O |
$ff45 | _DUP | Copy file handle |
$ff46 | _DUP2 | Force copy file handle |
$ff47 | _CURDIR | Get current directory |
$ff48 | _MALLOC | Allocate memory |
$ff49 | _MFREE | Free memory |
$ff4a | _SETBLOCK | Change memory block |
$ff4b | _EXEC | Load/execute program |
$ff4c | _EXIT2 | Exit with return code |
$ff4d | _WAIT | Get process end return code |
$ff4e | _FILES | Search files |
$ff4f | _NFILES | Search next files |
Code | Name | Description |
$ff80 | _SETPDB | Change process information |
$ff81 | _GETPDB | Get process information |
$ff82 | _SETENV | Set environment variable |
$ff83 | _GETENV | Get environment variable |
$ff84 | _VERIFYG | Get verify flag |
$ff85 | _COMMON | COMMON area control |
$ff86 | _RENAME | Rename/move file |
$ff87 | _FILEDATE | Get/set file date |
$ff88 | _MALLOC2 | Alloc memory |
$ff8a | _MAKETMP | Create temporary file |
$ff8b | _NEWFILE | Create new file |
$ff8c | _LOCK | Lock file |
$ff8f | _ASSIGN | Get/set/cancel virtual drive/directory assignment |
Code | Name | Description |
$ffaa | FFLUSH | Set FFLUSH mode (undocumented) |
$ffab | _OS_PATCH | Hook OS internal function (undocumented) |
$ffac | _GETFCB | Get FCB pointer (undocumented) |
$ffad | _S_MALLOC | Alloc memory using main memory management |
$ffae | _S_MFREE | Free memory using main memory management |
$ffaf | _S_PROCESS | Sub memory management setting |
Code | Name | Description |
$fff0 | _EXITVC | (program end execution address) |
$fff1 | _CTRLVC | (CTRL+C execution address at abort) |
$fff2 | _ERRJVC | (Error abort execution address) |
$fff3 | _DISKRED | Block device direct input |
$fff4 | _DISKWRT | Block device direct output |
$fff5 | _INDOSFLG | Get OS work pointer |
$fff6 | _SUPER_JSR | Supervisor subroutine call |
$fff7 | _BUS_ERR | Check for bus error |
$fff8 | _OPEN_PR | Register background task |
$fff9 | _KILL_PR | Remove background task |
$fffa | _GET_PR | Get thread management information |
$fffb | _SUSPEND_PR | Force thread to sleep |
$fffc | _SLEEP_PR | Sleep thread |
$fffd | _SEND_PR | Transmit thread command/data |
$fffe | _TIME_PR | Get timer counter value |
$ffff | _CHANGE_PR | Execution right abandonment(?) 実行権放棄 |
Caution: Calls to $ff00~$ff7f in Human68k Version 2 have been moved
to $ff80~$ffaf in Version 3 and later
Processing address calls at $fff5~$fff7 and $fffa~$fffe can not be changed(ignored)
$fff8,$ffff is executed after the original processing is normally completed.
$fff8 is called every time a thread is deleted.
Error code list
Hex code | Byte code | Description |
$ffffffff | -1 | Invalid function code executed |
$fffffffe | -2 | File not found |
$fffffffd | -3 | Directory not found |
$fffffffc | -4 | Too many open files |
$fffffffb | -5 | Directory and volume label inaccessible |
$fffffffa | -6 | The specified handle is not open |
$fffffff9 | -7 | The memory management area was destroyed |
$fffffff8 | -8 | |
$fffffff7 | -9 | Invalid memory management pointer specified |
$fffffff6 | -10 | Illegal environment specified |
$fffffff5 | -11 | Abnormal executable file format |
$fffffff4 | -12 | Abnormal open access mode |
$fffffff3 | -13 | Invalid file name |
$fffffff2 | -14 | Called with invalid parameter |
$fffffff1 | -15 | Invalid drive specified |
$fffffff0 | -16 | Current directory can't be deleted |
$ffffffef | -17 | ioctrl can not be used |
$ffffffee | -18 | No more files found |
$ffffffed | -19 | The file can't be written |
$ffffffec | -20 | The directory already exists |
$ffffffeb | -21 | File can't be deleted |
$ffffffea | -22 | File can't be renamed |
$ffffffe9 | -23 | File can't be created because disk is full |
$ffffffe8 | -24 | File can't be created because folder is full |
$ffffffe7 | -25 | Can't seek to the specified position |
$ffffffe6 | -26 | Supervisor mode require while in supervisor mode |
$ffffffe5 | -27 | Thread name exists |
$ffffffe4 | -28 | IPC buffer is write protected |
$ffffffe3 | -29 | Can't start any more background processes |
$ffffffe0 | -32 | Insufficient lock space |
$ffffffdf | -33 | File is locked and can't be accessed |
$ffffffde | -34 | The drive has a handler open |
$ffffffdd | -35 | Symbolic link nest exceeded 16 links(lndrv) |
$ffffffb0 | -80 | File exists |
Detailed Descriptions
$ff00 | <BOOKMARK:_EXIT> | Terminate program |
End the program. Open file handles are closed. |
$ff01 | _GETCHAR | Wait for keyboard input(with echo) |
Arg | none | |
Return | key code |
Wait for key input and output the character to stdout.
^C - Return to the parent process
^P - Toggle output stdout to the printer also
^N - Check the printer output state |
$ff02 | _PUTCHAR | Display character |
Arg | CODE.w | Single-byte character |
Return | Always 0 |
CODE Outputs the character specified by CODE to stdout.
It checks whether the key is ^C, ^S, ^P, or ^N. |
Usage:
move CODE,-(sp)
DOS _PUTCHAR
addq.l #2,sp