Int 21 Fn 4402 U - Qualitas 386max V6.00+ - Ioctl Input - Get State (Cont.)

Return: AH = 00h (successful)

Note: enables A20 first
AH = 0Dh specify 386MAX high-memory location
BX = segment address of high-memory real-mode portion of 386MAX
CX = current segment of real-mode stub???

Return: AH = status (00h successful)
???
AH = 0Eh CRT controller register virtualization
AL = subfunction
00h allow access to CRTC I/O ports 03B4h/03B5h, 03D4h/03D5h
01h trap accesses to CRTC I/O ports
AH = 0Fh reboot system

Return: never
AH = 10h unused

Return: AH = 84h (unsupported function)
AH = 11h get high memory information
ES:DI -> 96-byte buffer for high memory info

Return: AH = 00h (successful)
ES:DI buffer filled

Notes: each byte in buffer contains bit flags for a 4K page in
the A000h-FFFFh region
bit 0: page is writeable
bit 1: physical address same as linear address
bit 2: EMS page frame
bit 6: page is part of the QPMS window
this function can take over a second to execute,
because it does a 128K read for each page in an
attempt to flush any RAM cache the system may have
AH = 12h shadow RAM mapping
AL = subfunction
00h unshadow ROMs (except page FFh if NOWARMBOOT set)
01h map shadow RAM into ROM regions???

Return: AH = 00h (successful) if AL=00h or 01h
AH = 8Fh otherwise
AH = 13h shadow RAM page protection
AL = subfunction
00h set all shadowed ROM 4K pages to read-only
01h set all shadowed ROM 4K pages to read-write

Return: AH = 00h (successful) if AL=00h or 01h
AH = 8Fh otherwise
AH = 14h get Programmable Option Select info???
ES:DI -> 54-byte buffer for POS data???

Return: AH = 00h if successful
AH = A4h on error

Note: the buffer consists of nine 6-byte fields; the first
eight for slots 1-8, the last for the system board
AH = 15h ???
???

Return: ???
AH = 16h get 386MAX memory usage screen
ES:DI -> buffer for memory info display
CX = size of buffer in bytes

Return: ES:DI buffer filled with '$'-terminated string (if
large enough to hold entire usage screen)

Note: the screen is 0303h bytes in v7.00
AH = 17h Windows 3 startup/termination
AL = subfunction
00h Windows3 initializing
DX (on stack) = Windows startup flags
DI = Windows version number (major in upper byte)
ES:BX = 0000h:0000h
DS:SI = 0000h:0000h

Return: CX = 0000h if OK for Windows to load
<> 0 if Windows should not load
ES:BX -> startup info structure
DS:SI -> Virtual86 mode enable/disable callback
01h Windows3 terminating
ES:BX -> ???
DX (on stack) = Windows exit flags

Return: ???
AH = 18h QPMS (Qualitas Protected Memory Services)
AL = subfunction
00h get QPMS configuration

Return: BX = starting segment of QPMS memory window
CX = number of 4K pages reserved for QPMS???
DX = number of 4K pages in QPMS window???
01h map QPMS memory page???
BX = 4K page number within memory reserved for QPMS???
CL = 4K page number within QPMS memory window???
02h mark all QPMS memory read-only
03h mark all QPMS memory read-write

Return: AH = status (00h,8Ah,8Bh,8Fh)
AH = 19h get linear address for physical address
EDX = physical address (low word on stack)

Return: AH = status
00h successful
EDX = linear address at which physical address
may be accessed
8Bh physical address currently not addressable

Note: enables A20 first
AH = 1Ah set page table entry
EDX = new page table entry (low word on stack)
ESI = linear address of page to map (bits 0-11 clear)

Return: AH = status (00h,8Bh)

Note: enables A20 first
AH = 1Bh get ???

Return: AH = status
BX = ???
CX = number of ???
EDX = physical address of ???
AH = 1Ch get original interrupt vector
AL = interrupt vector (00h-7Fh)

Return: AH = 00h (successful)
EDX = original vector before 386MAX loaded (segment in
high word, offset in low word)

Note: no range checking is performed; requests for INTs 80h-
FFh will return random values
AH = 1Dh display string???
SI = ???

Return: AH = 00h (successful)
???

Note: this function appears to be broken in v7.00
AH = 1Eh get memory info
ES:DI -> memory info (see #1170)

Return: ???
AH = 1Fh get DPMI host information

Return: AX = 0000h if successful
BX = DPMI flags (see #2823 at INT 31/AX=0400h)
CL = CPU type (02h = 80286, 03h = 80386, etc.)
DX = DPMI ver supported (DH=major, DL=2-digit minor)
SI = ???
ES???:DI -> ???

Note: NOP if NODPMI switch specified
AH = 20h (v7.00) get ???
AL = index of ???

Return: EDX = ??? for specified ???
AH = 21h (v7.00) STACKS support
AL = 00h get STACKS parameters

Return: BX = ??? (0060h for v7.00)
CX = number of stacks for hardware interrupts
DX = size of each stack in bytes
SI = ??? (low and high bytes are separate values)
DI = ??? (low and high bytes are separate values)
low byte = logical page number set by subfn 02h
ES = ???
AL = 01h set ??? "EMM2_DSTKS"
EBX = ???
ECX = ???
AL = 02h set ???
BL = logical page number for ??? (00h-03h)

Return: AH = status (00h,8Ah)
AH = 22h (v7.00) call ??? for every load module
AL = which function to call
00h call ???
else call ????

Return: AH = 00h

Note: if AL=00h, calls the protected-mode function pointed at by
the DWORD at offset 22h from the start of each module installed
by a LOAD= directive; if AL<>00h, it calls the function
pointed at by the DWORD at offset 28h of the load module
AH = 23h (v7.00) ???
AL = 00h set ???
BL = ???

Return: AH = 00h or unchanged (depending on ???)
AL = 01h set ???
BL = ???
BH = ???
CX = ???
DX = ??? (on top of stack)

Return: AH = status (00h if successful, 8Fh once table full)

Note: this call adds one entry to an internal table on each
call, until the table is full
AL = 02h get ???
CX = size of buffer
ES:DI -> buffer for ??? (60 bytes total data)

Return: CX = number of bytes actually returned

Note: returns the array storing the values set with AX=2301h
Format of one entry in array:
Offset Size Description
00h BYTE ??? (BL from subfn 01h)
01h WORD ??? (CX from subfn 01h)
03h BYTE ??? (BH from subfn 01h)
04h WORD ??? (DX from subfn 01h)
AL = 03h set ??? name/path
ES:DI -> buffer containing ASCIZ ???
AL = 04h get ???
ES:DI -> buffer for ASCIZ ???

Note: the ASCIZ string for subfunctions 03h and 04h does not appear
to be used by 386MAX, and may serve merely for communication
between two other Qualitas programs
AH = 24h (v7.00) high memory control
AL = 00h get high memory state

Return: BX = current state
00h high memory removed from DOS memory chain
01h high memory included in DOS memory chain
AL = 01h set high memory state
BX = new state
00h high memory removed from DOS memory chain
01h high memory included in DOS memory chain
else

Return: ??? (error, but return varies according to ???)
AH = 25h (v7.00) remove high RAM from DOS memory chain
AH = 26h (v7.00) ???
BX = ???
CX = ???
SI = ???
DI = ???

Return: AH = status
BX = ???
CX = ???
AH = 27h (v7.00) ???
AL = 00h get ???

Return: BX = number of paragraphs for ???
AL = 01h ???
BX = ???
ES??? = ???
AL = 02h ???
???
AL = 03h ???
CX = ???
DX = ???
ES??? = ???

Return: ???
AH = 28h (v7.00) get ???

Return: AH = status (00h,8Fh) (see #3319 at INT 67/AH=40h)
if AH=00h,
CX = ???
DX = ???
AH = 29h (v7.00) get ???

Return: AX = ???
AH = 40h-5Dh EMS services (see INT 67/AH=40h, etc.)
AH = DEh VCPI services (see INT 67/AX=DE00h, etc.)

Return: AH = status (as for EMS INT 67 calls)
00h successful
80h internal error
81h hardware malfunction
83h invalid handle
84h undefined function
8Ah invalid logical page nuber
8Bh illegal physical page number
8Fh undefined subfunction
A4h access denied
etc.
STACK popped (value placed in DX if no specific return value for DX)

Format of 386MAX memory speed record:
Offset Size Description (Table 1169)
00h DWORD page table entry for 4K page
04h WORD number of microticks (840ns units) required for REP LODSD of
entire 4K page

Format of 386MAX memory info [array]:
Offset Size Description (Table 1170)
00h DWORD linear start address
04h DWORD size in bytes
08h WORD XMS handle (if next byte = 04h)
??? (if next byte = 05h)
??? (if next byte = 06h)
??? (if next byte = 13h)
??? (if next byte = 14h)
??? (if next byte = 15h)
??? (if next byte = 23h)
??? (if next byte = 24h)
??? (if next byte = 26h)
else unused
0Ah BYTE type
00h = ???, 01h = VDISK,
02h = INT 15h extended memory, 03h = ??? extended,
04h = XMS handle's memory, 05h = ???, 06h = ???, 07h = ???,
08h = ???, 09h = ???, 0Ah = ???, 0Bh = ???,
11h = ???, 12h = ???, 14h = ???, 15h = ???,
19h = ???, 1Ah = ???, 1Bh = ???,
1Ch = ???, 1Dh = ???, 1Eh = ???, 1Fh = ???,
20h = ???, 21h = ???, 23h = ???, 24h = ???,
26h = ???
0Bh BYTE ??? (00h for types 00h-03h, 07h-0Bh, 19h-21h;
80h for types 04h/13h-15h/23h-26h;
??? for type 05h)