INT 21 OU - DOS 4.x only - internal - GET DOS SWAPPABLE DATA AREAS              
	AX = 5D0Bh
Return: CF set on error
	    AX = error code (see #01680)
	CF clear if successful
	    DS:SI -> swappable data area list (see #01689)
Notes:	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
	SHARE and other DOS utilities consult the byte at offset 04h in the
	  DOS data segment (see INT 2F/AX=1203h) to determine the SDAsee Swappable Data Area format
	  in use: 00h = DOS 3.x, 01h = DOS 4.0-6.0, other = error.
	DOS 5+ use the SDAsee Swappable Data Area format listed below, but revert back to the DOS 3.x
	  call for finding the SDAsee Swappable Data Area (see #01687); Novell DOS 7 does not support
	  this function, either.
SeeAlso: AX=5D06h,INT 2A/AH=80h,INT 2A/AH=81h,INT 2A/AH=82h,INT 2F/AX=1203h


Format of DOS 4.x swappable data area list:
Offset	Size	Description	(Table 01689)
 00h	WORD	count of data areas
 02h  N BYTEs	"count" copies of data area record
		Offset	Size	Description
		 00h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	address
		 04h	WORD	length and type
				bit 15 set if swap always, clear if swap in DOS
				bits 14-0: length in bytes
SeeAlso: #01690


Format of DOS 4.0-6.0 swappable data area:
Offset	Size	Description	(Table 01690)
 -34	BYTE	printer echo flag (00h off, FFh active)
 -31	BYTE	current switch character (ignored by DOS 5+)
 -30	BYTE	current memory allocation strategy (see AH=58h)
 -28	BYTE	incremented on each INT 21/AX=5E01h call
 -27 16 BYTEs	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)
		(all offsets are 0D0Ch, but this list is still present for
		  DOS 3.x compatibility)
 -1	BYTE	unused padding
Note:	the above data is not actually part of the SDAsee Swappable Data Area, and is much more likely
	  to change between DOS versions/OEMs than data in the SDAsee Swappable Data Area itself
---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 3.41/5.0 set this to 00h when no critical error)
 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	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	ES:DI pointer for last error
 0Ch	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	current DTAsee Disk Transfer Address (Disk Transfer AddressThe Disk Transfer Address indicates where functions which do not take an explicit data address will read or store data.  Although the name implies that only disk accesses use this address, other functions use it as well.  See INT 21h Function 4Eh for an example of the DTA's use.)
		note: may point into SDAsee Swappable Data Area during the DOS EXEC function
		  (see AH=4Bh), so programs which swap the SDAsee Swappable Data Area must be
		  prepared to move the DTAsee Disk Transfer Address to a private buffer if they
		  might be invoked during an EXEC
 10h	WORD	current PSPsee Program Segment Prefix
 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	BYTE	flag: code page switching
 19h	BYTE	flag: copy of previous byte in case of INT 24 Abort
---remainder need only be swapped if in DOS---
 1Ah	WORD	value of AX on call to INT 21
		Note:	does not contain correct value on functions 00h-0Ch,
			  50h, 51h, 59h, or 62h			
 1Ch	WORD	PSPsee Program Segment Prefix segment for sharing/network (0000h = local)
 1Eh	WORD	network machine number for sharing/network (0000h = local)
 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	last entry checked during directory search
 2Ah	BYTE	flag: nonzero if INT 24 Fail
 2Bh	BYTE	flags: allowable INT 24 responses (passed to INT 24 in AH)
 2Ch	BYTE	flag: do not set directory if nonzero
 2Dh	BYTE	flag: program aborted by ^C
 2Eh	BYTE	flag: allow embedded blanks in FCBsee File Control Block
		may also allow use of "*" wildcard in FCBs
 2Fh	BYTE	padding (unused)
 30h	BYTE	day of month
 31h	BYTE	month
 32h	WORD	year - 1980
 34h	WORD	number of days since 01jan1980
 36h	BYTE	day of week (0 = Sunday)
 37h	BYTE	flag: console swapped during read from device
 38h	BYTE	flag: safe to call INT 28 if nonzero
 39h	BYTE	flag: abort currently in progress, turn INT 24 Abort into Fail
 3Ah 30 BYTEs	device driver request header (see #02597 at INT 2F/AX=0802h) for
		  device calls
 58h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to device driver entry point (used in calling driver)
 5Ch 22 BYTEs	device driver request header for I/O calls
 72h 14 BYTEs	device driver request header for disk status check (also
		  includes following eight bytes for some calls)
 80h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to device I/O buffer
 84h	WORD	part of request header at 72h
 86h	WORD	part of request header at 72h (0)
 88h	BYTE	type of PSPsee Program Segment Prefix copy (00h=simple for INT 21/AH=26h, FFh=make child)
 89h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	start offset of file region to lock/unlock
 8Dh	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	length of file region to lock/unlock
 91h	BYTE	padding (unused)
 92h  3 BYTEs	24-bit user number (see AH=30h)
 95h	BYTE	OEM(Original Equipment Manufacturer) a company which purchases components that are resold as part of its own products under the company's own brand name, e.g. a Gateway 2000-branded monitor may actually be a Mag or NEC monitor. number (see #01394 at AH=30h)
 96h  6 BYTEs	CLOCK$ transfer record (see #01688 at AX=5D06h)
 9Ch	BYTE	device I/O buffer for single-byte I/O functions
 9Dh	BYTE	padding
 9Eh 128 BYTEs	buffer for filename
11Eh 128 BYTEs	buffer for filename (rename destination name)
19Eh 21 BYTEs	findfirst/findnext search data block (see #01626 at AH=4Eh)
1B3h 32 BYTEs	directory entry for found file (see #01394 at AH=11h)
1D3h 88 BYTEs	copy of current directory structure for drive being accessed
22Bh 11 BYTEs	FCB-format filename for device name comparison
236h	BYTE	terminating NUL for above filename
237h 11 BYTEs	wildcard destination specification for rename (FCBsee File Control Block format)
242h	BYTE	terminating NUL for above filespec
243h	BYTE	padding???
244h	WORD	destination starting sector (cluster???)
246h  5 BYTEs	extra space to allow a directory entry to be stored starting
		  at offset 22Bh
24Bh	BYTE	extended FCBsee File Control Block file attributes
24Ch	BYTE	type of FCBsee File Control Block (00h regular, FFh extended)
24Dh	BYTE	directory search attributes
24Eh	BYTE	file open/access mode
24Fh	BYTE	flag: nonzero if file was deleted
250h	BYTE	flag: device name found on rename, or file not found
251h	BYTE	flag: splice file name and directory name together
252h	BYTE	flag indicating how DOS function was invoked
		(00h = direct INT 20/INT 21, FFh = server call AX=5D00h)
253h	BYTE	sector position within cluster
254h	BYTE	flag: translating sector/cluster
255h	BYTE	flag: 00h if read, 01h if write
256h	BYTE	current working drive number
257h	BYTE	cluster factor
258h	BYTE	"sda_CLUSSPLIT" flag: cluster split between two FATsee File Allocation Table sectors
259h	BYTE	line edit (AH=0Ah) insert mode flag (nonzero = on)
25Ah	BYTE	canonicalized filename referred to existing file/dir if FFh
25Bh	BYTE	volume ID flag
25Ch	BYTE	type of process termination (00h-03h) (see AH=4Dh)
25Dh	BYTE	unused (padding for alignment)
25Eh	BYTE	file create flag (00h = no, search only)
25Fh	BYTE	value for deleted file's first byte: 00h to delete all, else E5
260h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to Drive Parameter BlockThe DOS Drive Parameter Block stores the description of the media layout for a logical drive, as well as some housekeeping information.  See also INT 21h Function 1Fh and INT 21h Function 32h. for critical error invocation
264h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to stack frame containing user registers on INT 21
268h	WORD	stores SP across INT 24
26Ah	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to DOS Drive Parameter BlockThe DOS Drive Parameter Block stores the description of the media layout for a logical drive, as well as some housekeeping information.  See also INT 21h Function 1Fh and INT 21h Function 32h. for ???
26Eh	WORD	segment of disk buffer
270h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	saving partial cluster number
274h	WORD	"sda_PREREAD" 00h if preread, 01h if optional
276h	WORD	temporary used in allocating disk space
278h	BYTE	Media ID byte returned by AH=1Bh,1Ch
279h	BYTE	unused
27Ah	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to device header if filename is character device
27Eh	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to current SFTsee System File Table
282h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to current directory structure for drive being accessed
286h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to caller's FCBsee File Control Block
28Ah	WORD	SFTsee System File Table index to which file being opened will refer
28Ch	WORD	temporary storage for file handle
28Eh	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to JFTsee Job File Table entry (for file being opened) in process handle
		  table (see #01378 at AH=26h)
292h	WORD	"sda_WFP_START" offset in DOS DS of first filename argument
294h	WORD	"sda_REN_WFP" offset in DOS DS of second filename argument
296h	WORD	offset of last component in pathname or FFFFh
298h	WORD	offset of transfer address to add
29Ah	WORD	last relative cluster within file being accessed
29Ch	WORD	temp: absolute cluster number being accessed
29Eh	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	directory sector number
2A2h	WORD	directory cluster number
2A4h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	current relative sector number within file
2A8h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	current sector number (number of previously written sectors)
2ACh	WORD	current byte offset within sector
2AEh	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	current offset in file
2B2h	WORD	number of bytes in first sector
2B4h	WORD	bytes in partial last sector
2B6h	WORD	number of whole sectors
2B8h	WORD	free file cluster entry
2BAh	WORD	last file cluster entry
2BCh	WORD	next file cluster number
2BEh	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	number of bytes appended to file
2C2h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to current work disk buffer
2C6h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to working SFTsee System File Table
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	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	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	extended open conditional flag
		set to 00h by INT 21h dispatcher, 02h when a read is
		  performed, and 01h or 03h by INT 21/AX=6C00h
2D7h	WORD	extended open I/O mode
2D9h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	stored ES:DI for AX=6C00h
2DDh	WORD	extended file open action code (see #01770 at AX=6C00h)
2DFh	WORD	extended file open attributes (see #01769 at AX=6C00h)
2E1h	WORD	extended file open file mode (see AX=6C00h)
2E3h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to filename to open (see AX=6C00h)
2E7h	WORD	high word of 32-bit sector number, or temp data buffer size
		   from disk buffer
2E9h	WORD	"sda_OffsetMagicPatch"
2EBh	BYTE	disk full on >32M partition when set to 01h
2ECh	WORD	stores DS during call to [List-of-Lists + 37h]
2EEh	WORD	temporary storage (various uses)
2F0h	BYTE	storage for drive error
2F1h	WORD	DOS 3.4 (European MS-DOS 4.00) bit flags
2F3h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to user-supplied filename
2F7h	DWORDDoubleword; four bytes.	 Commonly used to hold a 32-bit segment:offset or selector:offset address.	pointer to user-supplied rename destination filename
2FBh	WORD	stores SS during call to [List-of-Lists + 37h] and INT 25,26 
2FDh	WORD	stores SP during call to [List-of-Lists + 37h] and INT 25,26
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 #01626 at AH=4Eh)
315h 32 BYTEs	directory entry for file being renamed (see #01352 at AH=11h)
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 (usually printer)
		(see AH=64h"DOS 3.2+")
781h	BYTE	volume change flag
782h	BYTE	flag: virtual file open
783h	BYTE	fastseek drive
784h	WORD	fastseek first cluster number
786h	WORD	fastseek logical cluster number
788h	WORD	fastseek returned logical cluster number
78Ah	WORD	temporary location of DOS@SYSINIT
---MSDOS 7.1+ (FAT32)---
78Ch 47 BYTEs	???
7BBh	BYTE	flag: absolute disk read/write type
		00h = INT 25/INT 26
		01h = INT 21/AX=7305h
7BCh	WORD	high word of directory cluster number at offset 2A2h
7BEh	WORD	high word of cluster number at offset 29Ch
7C0h	WORD	high word of next file cluster number at offset 2BCh
7C2h	WORD	high word of last relative cluster number at offset 29Ah
7C4h	WORD	high word of temp at offset 276h
7C6h	WORD	high word of offset 244h
7C8h	WORD	high word of EBX
7CAh	WORD	high word of EDX used by "PACK"
7CCh	WORD	high word of EDI used by "UNPACK"
7CEh	WORD	high word of EBX used by "SETDIRSRCH"
7D0h	WORD	high word of ECX used by "FREECLUSTER"
7D2h	WORD	high word of EDI used by "GETEOF"
7D4h  3 WORDs	???
Note:	the only fields which remain valid BETWEEN calls to INT 21h are those
	  in the initial "swap-always" portion of the SDAsee Swappable Data Area
SeeAlso: #01687,#01689