Specifications

MICROPROCESSADORES
INTERRUPÇÕES
5
Luís Miguel Charrua Figueiredo 5 - 24 E.N.I.D.H.
BUG: Novell DOS 7 SHARE v1.00 would refuse file access in the cases in
#01403 marked with [1] (read-only open of a read-only file which had previously
been opened in compatibility mode); this was fixed in SHARE v1.01 of 09/29/94
SeeAlso
: AH=0Fh,AH=3Ch,AX=4301h,AX=5D00h,INT 2F/AX=1116h,INT
2F/AX=1226h
Bitfields for access and sharing modes:
Bit(s) Description (Table 01402)
2-0 access mode
000 read only
001 write only
010 read/write
011 (DOS 5+ internal) passed to redirector on EXEC to allow
case-sensitive filenames
3 reserved (0)
6-4 sharing mode (DOS 3.0+) (see #01403)
000 compatibility mode
001 "DENYALL" prohibit both read and write access by others
010 "DENYWRITE" prohibit write access by others
011 "DENYREAD" prohibit read access by others
100 "DENYNONE" allow full access by others
111 network FCB (only available during server call)
7 inheritance
if set, file is private to current process and will not be inherited
by child processes
SeeAlso
: #01782,#01403
(Table 01403)
Values of DOS 2-6.22 file sharing behavior:
| Second and subsequent Opens
First |Compat Deny Deny Deny Deny
Open | All Write Read None
|R W RW R W RW R W RW R W RW R W RW
- - - - -| - - - - - - - - - - - - - - - - -
Compat R |Y Y Y N N N 1 N N N N N 1 N N
W |Y Y Y N N N N N N N N N N N N
RW|Y Y Y N N N N N N N N N N N N
- - - - -|
Deny R |C C C N N N N N N N N N N N N
All W |C C C N N N N N N N N N N N N
RW|C C C N N N N N N N N N N N N
- - - - -|
Deny R |2 C C N N N Y N N N N N Y N N
Write W |C C C N N N N N N Y N N Y N N
RW|C C C N N N N N N N N N Y N N
- - - - -|
Deny R |C C C N N N N Y N N N N N Y N
Read W |C C C N N N N N N N Y N N Y N
RW|C C C N N N N N N N N N N Y N
- - - - -|
Deny R |2 C C N N N Y Y Y N N N Y Y Y
None W |C C C N N N N N N Y Y Y Y Y Y
RW|C C C N N N N N N N N N Y Y Y
Legend
: Y = open succeeds, N = open fails with error code 05h
C = open fails, INT 24 generated
1 = open succeeds if file read-only, else fails with error code
2 = open succeeds if file read-only, else fails with INT 24
SeeAlso
: #01636,#01404
(Table 01404)
Values for DOS 7.x file sharing behavior:
| Second and subsequent Opens
First |Compat Deny Deny Deny Deny
Open | All Write Read None
|R W RW A R W RW A R W RW A R W RW A R W RW A
- - - - -| - - - - - - - - - - - - - - - - - - - - - - - -
Compat R |Y Y Y Y N N N N Y N N Y N N N Y Y N N Y
W |Y Y Y C N N N N N N N N N N N Y Y N N Y
RW|Y Y Y C N N N N N N N N N N N Y Y N N Y
NA|Y C C Y N N N N Y N N Y N N N Y Y N N Y
- - - - -|
Deny R |C C C C N N N N N N N N N N N N N N N N
All W |C C C C N N N N N N N N N N N N N N N N
RW|C C C C N N N N N N N N N N N N N N N N
NA|C C C C N N N N N N N N N N N N N N N N
- - - - -|
Deny R |Y C C Y N N N N Y N N Y N N N Y Y N N Y
Write W |C C C C N N N N N N N N Y N N Y Y N N Y
RW|C C C C N N N N N N N N N N N Y Y N N Y
NA|Y C C Y N N N N Y N N Y N N N Y Y N N Y
- - - - -|
Deny R |C C C C N N N N N Y N N N N N N N Y N N
Read W |C C C C N N N N N N N N N Y N N N Y N N
RW|C C C C N N N N N N N N N N N N N Y N N
NA|Y Y Y Y N N N N Y Y Y Y N N N Y Y Y Y Y
- - - - -|
Deny R |Y Y Y Y N N N N Y Y Y Y N N N Y Y Y Y Y
None W |C C C C N N N N N N N N Y Y Y Y Y Y Y Y
RW|C C C C N N N N N N N N N N N Y Y Y Y Y
NA|Y Y Y Y N N N N Y Y Y Y N N N Y Y Y Y Y
Legend
: R -> reading, W -> writing, RW -> both reading & writing,
A/NA -> reading without access time update
Y = open succeeds, N = open fails with error code 05h
C = open fails, INT 24 generated
SeeAlso
: #01403,#01636
INT 21 - DOS 2+ - "CLOSE" - CLOSE FILE
AH = 3Eh
BX = file handle
Return
: CF clear if successful
AX destroyed
CF set on error
AX = error code (06h) (see #01680 at AH=59h/BX=0000h)
Notes
: if the file was written to, any pending disk writes are performed, the
time and date stamps are set to the current time, and the directory entry is
updated recent versions of DOS preserve AH because some versions of Multiplan
had a bug which depended on AH being preserved
SeeAlso
: AH=10h,AH=3Ch,AH=3Dh,INT 2F/AX=1106h,INT 2F/AX=1227h
INT 21 - DOS 2+ - "READ" - READ FROM FILE OR DEVICE
AH = 3Fh
BX = file handle
CX = number of bytes to read
DS:DX -> buffer for data
Return
: CF clear if successful
AX = number of bytes actually read (0 if at EOF before call)
CF set on error
AX = error code (05h,06h) (see #01680 at AH=59h/BX=0000h)
Notes
: data is read beginning at current file position, and the file position is
updated after a successful read the returned AX may be smaller than the request
in CX if a partial read occurred if reading from CON, read stops at first CR under
the FlashTek X-32 DOS extender, the pointer is in DS:EDX
BUG
: Novell NETX.EXE v3.26 and 3.31 do not set CF if the read fails due to
a record lock (see AH=5Ch), though it does return AX=0005h; this has been
documented by Novell
SeeAlso
: AH=27h,AH=40h,AH=93h,INT 2F/AX=1108h,INT 2F/AX=1229h