[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
INT 21 U - DOS 3.0+ internal - GET ADDRESS OF DOS SWAPPABLE DATA AREA
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
SeeAlso: 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
00h BYTE critical error flag
01h BYTE InDOS flag (count of active INT 21 calls)
02h BYTE drive on which current critical error occurred, or FFh
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 ???
28h BYTE INT 24 returned Fail
29h BYTE bit flags for allowable actions on INT 24
2Ah BYTE ??? flag
2Bh BYTE FFh if Ctrl-Break termination, 00h otherwise
2Ch BYTE ??? flag of some kind
2Dh BYTE ??? (doesn't seem to be referenced)
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 working SFT pointer at SDA+2AAh is valid ???
36h BYTE 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
6Ch 22 BYTEs device driver request header
82h BYTE type of PSP copy (00h=simple for INT 21/AH=26h, FFh=make child)
83h BYTE ??? apparently not referenced by kernel
84h 3 BYTEs 24-bit user number (see AH=30h)
87h BYTE OEM number (see AH=30h)
88h 2 BYTEs ???
8Ah 6 BYTEs CLOCK$ transfer record (see AH=52h)
90h BYTE ??? buffer for single-byte I/O functions
91h BYTE ??? apparently not referenced by kernel
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
1C7h 81 BYTEs copy of current directory structure for drive being accessed
218h 11 BYTEs FCB-format filename for device name comparison
223h BYTE unused???
224h 11 BYTEs wildcard destination specification for rename (FCB format)
22Fh 2 BYTEs ???
231h WORD ???
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 mode???
23Ch BYTE ??? flag bits 0 and 4
23Dh BYTE ??? flag or counter
23Eh BYTE ??? flag
23Fh BYTE flag indicating how DOS function was invoked
(00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
240h BYTE ???
241h BYTE ??? flag
242h BYTE flag: 00h if read, 01h if write
243h BYTE drive number for ???
244h BYTE ???
245h BYTE ??? flag or counter
246h BYTE line edit (AH=0Ah) insert mode flag (nonzero = on)
247h BYTE canonicalized filename referred to existing file/dir if FFh
248h BYTE ??? flag or counter
249h BYTE type of process termination (00h-03h) (see AH=4Dh)
24Ah BYTE ??? flag
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
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 ???
25Ch WORD ??? temp
25Eh WORD ??? flag (only low byte referenced)
260h WORD ??? temp
262h BYTE Media ID byte returned by AH=1Bh,1Ch
263h BYTE ??? (doesn't seem to be referenced)
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???
284h WORD ??? relative cluster within file being accessed ???
286h WORD ??? absolute cluster number being accessed ???
288h WORD ??? current sector number
28Ah WORD ??? current cluster number
28Ch WORD ??? current offset in file DIV bytes per sector
28Eh 2 BYTEs ???
290h WORD ??? current offset in file MOD bytes per sector
292h DWORD current offset in file
296h WORD ???
298h WORD ???
29Ah WORD ???
29Ch WORD ???
29Eh WORD ???
2A0h WORD ???
2A2h DWORD number of bytes appended to file
2A6h DWORD pointer to ??? 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
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.3 only---
738h BYTE device driver lookahead flag (see AH=64h)
739h BYTE ??? looks like a drive number
73Ah BYTE ??? flag of some kind
73Ah BYTE ???
See Also:
215D0B
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson