x68000:doscall
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
x68000:doscall [2017/09/10 11:55] – neko68k | x68000:doscall [2017/09/10 15:51] – added _NEWFILE neko68k | ||
---|---|---|---|
Line 2: | Line 2: | ||
===== DOS Call List ===== | ===== DOS Call List ===== | ||
+ | Caution: Calls to $FF00~$FF7F in Human68k Version 2 have been moved | ||
+ | to $FF80~$FFAF in Version 3 and later | ||
+ | |||
+ | | ||
+ | | ||
+ | $FFF8 is called every time a thread is deleted. | ||
^Code^Name^Description^ | ^Code^Name^Description^ | ||
Line 7: | Line 13: | ||
|$FF01|[[doscall# | |$FF01|[[doscall# | ||
|$FF02|[[doscall# | |$FF02|[[doscall# | ||
- | |$FF03|_COMINP|RS-232C 1 byte input| | + | |$FF03|[[doscall# |
- | |$FF04|_COMOUT|RS-232C 1 byte output| | + | |$FF04|[[doscall# |
|$FF05|_PRNOUT|Printer 1 character output| | |$FF05|_PRNOUT|Printer 1 character output| | ||
|$FF06|_INPOUT|Character I/O| | |$FF06|_INPOUT|Character I/O| | ||
Line 17: | Line 23: | ||
|$FF0B|_KEYSNS|Key input state check| | |$FF0B|_KEYSNS|Key input state check| | ||
|$FF0C|_KFLUSH|Keyboard input after buffer flush| | |$FF0C|_KFLUSH|Keyboard input after buffer flush| | ||
- | |$FF0D|_FFLUSH|Disk reset| | + | |$FF0D|[[doscall# |
- | |$FF0E|_CHGDRV|Current drive setting| | + | |$FF0E|[[doscall# |
|$FF0F|_DRVCTRL|Drive status check/ | |$FF0F|_DRVCTRL|Drive status check/ | ||
Line 28: | Line 34: | ||
|$FF17|_FATCHK|File concatenation state check| | |$FF17|_FATCHK|File concatenation state check| | ||
|$FF18|_HENDSP|Kanji conversion control| | |$FF18|_HENDSP|Kanji conversion control| | ||
- | |$FF19|_CURDRV|Get current drive| | + | |$FF19|[[[doscall# |
|$FF1A|_GETSS|Get character string (no break check)| | |$FF1A|_GETSS|Get character string (no break check)| | ||
|$FF1B|[[doscall# | |$FF1B|[[doscall# | ||
|$FF1C|[[doscall# | |$FF1C|[[doscall# | ||
- | |$FF1D|_FPUTC|Write one character to file| | + | |$FF1D|[[doscall# |
- | |$FF1E|_FPUTS|Write string to file| | + | |$FF1E|[[doscall# |
- | |$FF1F|_ALLCLOSE|Close all files| | + | |$FF1F|[[doscall# |
^Code^Name^Description^ | ^Code^Name^Description^ | ||
- | |$FF20|_SUPER|Supervisor/ | + | |$FF20|[[doscall# |
|$FF21|_FNCKEY|Get/ | |$FF21|_FNCKEY|Get/ | ||
|$FF22|_KNJCTRL|Kana-to-kanji conversion| | |$FF22|_KNJCTRL|Kana-to-kanji conversion| | ||
Line 55: | Line 61: | ||
^Code^Name^Description^ | ^Code^Name^Description^ | ||
- | |$FF30|_VERNUM|Get OS version| | + | |$FF30|[[doscall# |
|$FF31|_KEEPPR|Terminate and stay resident| | |$FF31|_KEEPPR|Terminate and stay resident| | ||
|$FF32|_GETDPB|Get drive parameter block| | |$FF32|_GETDPB|Get drive parameter block| | ||
Line 61: | Line 67: | ||
|$FF34|_DRVXCHG|Replace drive| | |$FF34|_DRVXCHG|Replace drive| | ||
|$FF35|_INTVCG|Get vector processing address| | |$FF35|_INTVCG|Get vector processing address| | ||
- | |$FF36|_DSKFRE|Get disk space remaining| | + | |$FF36|[[doscall# |
|$FF37|_NAMECK|Filename expansion| | |$FF37|_NAMECK|Filename expansion| | ||
|$FF39|[[doscall# | |$FF39|[[doscall# | ||
Line 84: | Line 90: | ||
|$FF4A|[[doscall# | |$FF4A|[[doscall# | ||
|$FF4B|_EXEC|Load/ | |$FF4B|_EXEC|Load/ | ||
- | |$FF4C|_EXIT2|Exit with return code| | + | |$FF4C|[[doscall# |
- | |$FF4D|_WAIT|Get process end return code| | + | |$FF4D|[[doscall# |
|$FF4E|_FILES|Search files| | |$FF4E|_FILES|Search files| | ||
|$FF4F|_NFILES|Search next files| | |$FF4F|_NFILES|Search next files| | ||
Line 99: | Line 105: | ||
|$FF87|_FILEDATE|Get/ | |$FF87|_FILEDATE|Get/ | ||
|$FF88|_MALLOC2|Alloc memory| | |$FF88|_MALLOC2|Alloc memory| | ||
- | |$FF8A|_MAKETMP|Create temporary file| | + | |$FF8A|[[doscall# |
- | |$FF8B|_NEWFILE|Create new file| | + | |$FF8B|[[doscall# |
|$FF8C|_LOCK|Lock file| | |$FF8C|_LOCK|Lock file| | ||
|$FF8F|_ASSIGN|Get/ | |$FF8F|_ASSIGN|Get/ | ||
Line 129: | Line 135: | ||
|$FFFE|_TIME_PR|Get timer counter value| | |$FFFE|_TIME_PR|Get timer counter value| | ||
|$FFFF|_CHANGE_PR|Execution right abandonment(? | |$FFFF|_CHANGE_PR|Execution right abandonment(? | ||
- | |||
- | | ||
- | to $FF80~$FFAF in Version 3 and later | ||
- | |||
- | | ||
- | | ||
- | $FFF8 is called every time a thread is deleted. | ||
============================================================================== | ============================================================================== | ||
Line 197: | Line 196: | ||
DOS _PUTCHAR | DOS _PUTCHAR | ||
addq.l # | addq.l # | ||
+ | --- | ||
+ | ^$FF03^< | ||
+ | |Arg|None|| | ||
+ | |Return|1 byte received|| | ||
+ | |Receive 1 byte from the RS-232C port (with break check)||| | ||
+ | --- | ||
+ | ^$FF04^< | ||
+ | |Arg|CODE.w|Byte code| | ||
+ | |Return|None|| | ||
+ | |Send 1 byte to the RS-232C port (with break check)||| | ||
+ | |||
+ | Usage: | ||
+ | move CODE, | ||
+ | DOS _COMOUT | ||
+ | addq.l # | ||
+ | |||
--- | --- | ||
^$FF07^< | ^$FF07^< | ||
Line 232: | Line 247: | ||
DOS _GETS | DOS _GETS | ||
addq.l # | addq.l # | ||
+ | |||
+ | --- | ||
+ | ^$FF0D^< | ||
+ | |Arg|None|| | ||
+ | |Return|Always 0|| | ||
+ | |Initialize the contents of the disk buffer and the line input buffer from standard input. Does not close the file. Do nothing if // | ||
+ | --- | ||
+ | ^$FF0E^< | ||
+ | |Arg|DRIVE.w|Drive number (0: A 1: B ... 25: Z)| | ||
+ | |Return|Number of drives available|| | ||
+ | |Change the current drive. Fail if the return value is less than the specified drive number.||| | ||
+ | |||
+ | Usage: | ||
+ | move DRIVE, | ||
+ | DOS _CHGDRV | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF19^< | ||
+ | |Arg|None|| | ||
+ | |Return|Number of the current drive (0: A 1: B ... 25: Z)|| | ||
+ | |Get the current drive number.||| | ||
--- | --- | ||
Line 255: | Line 291: | ||
DOS _FGETS | DOS _FGETS | ||
addq.l # | addq.l # | ||
+ | --- | ||
+ | ^$FF1D^< | ||
+ | |Arg 1|CODE.w|Byte code| | ||
+ | |Arg 2|FILENO.w|File handle| | ||
+ | |Return|None|| | ||
+ | |Write 1 byte from CODE to the file specified by FILENO.||| | ||
+ | move FILENO, | ||
+ | move CODE, | ||
+ | DOS _FPUTC | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF1E^< | ||
+ | |Arg 1|MESPTR.l|Pointer to string| | ||
+ | |Arg 2|FILENO.w|File handle| | ||
+ | |Return|None|| | ||
+ | |Write the string pointed to by MESPTR to the file specified in FILENO. Does not output the NULL character at the end of the string.||| | ||
+ | |||
+ | Usage: | ||
+ | move FILENO, | ||
+ | pea (MESPTR) | ||
+ | DOS _FPUTS | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF1F^< | ||
+ | |Arg|None|| | ||
+ | |Return|None|| | ||
+ | |Close all open files||| | ||
+ | --- | ||
+ | ^$FF20^< | ||
+ | |Arg|STACK.l|Switching mode (0 or address set in SSP)| | ||
+ | |Return|STACK=0 Value of the previous SSP (error code if negative) \\ Switch the supervisor/ | ||
+ | |Close all open files||| | ||
+ | |||
+ | Usage: | ||
+ | pea (STACK) | ||
+ | DOS _SUPER | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF30^< | ||
+ | |Arg|None|| | ||
+ | |Return|Version number|| | ||
+ | |Check the verion number of Human68k \\ \\ bit 31~24 ' | ||
+ | --- | ||
+ | ^$FF36^< | ||
+ | |Arg|DRIVE.w|Drive number| | ||
+ | |Return|Number of free bytes (2GB maximum, error code if negative)|| | ||
+ | |Get the remaining free space of the drive specified by DRIVE and write it to the following 8 bytes to BUFFER.||| | ||
+ | |||
+ | ^Offset^Size^Description^ | ||
+ | |0|1.w|Number of free clusters| | ||
+ | |2|1.w|Total number of clusters| | ||
+ | |4|1.w|Number of sectors per cluster| | ||
+ | |6|1.w|Number of bytes per sector| | ||
+ | |||
+ | Usage: | ||
+ | pea (BUFFER) | ||
+ | move DRIVE, | ||
+ | DOS _DSKFRE | ||
+ | addq.l # | ||
--- | --- | ||
^$FF39^< | ^$FF39^< | ||
Line 416: | Line 511: | ||
DOS _SETBLOCK | DOS _SETBLOCK | ||
addq.l # | addq.l # | ||
+ | |||
+ | --- | ||
+ | ^$FF4C^< | ||
+ | |Arg|CODE.w|Exit code| | ||
+ | |Return|None|| | ||
+ | |Quit the program with the exit code specified by CODE. The opened file handles are closed.||| | ||
+ | |||
+ | --- | ||
+ | ^$FF4D^< | ||
+ | |Arg|None|| | ||
+ | |Return|Exit code|| | ||
+ | |Examine the exit code of the executed process. It is the same as the return value of //DOS _EXEC(MODE=0, | ||
+ | --- | ||
+ | ^$FF8A^< | ||
+ | |Arg 1|FILE.l|Pointer to file name| | ||
+ | |Arg 2|ATR.w|File attribute (%XLAD_VSHR)| | ||
+ | |Return|The file handle of the created file. If negative, an error occured.|| | ||
+ | |Create a temporary file specified by FILE with attributes ATR. The file name can contain '?', | ||
+ | |||
+ | Usage: | ||
+ | move ATR, | ||
+ | pea (FILE) | ||
+ | DOS _MAKETMP | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF8B^< | ||
+ | |Arg 1|FILE.l|Pointer to file name| | ||
+ | |Arg 2|ATR.w|File attribute (%XLAD_VSHR)| | ||
+ | |Return|The file handle of the created file. If negative, an error occured.|| | ||
+ | |Create a temporary file specified by FILE with attributes ATR. If ATR is 0 it is equivalent to the //archive// attribute. If the file already exists it returns an error (-80).||| | ||
+ | |||
+ | Usage: | ||
+ | move ATR, | ||
+ | pea (FILE) | ||
+ | DOS _MAKETMP | ||
+ | addq.l # | ||
+ |
x68000/doscall.txt · Last modified: 2020/01/26 15:54 by sigvec