INT 21H (0x21)
Function 5FH (0x5F or 95), sub function 03H (0x03) --> Redirect device
Call with: AH = 5FH
AL = 03H
BL = device type
03H, if printer
04H, if drive
DS: SI = segment: offset of ASCIIZ local
device name
ES: DI = segment: offset of ASCIIZ network
name, followed by ASCIIZ password
Returns: If function successful
Carry flag = clear
If function unsuccessful
Carry flag = set
AX = error code
Comments:
Establishes redirection across the network by associating a local device name with a network name. This function call is only available when Microsoft Networks is running and the file-sharing module (SHARE.EXE) has been loaded.
INT 21H (0x21)
Function 5FH (0x5F or 95), sub function 04H (0x04) --> Cancel device redirection
Call with: AH = 5FH
AL = 04H
DS: SI = segment: offset of ASCIIZ local
device name
Returns: If function successful
Carry flag = clear
If function unsuccessful
Carry flag = set
AX = error code
Comments:
This sub function cancels a previous redirection request by removing the association of a local device name with a network name. This function call is only available when Microsoft Networks is running and the file-sharing module such as SHARE.EXE has been loaded.
INT 21H (0x21)
Function 60H (0x60 or 96) --> Reserved
INT 21H (0x21)
Function 61H (0x61 or 97) --> Reserved
INT 21H (0x21)
Function 62H (0x62 or 98) --> Get Program Segment Prefix (PSP) address
Call with: AH = 62H
Returns: BX = segment address of program segment
prefix
Comments:
This function obtains the segment (paragraph) address of the Program Segment Prefix (PSP) for the currently executing program.
INT 21H (0x21)
Function 64H (0x64 or 100) --> Reserved
INT 21H
Function 65H (0x65 or 101) --> Get extended country Information
Call with: AH = 65H
AL = sub function
00H = Get General
Internationalization Information
02H = Get Pointer to Uppercase
Table
04H = Get Pointer to Filename
Uppercase Table
06H = Get Pointer to Collating Table
07H = Get Pointer to Double-Byte
Character Set (DBCS) Vector
BX = code page of interest (-1 = active
CON device)
CX = length of buffer to receive
information (must be >=5)
DX = country ID (-1 = default)
ES: DI = address of buffer to receive
information
Returns: If function successful
Carry flag = clear
And requested data placed in calling program’s buffer
If function unsuccessful
Carry flag = set
AX = error code
Comments:
This obtains information about the specified country and/or code page. Refer internationalization table given before to know about information bytes.
INT 21H (0x21)
Function 66H (0x66 or 102) --> Get or set code page
Call with: AH = 66H
AL = sub function
01H = Get Code Page
02H = Select Code Page
BX = code page to select, if AL = 02H
Returns: If function is successful
Carry flag = clear
And, if called with AL = 01H
BX = active code page
DX = default code page
If function is unsuccessful
Carry flag = set
AX = error code
Comments:
This function obtains or selects the current code page.
INT 21H (0x21)
Function 67H (0x67 or 103) --> Set handle count
Call with: AH = 67H
BX = number of desired handles
Returns: If function is successful
Carry flag = clear
If function is unsuccessful
Carry flag = set
AX = error code
Comments:
This function sets the maximum number of files and devices that may be opened simultaneously using handles by the current process.
INT 21H (0x21)
Function 68H (0x68 or 104) --> Commit file
Call with: AH = 68H
BX = handle
Returns: If function successful
Carry flag = clear
If function unsuccessful
Carry flag = set
AX = error code
Comments:
This function forces all data in internal buffers of MS DOS associated with a specified handle to be physically written to the device. If the handle refers to a file, and the file has been modified, the time and date stamp and file size in the root directory entry of file, are updated.
INT 21H (0x21)
Function 69H (0x69 or 105) --> Reserved
INT 21H (0x21)
Function 6AH (0x6A or 106) --> Reserved
INT 21H (0x21)
Function 6BH (0x6B or 107) --> Reserved
INT 21H (0x21)
Function 6CH (0x6C or 108) --> Extended open file
Call with: AH = 6CH
AL = 00H
BX = open mode
Bit(s) |
Significance |
0-2 |
Access type
000 = read-only
001 = write-only
010 = read/write |
3 |
Reserved (0) |
4-6 |
Sharing mode
000 = compatibility
001 = deny read/write (deny all)
010 = deny write
011 = deny read
100 = deny none |
7 |
Inheritance
0 = child process inherits handle
1 = child does not inherit handle |
8-12 |
Reserved (0) |
13 |
Critical error handling
0 = execute INT 24H
1 = return error to process |
14 |
Write-through
0 = writes may be buffered and deferred
1 = physical write at request time |
15 |
Reserved (0) |
CX = file attribute (bits may be combined;
if ignored if openrefer Bits Significance table.
DX = open flag
Bit(s) |
Significance |
0-3 |
Action if file exists
0000 = fail
0001 = open file
0010 = replace file |
4-7 |
Action if file does not exists
0000 = fail
0001 = create file |
8-15 |
Reserved (0) |
DS: SI = segment: offset of ASCIIZ pathname
Returns: If function successful
Carry flag = clear
AX = handle
CX = action taken
1 = file existed and was
opened
2 = file did not exists and
was created
3 = file existed and was
replaced
If function unsuccessful
Carry flag = set
AX = error code
Comments:
This function opens, creates or replaces a file in the designated or default directory on the designated or default disk drive for a given ASCIIZ pathname and returns a handle that can be used by the program for subsequent access to the file.
If any element of the pathname does not exist or the file is being created in the root directory and the root directory is full or the file is being created and a file with the same name and the read-only attribute already exists in the specified directory or the user has insufficient access rights, the function fails.
|