INT 21 U - DOS 4.x only internal - GET DOS SWAPPABLE DATA AREAS
AX = 5D0Bh
Return: CF set on error
AX = error code (see AH=59h)
CF clear if successful
DS:SI -> swappable data area list (see below)
Note:   copying and restoring the swappable data areas allows DOS to be
reentered unless it is in a critical section delimited by calls to
INT 2A/AH=80h and INT 2A/AH=81h,82h
SeeAlso: INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h

Format of DOS 4.x swappable data area list:
Offset  Size    Description
00h    WORD    count of data areas
02h  N BYTEs   "count" copies of data area record
Offset  Size    Description
00h    DWORD   address
04h    WORD    length and type
bit 15 set if swap always, clear if swap in DOS
bits 14-0: length in bytes

Format of DOS 4.0-5.0 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
18h  2 BYTEs   ???
---remainder need only be swapped if in DOS---
1Ah    WORD    value of AX on call to INT 21
1Ch    WORD    PSP segment for sharing/network
1Eh    WORD    network machine number for sharing/network (0000h = us)
20h    WORD    first usable memory block found when allocating memory
22h    WORD    best usable memory block found when allocating memory
24h    WORD    last usable memory block found when allocating memory
26h    WORD    memory size in paragraphs (used only during initialization)
28h    WORD    ???
2Ah    BYTE    ???
2Bh    BYTE    ???
2Ch    BYTE    ???
2Dh    BYTE    ???
2Eh    BYTE    ???
2Fh    BYTE    ??? (doesn't seem to be referenced)
30h    BYTE    day of month
31h    BYTE    month
32h    WORD    year - 1980
34h    WORD    number of days since 1-1-1980
36h    BYTE    day of week (0 = Sunday)
37h    BYTE    ???
38h    BYTE    ???
39h    BYTE    ???
3Ah 30 BYTEs   device driver request header (see INT 2F/AX=0802h)
58h    DWORD   pointer to device driver entry point (used in calling driver)
5Ch 22 BYTEs   device driver request header
72h 30 BYTEs   device driver request header
90h  6 BYTEs   ???
96h  6 BYTEs   CLOCK$ transfer record (see AH=52h)
9Ch  2 BYTEs   ???
9Eh 128 BYTEs  buffer for filename
11Eh 128 BYTEs  buffer for filename
19Eh 21 BYTEs   findfirst/findnext search data block (see AH=4Eh)
1B3h 32 BYTEs   directory entry for found file
1D3h 88 BYTEs   copy of current directory structure for drive being accessed
22Bh 11 BYTEs   FCB-format filename for device name comparison
236h    BYTE    ???
237h 11 BYTEs   wildcard destination specification for rename (FCB format)
242h  2 BYTEs   ???
244h    WORD    ???
246h  5 BYTEs   ???
24Bh    BYTE    extended FCB file attributes
24Ch    BYTE    type of FCB (00h regular, FFh extended)
24Dh    BYTE    directory search attributes
24Eh    BYTE    file open mode
24Fh    BYTE    ??? flag bits
250h    BYTE    ??? flag or counter
251h    BYTE    ??? flag
252h    BYTE    flag indicating how DOS function was invoked
(00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
253h    BYTE    ???
254h    BYTE    ???
255h    BYTE    ???
256h    BYTE    ???
257h    BYTE    ???
258h    BYTE    ???
259h    BYTE    ???
25Ah    BYTE    canonicalized filename referred to existing file/dir if FFh
25Bh    BYTE    ???
25Ch    BYTE    type of process termination (00h-03h)
25Dh    BYTE    ???
25Eh    BYTE    ???
25Fh    BYTE    ???
260h    DWORD   pointer to Drive Parameter Block for critical error invocation
264h    DWORD   pointer to stack frame containing user registers on INT 21
268h    WORD    stores SP???
26Ah    DWORD   pointer to DOS Drive Parameter Block for ???
26Eh    WORD    segment of disk buffer
270h    WORD    ???
272h    WORD    ???
274h    WORD    ???
276h    WORD    ???
278h    BYTE    Media ID byte returned by AH=1Bh,1Ch
279h    BYTE    ??? (doesn't seem to be referenced)
27Ah    DWORD   pointer to ???
27Eh    DWORD   pointer to current SFT
282h    DWORD   pointer to current directory structure for drive being accessed
286h    DWORD   pointer to caller's FCB
28Ah    WORD    SFT index to which file being opened will refer
28Ch    WORD    temporary storage for file handle
28Eh    DWORD   pointer to a JFT entry in process handle table (see AH=26h)
292h    WORD    offset in DOS DS of first filename argument
294h    WORD    offset in DOS DS of second filename argument
296h    WORD    ???
298h    WORD    ???
29Ah    WORD    ???
29Ch    WORD    ???
29Eh    WORD    ???
2A0h    WORD    ???
2A2h    WORD    ??? directory cluster number???
2A4h    DWORD   ???
2A8h    DWORD   ???
2ACh    WORD    ???
2AEh    DWORD   offset in file???
2B2h    WORD    ???
2B4h    WORD    bytes in partial sector
2B6h    WORD    number of sectors
2B8h    WORD    ???
2BAh    WORD    ???
2BCh    WORD    ???
2BEh    DWORD   number of bytes appended to file
2C2h    DWORD   pointer to ??? disk buffer
2C6h    DWORD   pointer to ??? SFT
2CAh    WORD    used by INT 21 dispatcher to store caller's BX
2CCh    WORD    used by INT 21 dispatcher to store caller's DS
2CEh    WORD    temporary storage while saving/restoring caller's registers
2D0h    DWORD   pointer to prev call frame (offset 264h) if INT 21 reentered
also switched to for duration of INT 24
2D4h    WORD    open mode/action for INT 21/AX=6C00h
2D6h    BYTE    ??? (set to 00h by INT 21h dispatcher, 02h when a read is
performed, and 01h or 03h by INT 21/AX=6C00h)
2D7h    WORD    ??? apparently unused
2D9h    DWORD   stored ES:DI for AX=6C00h
2DDh    WORD    extended file open action code (see AX=6C00h)
2DFh    WORD    extended file open attributes (see AX=6C00h)
2E1h    WORD    extended file open file mode (see AX=6C00h)
2E3h    DWORD   pointer to filename to open (see AX=6C00h)
2E7h    WORD    ???
2E9h    WORD    ???
2EBh    BYTE    ???
2ECh    WORD    stores DS during call to [List-of-Lists + 37h]
2EEh    WORD    ???
2F0h    BYTE    ???
2F1h    WORD    ??? bit flags
2F3h    DWORD   pointer to user-supplied filename
2F7h    DWORD   pointer to ???
2FBh    WORD    stores SS during call to [List-of-Lists + 37h]
2FDh    WORD    stores SP during call to [List-of-Lists + 37h]
2FFh    BYTE    flag, nonzero if stack switched in calling [List-of-Lists+37h]
300h 21 BYTEs   FindFirst search data for source file(s) of a rename operation
(see AH=4Eh)
315h 32 BYTEs   directory entry for file being renamed
335h 331 BYTEs  critical error stack
480h 384 BYTEs  disk stack (functions greater than 0Ch, INT 25,INT 26)
600h 384 BYTEs  character I/O stack (functions 01h through 0Ch)
780h    BYTE    device driver lookahead flag (see AH=64h)
781h    BYTE    ??? looks like a drive number
782h    BYTE    ??? flag of some kind
783h    BYTE    ???
784h    WORD    ???
786h    WORD    ???
788h    WORD    ???
78Ah    WORD    ???

See also: 215D06

215D0B - DOS 4.x only internal - GET DOS SWAPPABLE DATA AREAS