Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Ralf Brown's Interrupt List (Part 1,2) - int 21 - dos 4.x internal - get dos swappable data areas http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INT 21 - DOS 4.x 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: AX=5D06h, INT 2A/AH=80h,81h,82h

Format of 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 PCDOS 4.01 swappable data area:
Offset  Size    Description
 00h    BYTE    critical error flag
 01h    BYTE    InDOS flag (count of active INT 21 calls)
 02h    BYTE    ??? drive number 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  2 BYTEs   ??? (don't seem to be referenced)
 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    ???
 38h 30 BYTEs   device driver request header
 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
236h    BYTE    ???
237h 11 BYTEs   wildcard destination specification for rename (FCB format)
242h  2 BYTEs   ???
244h    WORD    ???
246h  5 BYTEs   ???
24Bh    BYTE    ???
24Ch    BYTE    ???
24Dh    BYTE    attribute mask for directory search???
24Eh    BYTE    ???
24Fh    BYTE    ??? flag bits
250h    BYTE    ???
251h    BYTE    ???
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    ???
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    ???
28Ch    WORD    ???
28Eh    DWORD   pointer to a JFT entry in process handle table (see AH=26h)
292h    WORD    offset in DOS CS of first filename argument
294h    WORD    offset in DOS CS 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    ???
2D6h    BYTE    ???
2D7h    WORD    ???
2D9h    DWORD   pointer to ???
2DDh    WORD    ???
2DFh    WORD    ???
2E1h    WORD    ???
2E3h    DWORD   ???
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    flag affecting AH=08h (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    ???

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson