INT 21H (0x21)
Function 29H (0x29 or 41) --> Parse filename
Call with: AH = 29H
AL = flags to control parsing
Bit 0 = 1, if leading separators will be
scanned off (ignored).
= 0, if leading separators will not be
scanned off
Bit 1 = 1, if drive ID byte in FCB will be
modified only if a drive was
specified in the string being parsed.
= 0, if the drive ID byte in FCB will be
modified regardless, if no drive
specifier is present in the parsed string, FCB drive code field is set to 0 (default)
Bit 2 = 1, if filename field in FCB will be
modified only if a filename is
specified in the string being parsed.
= 0, if filename field in FCB will be modified regardless, if no filename is presenting the parsed string, FCB filename is set to ASCIIZ blanks.
Bit 3 = 1, if extension field in FCB will be
modified, only if an Extension is
specified in the string being parsed.
= 0, if extension field in FCB will be
modified regardless, if no extension
is present in the parsed string, FCB
extension is set to ASCIIZ blanks.
DS: SI = segment: offset of string
ES: DI = segment: offset of file control block
Returns: AL = 00H, if no wildcard characters
Encountered 01H, if parsed string
contained wildcard characters FFH,
if drive specifier invalid
DS: SI = segment: offset of first character
after parsed filename
ES: DI = segment: offset of formatted
unopened file control block
Comments:
This function parses a text string into the various fields of a file control block (FCB).
This function regards the characters (: . ; , = + tab space ) as separator characters and regards all control characters and characters (: . ; , = + tab space < > | / “ [ ])as terminator characters.
INT 21H (0x21)
Function 2AH (0x2A or 42) --> Get day and date
Call with: AH = 2AH
Returns: CX = year (1980 through 2099)
DH = month (1 through 12)
DL = day (1 through 31)
AL = day of the week (0 = Sunday,
1= Monday, etc.)
Comments:
This function obtains the system day of the month, day of the week, month and year.
INT 21H (0x21)
Function 2BH (0x2B or 43) --> Set date
Call with: AH = 2BH
CX = year (1980 through 2099)
DH = month (1 through 12)
DL = day (1 through 31)
Returns: AL = 00H if date set successfully
FFH if date not valid (ignored)
Comments:
This function initializes the system clock driver to a specific date but the system time remains unchanged.
INT 21H (0x21)
Function 2CH (0x2C or 44) --> Get time
Call with: AH = 2CH
Returns: CH = hours (0 through 23)
CL = minutes (0 through 59)
DH = seconds (0 through 59)
DL = hundredths of seconds (0 through 99)
Comments:
This is used to obtain the time of day from the system real-time clock driver, converted to hours, minutes, seconds, and hundredths of seconds.
INT 21H (0x21)
Function 2DH (0x2D or 45) --> Set time
Call with: AH = 2DH
CH = hours (0 through 23)
CL = minutes (0 through 59)
DH = seconds (0 through 59)
DL = hundredths of seconds (0 through 99)
Returns: AL = 00H, if time set successfully
FFH, if time not valid (ignored)
Comments:
This function initializes the system real-time clock to a specified hour, minute, second, and hundredth of second. The system date is not affected.
INT 21H (0x21)
Function 2EH (0x2E or 46) --> Set verify flag
Call with: AH = 2EH
AL = 00H, if turning off verify flag
01H, if turning on verify flag
DL = 00H
Returns: Nothing
Comments:
This function turns off or turns on the operating-system flag for automatic read-after-write verification of data. The default setting of the verify flag is OFF because read-after-write verification slows disk operations.
INT 21H (0x21)
Function 2FH (0x2F or 47) --> Get DTA address
Call with: AH = 2FH
Returns: ES: BX = segment: offset of disk transfer area
Comments:
This function obtains the current address of the disk transfer area (DTA) for FCB file read/write operations.
INT 21H (0x21)
Function 30H (0x30 or 48) --> Get MS-DOS version number
Call with: AH = 30H
AL = 00H
Returns: AL = major version number (MS-DOS
3.10=3, etc.)
AH = minor version number (MS-DOS
3.10= 0AH, etc.)
BH = Original Equipment Manufacturer’s
(OEM’s) serial number (OEM-
dependent-usually 00H for IBM’s
PC-DOS, 0FFH or other values for
MS-DOS)
BL: CX = 24-bit user serial number (optional,
OEM-dependent)
Comments:
It returns the version number of the host MS-DOS operating system.
INT 21H (0x21)
Function 31H (0x31 or 49) --> Terminate and Stay Resident (TSR)
Call with: AH = 31H
AL = return code
DX = amount of memory in paragraphs, to
reserve
Returns Nothing
Comments:
This function terminates the execution of the currently executing program by passing a return code to the parent process but reserves part or all of the memory of the program so that it will be overlaid by the next transient program to be loaded. This function should be used in preference to INT 27H because it supports CS to contain the segment of the program segment prefix.
|