User Tools

Site Tools


x68000:doscall

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
x68000:doscall [2017/09/10 12:32] – added _ALLCLOSE neko68kx68000:doscall [2017/09/10 15:23] – added _VERNUM neko68k
Line 34: 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#curdrv|_CURDRV]]|Get current drive|
 |$FF1A|_GETSS|Get character string (no break check)| |$FF1A|_GETSS|Get character string (no break check)|
 |$FF1B|[[doscall#fgetc|_FGETC]]|Get character from file| |$FF1B|[[doscall#fgetc|_FGETC]]|Get character from file|
 |$FF1C|[[doscall#fgets|_FGETS]]|Get string from file| |$FF1C|[[doscall#fgets|_FGETS]]|Get string from file|
-|$FF1D|_FPUTC|Write one character to file| +|$FF1D|[[doscall#fputc|_FPUTC]]|Write one character to file| 
-|$FF1E|_FPUTS|Write string to file|+|$FF1E|[[doscall#fputs|_FPUTS]]|Write string to file|
 |$FF1F|[[doscall#allclose|_ALLCLOSE]]|Close all files| |$FF1F|[[doscall#allclose|_ALLCLOSE]]|Close all files|
  
Line 61: Line 61:
  
 ^Code^Name^Description^ ^Code^Name^Description^
-|$FF30|_VERNUM|Get OS version|+|$FF30|[[doscall#vernum|_VERNUM]]|Get OS version|
 |$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 67: 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#dskfre|_DSKFRE]]|Get disk space remaining|
 |$FF37|_NAMECK|Filename expansion| |$FF37|_NAMECK|Filename expansion|
 |$FF39|[[doscall#mkdir|_MKDIR]]|Create subdirectory| |$FF39|[[doscall#mkdir|_MKDIR]]|Create subdirectory|
Line 90: Line 90:
 |$FF4A|[[doscall#setblock|_SETBLOCK]]|Change memory block| |$FF4A|[[doscall#setblock|_SETBLOCK]]|Change memory block|
 |$FF4B|_EXEC|Load/execute program| |$FF4B|_EXEC|Load/execute program|
-|$FF4C|_EXIT2|Exit with return code| +|$FF4C|[[doscall#exit2|_EXIT2]]|Exit with return code| 
-|$FF4D|_WAIT|Get process end return code|+|$FF4D|[[doscall#wait|_WAIT]]|Get process end return code|
 |$FF4E|_FILES|Search files| |$FF4E|_FILES|Search files|
 |$FF4F|_NFILES|Search next files| |$FF4F|_NFILES|Search next files|
Line 105: Line 105:
 |$FF87|_FILEDATE|Get/set file date| |$FF87|_FILEDATE|Get/set file date|
 |$FF88|_MALLOC2|Alloc memory| |$FF88|_MALLOC2|Alloc memory|
-|$FF8A|_MAKETMP|Create temporary file|+|$FF8A|[[doscall#maketmp|_MAKETMP]]|Create temporary file|
 |$FF8B|_NEWFILE|Create new file| |$FF8B|_NEWFILE|Create new file|
 |$FF8C|_LOCK|Lock file| |$FF8C|_LOCK|Lock file|
Line 247: Line 247:
  DOS _CHGDRV  DOS _CHGDRV
  addq.l #2,sp  addq.l #2,sp
 +---
 +^$FF19^<BOOKMARK:curdrv>_CURDRV^Get the current drive^
 +|Arg|None||
 +|Return|Number of the current drive (0: A 1: B ... 25: Z)||
 +|Get the current drive number.|||
  
 --- ---
Line 270: Line 275:
  DOS _FGETS  DOS _FGETS
  addq.l #6,sp  addq.l #6,sp
 +---
 +^$FF1D^<BOOKMARK:fputc>_FPUTC^Output one byte to file handle^
 +|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,-(sp)
 + move CODE,-(sp)
 + DOS _FPUTC
 + addq.l #4,sp
 +---
 +^$FF1E^<BOOKMARK:fputc>_FPUTS^Output string to file handle^
 +|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,-(sp)
 + pea (MESPTR)
 + DOS _FPUTS
 + addq.l #6,sp
 +
 --- ---
 ^$FF1F^<BOOKMARK:allclose>_ALLCLOSE^Close all files^ ^$FF1F^<BOOKMARK:allclose>_ALLCLOSE^Close all files^
Line 275: Line 304:
 |Return|None|| |Return|None||
 |Close all open files||| |Close all open files|||
 +---
 +^$FF30^<BOOKMARK:vernum>_VERNUM^OS version check^
 +|Arg|None||
 +|Return|Version number||
 +|Check the verion number of Human68k \\ \\ bit 31~24 '6' (0x36) \\ bit 23~16 '8' (0x38) \\ 15~8 integer part of version number \\ bit 7~0 Decimal part of version number.|||
 +---
 +^$FF36^<BOOKMARK:dskfre>_DSKFRE^Get the available space on the disk^
 +|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,-(sp)
 + DOS _DSKFRE
 + addq.l #6,sp
 --- ---
 ^$FF39^<BOOKMARK:mkdir>_MKDIR^Create subdirectory^ ^$FF39^<BOOKMARK:mkdir>_MKDIR^Create subdirectory^
Line 435: Line 486:
  DOS _SETBLOCK  DOS _SETBLOCK
  addq.l #8,sp  addq.l #8,sp
 +
 +---
 +^$FF4C^<BOOKMARK:exit2>_EXIT2^Exit with return code^
 +|Arg|CODE.w|Exit code|
 +|Return|None||
 +|Quit the program with the exit code specified by CODE. The opened file handles are closed.|||
 +
 +---
 +^$FF4D^<BOOKMARK:wait>_WAIT^Get process exit code^
 +|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,4)//|||
 +---
 +^$FF8A^<BOOKMARK:maketmp>_MAKETMP^Create temporary file^
 +|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 '?', it is replaced by a number when created. It increments until it becomes a file name that does not exist then creates it. Note that the file name specified by FILE can be rewritten by this DOS call.|||
 +
 +Usage:
 + move ATR,-(sp)
 + pea (FILE)
 + DOS _MAKETMP
 + addq.l #6,sp
 +
x68000/doscall.txt · Last modified: 2020/01/26 15:54 by sigvec