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 13:24] neko68kx68000:doscall [2017/09/11 04:04] – added _GETSS neko68k
Line 13: Line 13:
 |$FF01|[[doscall#GETCHAR|_GETCHAR]]|Get keyboard input (with echo)| |$FF01|[[doscall#GETCHAR|_GETCHAR]]|Get keyboard input (with echo)|
 |$FF02|[[doscall#PUTCHAR|_PUTCHAR]]|Put character| |$FF02|[[doscall#PUTCHAR|_PUTCHAR]]|Put character|
-|$FF03|_COMINP|RS-232C 1 byte input| +|$FF03|[[doscall#cominp|_COMINP]]|RS-232C 1 byte input| 
-|$FF04|_COMOUT|RS-232C 1 byte output|+|$FF04|[[doscall#comout|_COMOUT]]|RS-232C 1 byte output|
 |$FF05|_PRNOUT|Printer 1 character output| |$FF05|_PRNOUT|Printer 1 character output|
 |$FF06|_INPOUT|Character I/O| |$FF06|_INPOUT|Character I/O|
Line 35: Line 35:
 |$FF18|_HENDSP|Kanji conversion control| |$FF18|_HENDSP|Kanji conversion control|
 |$FF19|[[[doscall#curdrv|_CURDRV]]|Get current drive| |$FF19|[[[doscall#curdrv|_CURDRV]]|Get current drive|
-|$FF1A|_GETSS|Get character string (no break check)|+|$FF1A|[[doscall#getss|_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|
Line 43: Line 43:
  
 ^Code^Name^Description^ ^Code^Name^Description^
-|$FF20|_SUPER|Supervisor/user mode setting|+|$FF20|[[doscall#super|_SUPER]]|Supervisor/user mode setting|
 |$FF21|_FNCKEY|Get/set redefinable key| |$FF21|_FNCKEY|Get/set redefinable key|
 |$FF22|_KNJCTRL|Kana-to-kanji conversion| |$FF22|_KNJCTRL|Kana-to-kanji conversion|
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 106: Line 106:
 |$FF88|_MALLOC2|Alloc memory| |$FF88|_MALLOC2|Alloc memory|
 |$FF8A|[[doscall#maketmp|_MAKETMP]]|Create temporary file| |$FF8A|[[doscall#maketmp|_MAKETMP]]|Create temporary file|
-|$FF8B|_NEWFILE|Create new file|+|$FF8B|[[doscall#newfile|_NEWFILE]]|Create new file|
 |$FF8C|_LOCK|Lock file| |$FF8C|_LOCK|Lock file|
 |$FF8F|_ASSIGN|Get/set/cancel virtual drive/directory assignment| |$FF8F|_ASSIGN|Get/set/cancel virtual drive/directory assignment|
Line 196: Line 196:
  DOS _PUTCHAR  DOS _PUTCHAR
  addq.l #2,sp  addq.l #2,sp
 +---
 +^$FF03^<BOOKMARK:cominp>_COMINP^Get 1 byte from RS-232C port^
 +|Arg|None||
 +|Return|1 byte received||
 +|Receive 1 byte from the RS-232C port (with break check)|||
 +---
 +^$FF04^<BOOKMARK:comout>_COMOUT^Send 1 byte to the RS-232C port^
 +|Arg|CODE.w|Byte code|
 +|Return|None||
 +|Send 1 byte to the RS-232C port (with break check)|||
 +
 +Usage:
 + move CODE,-(sp)
 + DOS _COMOUT
 + addq.l #2,sp
 +
 --- ---
 ^$FF07^<BOOKMARK:inkey>_INKEY^Enter one character from the keyboard (no break check)^ ^$FF07^<BOOKMARK:inkey>_INKEY^Enter one character from the keyboard (no break check)^
Line 254: Line 270:
  
 --- ---
 +^$FF1A^<BOOKMARK:getss>_GETSS^Input string (no break check)^
 +|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/NEWLINE) If the length exceeds the maximum number of input characters allowed a warning is issued but execution does not stop. The contents of the input buffer are as follows.||
 +|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^<BOOKMARK:fgetc>_FGETC^Get one byte from file^ ^$FF1B^<BOOKMARK:fgetc>_FGETC^Get one byte from file^
 |Arg|FILENO.w|File handle| |Arg|FILENO.w|File handle|
Line 298: Line 326:
  DOS _FPUTS  DOS _FPUTS
  addq.l #6,sp  addq.l #6,sp
- 
 --- ---
 ^$FF1F^<BOOKMARK:allclose>_ALLCLOSE^Close all files^ ^$FF1F^<BOOKMARK:allclose>_ALLCLOSE^Close all files^
Line 304: Line 331:
 |Return|None|| |Return|None||
 |Close all open files||| |Close all open files|||
 +---
 +^$FF20^<BOOKMARK:super>_SUPER^Supervisor/User mode switching^
 +|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/user mode according to the value of STACK \\ \\ STACK=other Set STACK to SSP and switch to user mode.||
 +|Close all open files|||
 +
 +Usage:
 + pea (STACK)
 + DOS _SUPER
 + addq.l #4,sp
 +---
 +^$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^ ^$FF36^<BOOKMARK:dskfre>_DSKFRE^Get the available space on the disk^
Line 499: Line 541:
 |Return|The file handle of the created file. If negative, an error occured.|| |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.||| |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
 +---
 +^$FF8B^<BOOKMARK:newfile>_NEWFILE^Create new 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. If ATR is 0 it is equivalent to the //archive// attribute. If the file already exists it returns an error (-80).|||
  
 Usage: Usage:
x68000/doscall.txt · Last modified: 2020/01/26 15:54 by sigvec