INT 21H (0x21)
Function 57H (0x57 or 87) --> Get or set file date
and time
Call with: If getting date and time
AH = 57H
AL = 00H
BX = handle
If setting date and time
AH = 57H
AL = 01H
BX = handle
CX = time
bits 00H-04H = 2-second increments (0-29)
bits 05H-0AH = minutes (0-59)
bits 0BH-0FH = hours (0-23)
DX = date
bits 00H-04H = day (1-31)
bits 05H-08H = month (1-12)
bits 09H-0FH = year (relative to 1980)
Returns: If function successful
Carry flag = clear
and, if called with AL = 00H
CX = time
DX = date
If function unsuccessful
Carry flag = set
AX = error code
Comments:
This function obtains or modifies the date and time stamp in the root directory entry of file.
INT 21H (0x21)
Function 58H (0x58 or 88) --> Get or set allocation strategy
Call with: If getting strategy code
AH = 58H
AL = 00H
If setting strategy code
AH = 58H
AL = 01H
BX = desired strategy code
00H = first fit
01H = best fit
02H = last fit
Returns: If function successful
Carry flag = clear
and, if called with AL = 00H
AX = current strategy code
If function unsuccessful
Carry flag = set
AX = error code
Comments:
Obtains or changes the code indicating the current MS-DOS strategy for allocating memory blocks. The default MS-DOS memory allocation strategy is First Fit (code 0).
In the First fit memory allocation, MS-DOS searches the available memory blocks from low address to high address, assigning the first one large enough to satisfy the block allocation request.
In case of Best fit allocation strategy, MS-DOS searches all available memory blocks and assigns the smallest available block that will satisfy the request, regardless of its position.
In the Last fit memory allocation strategy, MS-DOS searches the available memory blocks from high addresses to low addresses, assigning the highest one large enough to satisfy the block allocation request.
INT 21H (0x21)
Function 59H (0x59 or 89) --> Get extended error Information
Call with: AH = 59H
BX = 00H
Returns: AX = extended error code
Table of error codes has been given below:
Error Code |
Error |
01H |
function number invalid |
02H |
file not found |
03H |
path not found |
04H |
too many open files |
05H |
access denied |
06H |
handle invalid |
07H |
memory control blocks destroyed |
08H |
insufficient memory |
09H |
memory block address invalid |
0AH (10) |
environment Invalid |
0BH (11) |
format invalid |
0CH (12) |
access code invalid |
0DH (13) |
data invalid |
0EH (14) |
unknown unit |
0FH (15) |
disk drive invalid |
10H (16) |
attempted to remove current directory |
11H (17) |
not same device |
12H (18) |
no more files |
13H (19) |
disk write-protected |
14H (20) |
unknown unit |
15H (21) |
drive not ready |
16H (22) |
unknown command |
17H (23) |
data error (CRC) |
18H (24) |
bad request structure length |
19H (25) |
seek error |
1AH (26) |
unknown media type |
1BH (27) |
sector not found |
1CH (28) |
printer out of paper |
1DH (29) |
write fault |
1EH (30) |
read fault |
1FH (31) |
general failure |
20H (32) |
sharing violation |
21H (33) |
lock violation |
22H (34) |
disk change invalid |
23H (35) |
FCB unavailable |
24H (36) |
sharing buffer exceeded |
25H-31H |
reserved |
32H (50) |
unsupported network request |
33H (51) |
remote machine not listening |
34H (52) |
duplicate name on network |
35H (53) |
network name not found |
36H (54) |
network busy |
37H (55) |
device no longer exists on network |
38H (56) |
net BIOS command limit exceeded |
39H (57) |
error in network adapter hardware |
3AH (58) |
incorrect response from network |
3BH (59) |
unexpected network error |
3CH (60) |
remote adapter incompatible |
3DH (61) |
print queue full |
3EH (62) |
not enough space for print file |
3FH (63) |
print file canceled |
40H (64) |
network name deleted |
41H (65) |
network access denied |
42H (66) |
incorrect network device type |
43H (67) |
network name not found |
44H (68) |
network name limit exceeded |
45H (69) |
net BIOS session limit exceeded |
46H (70) |
file sharing temporarily paused |
47H (71) |
network request not accepted |
48H (72) |
print or disk redirection paused |
49H-4FH |
reserved |
50H (80) |
file already exists |
51H (81) |
reserved |
52H (82) |
cannot make directory |
53H (83) |
fail on INT 24H (critical error) |
54H (84) |
too many redirections |
55H (85) |
duplicate redirection |
56H (86) |
invalid password |
57H (87) |
invalid parameter |
58H (88) |
network device fault |
59H (89) |
function not supported by network |
5AH (90) |
required system component not installed |
BH = error class
01H |
if out of resource (such as storage or handles) |
02H |
if not error, but temporary situation (such as locked region in file) that can be expected to end |
03H |
if authorization problem |
04H |
if internal error in system software |
05H |
if hardware failure |
06H |
if system software failure not the fault of the active process (such as missing configuration files) |
07H |
if application program error |
08H |
if file or item not found |
09H |
if file or item of invalid type or format |
0AH (10) |
if file or item locked |
0BH (11)
|
if wrong disk in drive, bad spot on disk, or storage medium problem |
0CH (12) |
if item already exists |
0DH (13) |
unknown error |
BL = recommend action
01H |
Retry reasonable number of times, then prompt user to select abort or ignore |
02H |
retry reasonable number of times with delay between retries, then prompt user to select abort or ignore |
03H |
get correct information from user (typically caused by incorrect file name or device specification) |
04H |
abort application with cleanup (i.e., terminate the program in as orderly a manner as possible: releasing locks, closing files, etc.) |
05H |
perform immediate exit without cleanup |
06H |
ignore error |
07H |
retry after user intervention to remove cause of error |
CH = error locus
01H unknown
02H block device (disk or disk
emulator)
03H network
04H serial device
05H memory
ES: DI = ASCIIZ volume label of disk to
insert, if AX = 0022H (invalid disk
change)
Comments:
This function obtains detailed error information after a previous unsuccessful INT 21H function call, including the recommended remedial action.
|