x68000:doscall
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
x68000:doscall [2017/08/16 14:41] – neko68k | x68000:doscall [2020/01/26 15:54] (current) – [Detailed Descriptions] sigvec | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | |$ff00|_EXIT|Terminate program| | + | ====== DOS CALL MANUAL ====== |
- | |End the program. Open file handles are closed.||| | + | ===== DOS Call List ===== |
- | |$ff01|_GETCHAR|Wait for keyboard input(with echo)| | + | 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^ | ||
+ | |$FF00|[[doscall# | ||
+ | |$FF01|[[doscall# | ||
+ | |$FF02|[[doscall# | ||
+ | |$FF03|[[doscall# | ||
+ | |$FF04|[[doscall# | ||
+ | |$FF05|[[doscall# | ||
+ | |$FF06|[[doscall# | ||
+ | |$FF07|[[doscall# | ||
+ | |$FF08|[[doscall# | ||
+ | |$FF09|[[doscall# | ||
+ | |$FF0A|[[doscall# | ||
+ | |$FF0B|[[doscall# | ||
+ | |$FF0C|_KFLUSH|Keyboard input after buffer flush| | ||
+ | |$FF0D|[[doscall# | ||
+ | |$FF0E|[[doscall# | ||
+ | |$FF0F|_DRVCTRL|Drive status check/ | ||
+ | |||
+ | ^Code^Name^Description^ | ||
+ | |$FF10|[[doscall# | ||
+ | |$FF11|[[doscall# | ||
+ | |$FF12|[[doscall# | ||
+ | |$FF13|[[doscall# | ||
+ | |$FF17|_FATCHK|File concatenation state check| | ||
+ | |$FF18|_HENDSP|Kanji conversion control| | ||
+ | |$FF19|[[[doscall# | ||
+ | |$FF1A|[[doscall# | ||
+ | |$FF1B|[[doscall# | ||
+ | |$FF1C|[[doscall# | ||
+ | |$FF1D|[[doscall# | ||
+ | |$FF1E|[[doscall# | ||
+ | |$FF1F|[[doscall# | ||
+ | |||
+ | ^Code^Name^Description^ | ||
+ | |$FF20|[[doscall# | ||
+ | |$FF21|_FNCKEY|Get/ | ||
+ | |$FF22|_KNJCTRL|Kana-to-kanji conversion| | ||
+ | |$FF23|_CONCTRL|Console control/ | ||
+ | |$FF24|_KEYCTRL|Console state check/ | ||
+ | |$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|[[doscall# | ||
+ | |$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|[[doscall# | ||
+ | |$FF37|_NAMECK|Filename expansion| | ||
+ | |$FF39|[[doscall# | ||
+ | |$FF3A|[[doscall# | ||
+ | |$FF3B|[[doscall# | ||
+ | |$FF3C|[[doscall# | ||
+ | |$FF3D|[[doscall# | ||
+ | |$FF3E|[[doscall# | ||
+ | |$FF3F|[[doscall# | ||
+ | |||
+ | ^Code^Name^Description^ | ||
+ | |$FF40|[[doscall# | ||
+ | |$FF41|[[doscall# | ||
+ | |$FF42|[[doscall# | ||
+ | |$FF43|_CHMOD|Set/ | ||
+ | |$FF44|_IOCTRL|Device driver ioctrl direct I/O| | ||
+ | |$FF45|_DUP|Copy file handle| | ||
+ | |$FF46|_DUP2|Force copy file handle| | ||
+ | |$FF47|[[doscall# | ||
+ | |$FF48|[[doscall# | ||
+ | |$FF49|[[doscall# | ||
+ | |$FF4A|[[doscall# | ||
+ | |$FF4B|_EXEC|Load/ | ||
+ | |$FF4C|[[doscall# | ||
+ | |$FF4D|[[doscall# | ||
+ | |$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/ | ||
+ | |$FF87|_FILEDATE|Get/ | ||
+ | |$FF88|_MALLOC2|Alloc memory| | ||
+ | |$FF8A|[[doscall# | ||
+ | |$FF8B|[[doscall# | ||
+ | |$FF8C|_LOCK|Lock file| | ||
+ | |$FF8F|_ASSIGN|Get/ | ||
+ | |||
+ | ^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/ | ||
+ | |$FFFE|_TIME_PR|Get timer counter value| | ||
+ | |$FFFF|_CHANGE_PR|Execution right abandonment(? | ||
+ | |||
+ | ============================================================================== | ||
+ | |||
+ | ===== 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|Not enough memory for execution| | ||
+ | |$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' | ||
+ | |$FFFFFFE6|-26|Supervisor mode require while in supervisor mode| | ||
+ | |$FFFFFFE5|-27|Thread name exists| | ||
+ | |$FFFFFFE4|-28|IPC buffer is write protected| | ||
+ | |$FFFFFFE3|-29|Can' | ||
+ | |$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^< | ||
+ | |End the program. Open file handles are closed.||| | ||
+ | --- | ||
+ | ^$FF01^< | ||
|Arg|none| | | |Arg|none| | | ||
|Return|key code|| | |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||| | |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| | + | ^$FF02^< |
|Arg|CODE.w|Single-byte character| | |Arg|CODE.w|Single-byte character| | ||
|Return|Always 0|| | |Return|Always 0|| | ||
- | |CODE Outputs the character specified by CODE to stdout. \\ It checks whether the key is %%^%%C, %%^%%S, %%^%%P, or %%^%%N.||| | + | |Outputs the character specified by CODE to stdout. \\ It checks whether the key is %%^%%C, %%^%%S, %%^%%P, or %%^%%N.||| |
Usage: | Usage: | ||
Line 16: | 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 # | ||
+ | --- | ||
+ | ^$FF05^< | ||
+ | |Arg|CODE.w|Single-byte character code| | ||
+ | |Return|None|| | ||
+ | |Output one character specified by CODE to the printer (with break check). Because the high-order byte of CODE must be 0, kanji is output by sending two bytes in a row in the order of high byte first, then low byte.||| | ||
+ | |||
+ | Usage: | ||
+ | move CODE, | ||
+ | DOS _PRNOUT | ||
+ | addq.l # | ||
+ | |||
+ | --- | ||
+ | ^$FF06^< | ||
+ | |Arg|CODE.w|Single-byte character code| | ||
+ | |Return|CODE=0xFF, | ||
+ | |If the CODE value is 0xFF if the key is not pressed it returns 0 immediately. If CODE=0xFE the key is read and the value stays in the buffer. If CODE is any other value it is regarded as a character code and displayed.||| | ||
+ | |||
+ | Usage: | ||
+ | move CODE, | ||
+ | DOS _INPOUT | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF07^< | ||
+ | |Arg|none|| | ||
+ | |Return|Key code|| | ||
+ | |Wait until a key is pressed and return the key code.||| | ||
+ | --- | ||
+ | ^$FF08^< | ||
+ | |Arg|none|| | ||
+ | |Return|Key code|| | ||
+ | |Wait until a key is pressed and return the key code. Checks for %%^%%C, %%^%%S, %%^%%P, or %%^%%N.||| | ||
+ | --- | ||
+ | ^$FF09^< | ||
+ | |Arg|MESPTR.l|Pointer to string| | ||
+ | |Return|Always 0|| | ||
+ | |Display the character string specified by MESPTR. Checks for %%^%%C, %%^%%S, %%^%%P, or %%^%%N.||| | ||
+ | |||
+ | Usage: | ||
+ | pea (MESPTR) | ||
+ | DOS _PRINT | ||
+ | addq, | ||
+ | --- | ||
+ | ^$FF0A^< | ||
+ | |Arg|BUFFER.l|Input buffer pointer| | ||
+ | |Return|Number of characters input.|| | ||
+ | |Write a string of input characters up to the line feed to the input buffer specified by BUFFER. The newline character is replaced with the NULL character. Checks for %%^%%C, %%^%%S, %%^%%P, or %%^%%N. If the string exceeds the maximum number of input characters a warning is issued but it doesn' | ||
+ | |||
+ | ^Offset^Size^Description^ | ||
+ | |0|1.b|Maximum number of input characters: n| | ||
+ | |1|1.b|Number of actually entered characters| | ||
+ | |2|n+1.b|Input string| | ||
+ | |||
+ | Usage: | ||
+ | pea (BUFFER) | ||
+ | DOS _GETS | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF0B^< | ||
+ | |Arg|None|| | ||
+ | |Return|Input state (0: no input, -1: input)|| | ||
+ | |Examine the key input state. Checks for %%^%%C, %%^%%S, %%^%%P, or %%^%%N. ||| | ||
+ | |||
+ | --- | ||
+ | ^$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 # | ||
+ | --- | ||
+ | ^$FF10^< | ||
+ | |Arg|none|| | ||
+ | |Return|Output status (0: output impossible, nonzero: output possible)|| | ||
+ | |Check if screen output is possible.||| | ||
+ | --- | ||
+ | ^$FF11^< | ||
+ | |Arg|none|| | ||
+ | |Return|Output status (0: output impossible, nonzero: output possible)|| | ||
+ | |Check if printer output is possible.||| | ||
+ | --- | ||
+ | ^$FF12^< | ||
+ | |Arg|none|| | ||
+ | |Return|Output status (0: input impossible, nonzero: input possible)|| | ||
+ | |Check if RS-232C input is possible.||| | ||
+ | --- | ||
+ | ^$FF13^< | ||
+ | |Arg|none|| | ||
+ | |Return|Output status (0: output impossible, nonzero: output possible)|| | ||
+ | |Check if RS-232C output is possible.||| | ||
+ | --- | ||
+ | ^$FF19^< | ||
+ | |Arg|None|| | ||
+ | |Return|Number of the current drive (0: A 1: B ... 25: Z)|| | ||
+ | |Get the current drive number.||| | ||
+ | |||
+ | --- | ||
+ | ^$FF1A^< | ||
+ | |Arg|BUFFER.l|Input buffer pointer| | ||
+ | |Return|Writes the input character string up to the line feed to the input buffer specified by BUFFER. Newline characters are replaced with NULL characters. Does not perform break check(do not break at VOID/ | ||
+ | |Get the current drive number.||| | ||
+ | |||
+ | ^Offset^Size^Desciption^ | ||
+ | |0|1.b|Maximum input characters allowed: n| | ||
+ | |1|1.b|Number of characters actually entered| | ||
+ | |2|n+1.b|Input string| | ||
+ | --- | ||
+ | |||
+ | |||
+ | ^$FF1B^< | ||
+ | |Arg|FILENO.w|File handle| | ||
+ | |Return|One byte read from file|| | ||
+ | |Wait until there is input from the file handle specified by FILENO and return the code if there is input.||| | ||
+ | --- | ||
+ | ^$FF1C^< | ||
+ | |Arg 1|BUFFER.l|Input buffer pointer| | ||
+ | |Arg 2|FILENO.w|File handle| | ||
+ | |Return|Number of characters read|| | ||
+ | |Get a character string from the file handle specified by FILENO up to the line feed and write it to the input buffer specified by BUFFER. Newline characters are replaced with null characters, no break check is done (do not break at VOID/ | ||
+ | |||
+ | ^Offset^Size^Description^ | ||
+ | |0|1.b|Maximum input characters: n| | ||
+ | |1|1.b|Number of actually entered characters| | ||
+ | |2|n+1.b|Input string| | ||
+ | |||
+ | Usage: | ||
+ | move FILENO, | ||
+ | pea (BUFFER) | ||
+ | DOS _FGETS | ||
+ | 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^< | ||
+ | |Arg|FILE.l|Pointer to directory name| | ||
+ | |Return|Error code|| | ||
+ | |Create the subdirectory specified by FILE. When the call is successful the return value is usually 0, but when a special device driver is targeted, a positive integer may be returned.||| | ||
+ | |||
+ | Usage: | ||
+ | pea (FILE) | ||
+ | DOS _MKDIR | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF3A^< | ||
+ | |Arg|FILE.l|Pointer to directory name| | ||
+ | |Return|Error code|| | ||
+ | |Delete the subdirectory specified by FILE. The directory must be empty and you can't delete the current directory, the root directory, directories with the //system// or // | ||
+ | |||
+ | Usage: | ||
+ | pea (FILE) | ||
+ | DOS _RMDIR | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF3B^< | ||
+ | |Arg|FILE.l|Pointer to directory name| | ||
+ | |Return|Error code|| | ||
+ | |Change the current directory to the directory specified by FILE. When the call is successful the return value is usually 0, but when a special device driver is targeted, a positive integer may be returned. It does not work properly with Human68k version 3.02, change to a subdirectory with length of 22 characters fails.||| | ||
+ | |||
+ | Usage: | ||
+ | pea (FILE) | ||
+ | DOS _RM==CHDIR | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF3C^< | ||
+ | |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 the specified file specified by FILE with the attributes specified in ATR. \\ If ATR is 0, it is interpreted as the Archive attribute. \\ If the file already exists the contents of that file will be lost. Directories, | ||
+ | |||
+ | Usage: | ||
+ | move ATR, | ||
+ | pea (FILE) | ||
+ | DOS _CREATE | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF3D^< | ||
+ | |Arg 1|FILE.l|Pointer to file name| | ||
+ | |Arg 2|MODE.w|Access mode| | ||
+ | |Return|The file handle of the opened file. If negative, an error occured.|| | ||
+ | |Open the file specified by FILE in the access mode specified by MODE. \\ If the file has the // | ||
+ | |||
+ | Usage: | ||
+ | move MODE, | ||
+ | pea (FILE) | ||
+ | DOS _OPEN | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF3E^< | ||
+ | |Arg|FILENO.w|File handle| | ||
+ | |Return|Error code|| | ||
+ | |Close the file handle specified by FILENO.||| | ||
+ | |||
+ | Usage: | ||
+ | move FILENO, | ||
+ | DOS _CLOSE | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF3F^< | ||
+ | |Arg 1|FILENO.w|File handle| | ||
+ | |Arg 2|BUFFER.l|Pointer to read buffer| | ||
+ | |Arg 3|LEN.l|Number of bytes to read| | ||
+ | |Return|Number of bytes actually read. If negative, an error occured.|| | ||
+ | |Read the number of bytes speficied in LEN to the buffer specified in BUFFER from the file handle FILENO. After execution the file pointer moves backward(?) by the number of bytes read. If LEN=0, read from the current file pointer to the end of the file. If the return value is less than the specified number of bytes it means that the file has been read to the end.||| | ||
+ | |||
+ | Usage: | ||
+ | move.l LEN, | ||
+ | pea (BUFFER) | ||
+ | move FILENO, | ||
+ | DOS _READ | ||
+ | lea (10, | ||
+ | --- | ||
+ | ^$FF40^< | ||
+ | |Arg 1|FILENO.w|File handle| | ||
+ | |Arg 2|BUFFER.l|Write buffer pointer| | ||
+ | |Arg 2|LEN.l|Number of bytes to write| | ||
+ | |Return|Number of bytes actually written. If negative, an error occured.|| | ||
+ | |Write the number of bytes specified in LEN to the buffer specified in BUFFER from the file handle FILENO. \\ After execution the file pointer moves backward(?? | ||
+ | |||
+ | Usage: | ||
+ | move.l LEN, | ||
+ | pea (BUFFER) | ||
+ | move FILENO, | ||
+ | DOS _WRITE | ||
+ | lea (10, | ||
+ | --- | ||
+ | ^$FF41^< | ||
+ | |Arg|FILE.l|Pointer to file name| | ||
+ | |Return|Error code|| | ||
+ | |Delete the file specified by FILE. You can not use wildcards, delete directories or volume labels, or files with the //system// or // | ||
+ | |||
+ | Usage: | ||
+ | pea (FILE) | ||
+ | DOS _DELETE | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF42^< | ||
+ | |Arg 1|FILENO.w|File handle| | ||
+ | |Arg 2|OFFSET.l|File offset| | ||
+ | |Arg 3|MODE.w|Movement mode| | ||
+ | |Return|Offset from the beginning of the file.|| | ||
+ | |The pointer of the file specified by FILENO is moved based on the specified MODE and OFFSET. Attempts to move past the beginning or end of the file results in an error. The character device can't seek and the current position will always return 0. \\ \\ MODE = 0 - Start \\ MODE = 1 - Current position (Negative offsets will move the pointer forward) \\ MODE = 2 - EOF (offset must be less than or equal to 0.)||| | ||
+ | |||
+ | Usage: | ||
+ | move MODE, | ||
+ | move.l OFFSET, | ||
+ | move FILENO, | ||
+ | DOS _SEEK | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF47^< | ||
+ | |Arg 1|DRIVE.w|Drive number (0: current 1: A 2: B ... 26: Z)| | ||
+ | |Arg 2|BUFFER.l|Buffer pointer| | ||
+ | |Return|Error code|| | ||
+ | |Write the current directory of the drive specified by DRIVE into the 65 byte buffer specified by BUFFER. Does not add ' | ||
+ | |||
+ | Usage: | ||
+ | pea (BUFFER) | ||
+ | move DRIVE, | ||
+ | DOS _CURDIR | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF48^< | ||
+ | |Arg|LEN.l|Number of bytes to reserve| | ||
+ | |Return|Pointer of allocated memory block (MSP+0x10) \\ d0.l = 0x81?????? the specified amount can't be reserved (0x?????? is the number of bytes that can be reserved). \\ d0.l = 0x8200000? Impossible to completely reserve (0x? is indeterminate).|| | ||
+ | |Reserve memory with the number of bytes specified by LEN. If LEN is greater than 0x1000000 it is always an error and it is possible to check the maximum number of bytes that can be reserved.||| | ||
+ | |||
+ | Usage: | ||
+ | move.l LEN, | ||
+ | DOS _MALLOC | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF49^< | ||
+ | |Arg|MEMPTR.l|Pointer to memory block| | ||
+ | |Return|Error code|| | ||
+ | |Releases the memory block specified by MEMPTR. When MEMPTR=0, release all memory reserved by you.||| | ||
+ | |||
+ | Usage: | ||
+ | pea (MEMPTR) | ||
+ | DOS _MFREE | ||
+ | addq.l # | ||
+ | --- | ||
+ | ^$FF4A^< | ||
+ | |Arg 1|MEMPTR.l|Pointer to memory block| | ||
+ | |Arg 2|LEN.l|Number of bytes to reserve| | ||
+ | |Return|Error code \\ d0.l=0x81?????? | ||
+ | |Change the memory block specified by MEMPTR to the size specified by LEN. If LEN is greater than 0x1000000 it is always an error and it is possible to check the maximum number of bytes that can be changed.||| | ||
+ | |||
+ | Usage: | ||
+ | |||
+ | move.l LEN, | ||
+ | pea (MEMPTR) | ||
+ | DOS _SETBLOCK | ||
+ | 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.1502858502.txt.gz · Last modified: 2019/08/27 20:44 (external edit)