Specifications

MICROPROCESSADORES
INTERRUPÇÕES
5
Luís Miguel Charrua Figueiredo 5 - 21 E.N.I.D.H.
SeeAlso: AH=07h,AH=0Ch,INT 4A"SYSTEM"
INT 1A - TIME - CANCEL ALARM (AT,XT286,PS)
AH = 07h
Return
: alarm disabled
Note
: does not disable the real-time clock's IRQ
SeeAlso
: AH=06h,AH=0Dh,INT 70
INT 1A - TIME - READ SYSTEM-TIMER DAY COUNTER (XT2,PS)
AH = 0Ah
Return
: CF set on error
CF clear if successful
CX = count of days since Jan 1,1980
SeeAlso
: AH=04h,AH=0Bh
INT 1A - TIME - SET SYSTEM-TIMER DAY COUNTER (XT2,PS)
AH = 0Bh
CX = count of days since Jan 1,1980
Return
: CF set on error
CF clear if successful
SeeAlso
: AH=05h,AH=0Ah
INT 20 - DOS 1+ - TERMINATE PROGRAM
CS = PSP segment
Return
: never
Notes
: (see INT 21/AH=00h) this function sets the program's return code
(ERRORLEVEL) to 00h
SeeAlso
: INT 21/AH=00h,INT 21/AH=4Ch
INT 21 - DOS 1+ - TERMINATE PROGRAM
AH = 00h
CS = PSP segment
Notes
: Microsoft recommends using INT 21/AH=4Ch for DOS 2+ this function
sets the program's return code (ERRORLEVEL) to 00h execution continues at the
address stored in INT 22 after DOS performs whatever cleanup it needs to do
(restoring the INT 22,INT 23,INT 24 vectors from the PSP assumed to be located
at offset 0000h in the segment indicated by the stack copy of CS, etc.) if the PSP
is its own parent, the process's memory is not freed; if INT 22 additionally points
into the terminating program, the process is effectively NOT terminated not
supported by MS Windows 3.0 DOSX.EXE DOS extender
SeeAlso
: AH=26h,AH=31h,AH=4Ch,INT 20,INT 22
INT 21 - DOS 1+ - READ CHARACTER FROM STANDARD INPUT, WITH ECHO
AH = 01h
Return
: AL = character read
Notes
: ^C/^Break are checked, and INT 23 executed if read
^P toggles the DOS-internal echo-to-printer flag
^Z is not interpreted, thus not causing an EOF if input is redirected
character is echoed to standard output standard input is always the keyboard and
standard output the screen under DOS 1.x, but they may be redirected under DOS
2+
SeeAlso
: AH=06h,AH=07h,AH=08h,AH=0Ah
INT 21 - DOS 1+ - WRITE CHARACTER TO STANDARD OUTPUT
AH = 02h
DL = character to write
Return
: AL = last character output (despite the official docs which state
nothing is returned) (at least DOS 2.1-7.0)
Notes
: ^C/^Break are checked, and INT 23 executed if pressed standard
output is always the screen under DOS 1.x, but may be redirected under DOS 2+
the last character output will be the character in DL unless DL=09h on entry, in
which case AL=20h as tabs are expanded to blanks if standard output is
redirected to a file, no error checks (write-protected, full media, etc.) are performed
SeeAlso
: AH=06h,AH=09h
INT 21 - DOS 1+ - WRITE STRING TO STANDARD OUTPUT
AH = 09h
DS:DX -> '$'-terminated string
Return
: AL = 24h (the '$' terminating the string, despite official docs which
state that nothing is returned) (at least DOS 2.1-7.0 and
NWDOS)
Notes
: ^C/^Break are checked, and INT 23 is called if either pressed
standard output is always the screen under DOS 1.x, but may be redirected under
DOS 2+ under the FlashTek X-32 DOS extender, the pointer is in DS:EDX
SeeAlso
: AH=02h,AH=06h"OUTPUT"
INT 21 - DOS 1+ - BUFFERED INPUT
AH = 0Ah
DS:DX -> buffer (see #01344)
Return
: buffer filled with user input
Notes
: ^C/^Break are checked, and INT 23 is called if either detected reads
from standard input, which may be redirected under DOS 2+ if the maximum
buffer size (see #01344) is set to 00h, this call returns immediately without reading
any input
SeeAlso
: AH=0Ch,INT 2F/AX=4810h
Format of DOS input buffer:
Offset Size Description (Table 01344)
00h BYTE maximum characters buffer can hold
01h BYTE (call) number of chars from last input which may be
recalled
(ret) number of characters actually read, excluding CR
02h N BYTEs actual characters read, including the final carriage return
INT 21 - DOS 1+ - OPEN FILE USING FCB
AH = 0Fh
DS:DX -> unopened File Control Block (see #01345,#01346)
Return
: AL = status
00h successful
FFh file not found or access denied
Notes
: (DOS 3.1+) file opened for read/write in compatibility mode an
unopened FCB has the drive, filename, and extension fields filled in and all other
bytes cleared not supported by MS Windows 3.0 DOSX.EXE DOS extender DR
DOS checks password attached with AX=4303h (FAT32 drive) this function will
only succeed for creating a volume label; FAT32 does not support FCBs for file I/O
BUG
: APPEND for DOS 3.3+ corrupts DX if the file is not found
SeeAlso
: AH=10h,AH=16h,AH=3Dh,AX=4303h
Format of File Control Block:
Offset Size Description (Table 01345)
00h BYTE drive number (0 = default, 1 = A, etc)
FFh is not allowed (signals extended FCB, see #01346)
01h 8 BYTEs blank-padded file name
09h 3 BYTEs blank-padded file extension
0Ch WORD current block number
0Eh WORD logical record size
10h DWORD file size
14h WORD date of last write (see #01666 at AX=5700h)
16h WORD time of last write (see #01665 at AX=5700h) (DOS 1.1+)
18h 8 BYTEs reserved (see #01347,#01348,#01349,#01350,#01351)
20h BYTE record within current block
21h DWORD random access record number (if record size is > 64
bytes, high
byte is omitted)
SeeAlso
: #01346
Format of Extended File Control Block (XFCB):
Offset Size Description (Table 01346)
00h BYTE FFh signature for extended FCB
01h 5 BYTEs reserved
06h BYTE file attribute if extended FCB
07h 36 BYTEs standard FCB (all offsets are shifted by seven bytes)
SeeAlso
: #01246
Format of FCB reserved field for DOS 1.0:
Offset Size Description (Table 01347)
16h WORD location in directory (if high byte = FFh, low byte is device
ID)
18h WORD number of first cluster in file
1Ah WORD current absolute cluster number on disk