[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Int 21 Fn 5D06 U - DOS 3.0+ Internal - Get Address Of Dos Swappable Data [D]
AX = 5D06h
Return: CF set on error
AX = error code (see AH=59h)
CF clear if successful
DS:SI -> nonreentrant data area (includes all three DOS stacks)
(critical error flag is first byte)
CX = size in bytes of area which must be swapped while in DOS
DX = size in bytes of area which must always be swapped
Notes: the Critical Error flag is used in conjunction with the InDOS flag
(see AH=34h) to determine when it is safe to enter DOS from a TSR
setting CritErr flag allows use of functions 50h/51h from INT 28h under
DOS 2.x by forcing use of correct stack
swapping the data area allows reentering DOS unless DOS is in a
critical section delimited by INT 2A/AH=80h and INT 2A/AH=81h,82h
under DOS 4.0, AX=5D0Bh should be used instead of this function
SHARE and other DOS utilities consult the byte at offset 04h in the
DOS data segment (see INT 2F/AX=1203h) to determine the SDA format
in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
DR-DOS 3.41+ supports this function, but the SDA format beyond the
first 18h bytes is completely different from MS-DOS
See Also: AX=5D0Bh,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h
Format of DOS 3.10-3.30 Swappable Data Area:
Offset Size Description
-34 BYTE (DOS 3.10+) printer echo flag (00h off, FFh active)
-31 BYTE (DOS 3.30) current switch character
-28 BYTE (DOS 3.30) incremented on each INT 21/AX=5E01h call
-27 16 BYTEs (DOS 3.30) machine name set by INT 21/AX=5E01h
-11 5 WORDs zero-terminated list of offsets which need to be patched to
enable critical-section calls (see INT 2A/AH=80h)
-1 BYTE unused padding
---start of actual SDA---
00h BYTE critical error flag ("ErrorMode")
01h BYTE InDOS flag (count of active INT 21 calls)
02h BYTE drive on which current critical error occurred, or FFh
(DR-DOS sets to drive number during INT 24, 00h otherwise)
03h BYTE locus of last error
04h WORD extended error code of last error
06h BYTE suggested action for last error
07h BYTE class of last error
08h DWORD ES:DI pointer for last error
0Ch DWORD current DTA
10h WORD current PSP
12h WORD stores SP across an INT 23
14h WORD return code from last process termination (zerod after reading
with AH=4Dh)
16h BYTE current drive
17h BYTE extended break flag
---remainder need only be swapped if in DOS---
18h WORD value of AX on call to INT 21
1Ah WORD PSP segment for sharing/network
1Ch WORD network machine number for sharing/network (0000h = us)
1Eh WORD first usable memory block found when allocating memory
20h WORD best usable memory block found when allocating memory
22h WORD last usable memory block found when allocating memory
24h WORD memory size in paragraphs (used only during initialization)
26h WORD last entry checked during directory search
28h BYTE flag: INT 24 returned Fail
29h BYTE flags: allowable INT 24 actions (passed to INT 24 in AH)
2Ah BYTE directory flag (00h directory, 01h file)
2Bh BYTE flag: FFh if Ctrl-Break termination, 00h otherwise
2Ch BYTE flag: allow embedded blanks in FCB
2Dh BYTE padding (unused)
2Eh BYTE day of month
2Fh BYTE month
30h WORD year - 1980
32h WORD number of days since 1-1-1980
34h BYTE day of week (0 = Sunday)
35h BYTE flag: console swapped during read from device
36h BYTE flag: safe to call INT 28 if nonzero
37h BYTE flag: if nonzero, INT 24 Abort turned into INT 24 Fail
(set only during process termination)
38h 26 BYTEs device driver request header (see INT 2F/AX=0802h)
52h DWORD pointer to device driver entry point (used in calling driver)
56h 22 BYTEs device driver request header for I/O calls
6Ch 14 BYTEs device driver request header for disk status check
7Ah DWORD pointer to device I/O buffer???
7Eh WORD ???
80h WORD ???
82h BYTE type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
83h BYTE padding (unused)
84h 3 BYTEs 24-bit user number (see AH=30h)
87h BYTE OEM number (see AH=30h)
88h WORD offset to error code conversion table for INT 25/INT 26
8Ah 6 BYTEs CLOCK$ transfer record (see AH=52h)
90h BYTE device I/O buffer for single-byte I/O functions
91h BYTE padding??? (unused)
92h 128 BYTEs buffer for filename
112h 128 BYTEs buffer for filename
192h 21 BYTEs findfirst/findnext search data block (see AH=4Eh)
1A7h 32 BYTEs directory entry for found file (see AH=11h)
1C7h 81 BYTEs copy of current directory structure for drive being accessed
218h 11 BYTEs FCB-format filename for device name comparison
223h BYTE terminating NUL for above filename
224h 11 BYTEs wildcard destination specification for rename (FCB format)
22Fh BYTE terminating NUL for above spec
230h BYTE ???
231h WORD destination file/directory starting sector
233h 5 BYTEs ???
238h BYTE extended FCB file attribute
239h BYTE type of FCB (00h regular, FFh extended)
23Ah BYTE directory search attributes
23Bh BYTE file open/access mode
23Ch BYTE file found/delete flag
bit 0: file found
bit 4: file deleted
23Dh BYTE flag: device name found on rename, or file not found
23Eh BYTE splice flag (file name and directory name together)
23Fh BYTE flag indicating how DOS function was invoked
(00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
240h BYTE sector position within cluster
241h BYTE flag: translate sector/cluster (00h no, 01h yes)
242h BYTE flag: 00h if read, 01h if write
243h BYTE current working drive number
244h BYTE cluster factor
245h BYTE flag: cluster split mode
246h BYTE line edit (AH=0Ah) insert mode flag (nonzero = on)
247h BYTE canonicalized filename referred to existing file/dir if FFh
248h BYTE volume ID flag
249h BYTE type of process termination (00h-03h) (see AH=4Dh)
24Ah BYTE file create flag (00h = no)
24Bh BYTE value with which to replace first byte of deleted file's name
(normally E5h, but 00h as described under INT 21/AH=13h)
24Ch DWORD pointer to Drive Parameter Block for critical error invocation
temp: used during process termination
250h DWORD pointer to stack frame containing user registers on INT 21
254h WORD stores SP across INT 24
256h DWORD pointer to DOS Drive Parameter Block for ???
25Ah WORD saving partial cluster number
25Ch WORD temp: sector of work current cluster
25Eh WORD high part of cluster number (only low byte referenced)
260h WORD ??? temp
262h BYTE Media ID byte returned by AH=1Bh,1Ch
263h BYTE padding (unused)
264h DWORD pointer to device header
268h DWORD pointer to current SFT
26Ch DWORD pointer to current directory structure for drive being accessed
270h DWORD pointer to caller's FCB
274h WORD number of SFT to which file being opened will refer
276h WORD temporary storage for file handle
278h DWORD pointer to a JFT entry in process handle table (see AH=26h)
27Ch WORD offset in DOS DS of first filename argument
27Eh WORD offset in DOS DS of second filename argument
280h WORD offset of last component in pathname or FFFFh
282h WORD offset of transfer address to add
284h WORD last relative cluster within file being accessed
286h WORD temp: absolute cluster number being accessed
288h WORD directory sector number
28Ah WORD ??? current cluster number
28Ch WORD ??? current offset in file DIV bytes per sector
28Eh WORD current sector number
290h WORD current byte offset within sector
292h DWORD current offset in file
296h DWORD temp: file byte count
29Ah WORD temp: file byte count
29Ch WORD free file cluster entry
29Eh WORD last file cluster entry
2A0h WORD next file cluster number
2A2h DWORD number of bytes appended to file
2A6h DWORD pointer to current work disk buffer
2AAh DWORD pointer to working SFT
2AEh WORD used by INT 21 dispatcher to store caller's BX
2B0h WORD used by INT 21 dispatcher to store caller's DS
2B2h WORD temporary storage while saving/restoring caller's registers
2B4h DWORD pointer to prev call frame (offset 250h) if INT 21 reentered
also switched to for duration of INT 24
2B8h 21 BYTEs FindFirst search data for source file(s) of a rename operation
(see AH=4Eh)
2CDh 32 BYTEs directory entry for file being renamed (see AH=11h for format)
2EDh 331 BYTEs critical error stack
403h 35 BYTEs scratch SFT
438h 384 BYTEs disk stack (functions greater than 0Ch, INT 25,INT 26)
5B8h 384 BYTEs character I/O stack (functions 01h through 0Ch)
---DOS 3.2,3.3x only---
738h BYTE device driver lookahead flag (usually printer) (see AH=64h)
739h BYTE volume change flag
73Ah BYTE flag: virtual open
73Bh BYTE ???
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson