[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
Int 21 Fn 4402 U - Qualitas 386max V6.00+ - Ioctl Input - Get State [m]
AX = 4402h
BX = file handle for device "386MAX$$"
CX = number of bytes to read
DS:DX -> BYTE 03h followed by 386MAX state buffer (see below)
Return: CF clear if successful
buffer at DS:DX+1 filled
AX = number of bytes actually copied
CF set on error
AX = error code (01h,05h,06h,0Dh) (see AH=59h)
Notes: if the value given in CX is less than the size of the state record
(5Ah for v6.01, 66h for v7.00), only a partial state record will be
returned
the state is 40h bytes for 386MAX (actually ASTEMM) v2.20 ("386MAX$$"
did not exist yet, use "QMMXXXX0" and then "EMMXXXX0" instead) and
56h bytes for v5.11.
to invoke 386MAX API functions, push DX onto the stack, load DX with
the word at offset 25h in the returned state, load all other
registers as needed for the desired function, and execute an
OUT DX,AL or OUT DX,AX; DX will be set to the pushed value on return
if it is not otherwise modified by the API function. For safety,
in case a function is not supported or 386MAX is not present, SP
should be saved and restored around the API call.
Windows 3.1 Standard mode, LAN Manager, and Windows for Workgroups all
use the 386MAX API; LAN Manager and Windows for Workgroups reportedly
make some calls incorrectly
See Also: AX=4403h/SF=03h"386MAX",INT 67/AH=3Fh
Format of 386MAX v6.01+ state:
Offset Size Description
-1 BYTE (call) 03h
00h 6 BYTEs signature "386MAX"
06h 4 BYTEs version string "N;NN" (i.e. "6;01" for v6.01)
0Ah WORD segment of low-memory portion of 386MAX.SYS
0Ch 2 BYTEs ???
0Eh WORD segment of ??? memory block or 0000h
10h WORD bit flags 1 (see below)
12h WORD (v6.01) starting address of video memory in KB
(v7.00) low memory size in bytes
14h 2 BYTEs ???
16h WORD total high DOS memory in KB
18h 2 BYTEs ???
1Ah WORD available shared memory in KB
1Ch WORD KBytes extended memory used by 386MAX
1Eh 2 BYTEs ???
20h WORD total extended memory in KB
22h WORD IO port to write (OUT DX,AL) to invoke 386MAX INT 15 functions
24h WORD IO port to write (OUT DX,AL) to invoke 386MAX API functions
26h WORD ??? (depends on DOS version)
28h 2 BYTEs ???
2Ah DWORD machine type (see below)
2Eh WORD ???
30h WORD ???
32h WORD system configuration flags (see below)
34h WORD debugging flags 1 (see below)
36h WORD debugging flags 2 (see below)
38h 2 BYTEs ???
3Ah WORD segment of first MCB in high memory chain???
3Ch WORD feature flags 1 (see below)
3Eh WORD feature flags 2 (see below)
40h WORD feature flags 3 (see below)
42h WORD segment of first 386MAX control block??? (see below)
44h WORD amount of memory to report available on INT 15/AH=88h
46h 4 BYTEs ???
4Ah WORD number of K at start of address space swapped with fast
extended memory (SWAP= parameter)
4Ch 2 BYTEs ???
4Eh WORD ???
50h WORD debugging flags 3 (see below)
52h DWORD old INT 21h
56h DWORD pointer to 386MAX's EMS (INT 67h) handler
---386MAX v7.00---
5Ah DWORD KB of extended memory managed by 386MAX
5Eh DWORD bytes of extended memory (EXT= parameter)
62h 4 BYTEs ???
Bitfields for bit flags 1:
bit 1 ???
bit 2 ???
bit 3 ??? (cleared by calling INT 67 functions)
bit 4 high RAM present???
bit 5 386MAX in AUTO mode
bit 6 386MAX enabled
bit 7 386MAX is providing EMS services
bit 8 ???
bit 9 A20 enabled??? (see INT 15/AX=2402h)
bit 10 Weitek support enabled
bit 11 ???
bit 12 ???
bit 13 QPMS has been used
bit 14 ???
bit 15 ???
Bitfields for system configuration flags:
bit 1 ROM compressed???
bit 3 ???
bit 5 386MAX loaded into high memory
bit 6 Microchannel bus
bit 7 Weitek math coprocessor detected
bit 11 PC/XT (thus only single 8259 interrupt controller present, DMA only
in 1st megabyte, etc)
bit 13 LMLTOP= specified
bit 15 ???
Bitfields for debugging flags 1:
bit 0 DEBUG=LED
bit 1 DEBUG=X67
bit 2 DEBUG=INV
bit 3 DEBUG=EMSPTED
bit 4 DEBUG=JMP
bit 5 DEBUG=CALL
bit 6 DEBUG=HLT
bit 7 DEBUG=PMR
bit 8 DEBUG=CR3
bit 9 DEBUG=CAPS or DEBUG=INT
bit 10 DEBUG=RC
bit 11 DEBUG=ROM
bit 12 DEBUG=XM
bit 13 DEBUG=SOR
bit 14 DEBUG=XR
bit 15 DEBUG=EMSERR
Bitfields for debugging flags 2:
bit 0 DEBUG=ROMSWAP
bit 1 DEBUG=UNSHADOWROM
bit 2 DEBUG=COMPROM
bit 3 DEBUG=DPMIPHYS
bit 4 DEBUG=ALLROM
bit 5 DEBUG=VMS
bit 6 DEBUG=XMS
bit 7 DEBUG=I06
bit 8 DEBUG=VCPI
bit 9 DEBUG=XDMA
bit 10 DEBUG=X09
bit 13 DEBUG=I67
bit 14 DEBUG=EVM
bit 15 DEBUG=EMSSAVE or DEBUG=VDS
Bitfields for debugging flags 3:
bit 10 DEBUG=EPM
bit 12 DEBUG=ABIOS
bit 13 DEBUG=XMSPTED
bit 14 DEBUG=TIME
bit 15 DEBUG=SCRUB
Bitfields for feature flags 1:
bit 1 Weitek present
bit 2 no DPMI services
bit 3 NODMA
bit 4 TERSE
bit 5 NOROM
bit 6 NOPARITY
bit 8 NOFLEX (IGNOREFLEXFRAME)
bit 11 don't create UMBs
bit 12 don't backfill below video memory (NOLOW)
bit 13 FRAME= specified
bit 14 EXT= specified
bit 15 NOEMS, allow prior expanded memory manager to provide EMS
Bitfields for feature flags 2:
bit 0 UNSHIFT specified (FORCEA20 disabled)
bit 1 NOXRAM
bit 2 NOSCSI specified
bit 3 SCREEN specified
bit 4 enabled EISADMA
bit 5 slow DMA
bit 6 RESETKEYB specified
bit 7 ???
bit 9 TOP384
bit 11 NOWARMBOOT
bit 12 USE= specified
bit 13 ROM= specified
Bitfields for feature flags 3:
bit 0 Windows3 support enabled
bit 1 SHADOWROM
bit 2 don't compress ROM (NOCOMPROM)
bit 3 ??? (related to PRGREG=)
bit 4 ??? (related to PRGREG=)
bit 5 SHADOWRAM
bit 6 DOS4 specified
bit 7 NOLOADHIGH
bit 8 NOPULSE
bit 11 FORCEA20
bit 12 DMA buffer enabled
bit 13 NOSCRUB
bit 15 NOFRAME
Bitfields for machine type:
bit 12 Amstrad
bit 13 Epson
bit 14 Zenith Data Systems
bit 15 "ASEM"
bit 16 NEC
bit 17 "HPRS" model codes 69h and 6Ah
bit 18 Dell
bit 19 "CA"
bit 20 ITT (Xtra Business Systems/Alcatel)
bit 21 Toshiba 5100
bit 22 Olivetti
bit 23 Quadram Quad386 (BIOS model FEh, submodel A6h)
bit 24 Tandy???
bit 25 AST 386
bit 26 INBOARD, ??? version
bit 27 INBOARD, ??? version
bit 28 INBOARD, ??? version
bit 29 "HPRS"
bit 30 Compaq 386
bit 31 JET386
Format of 386MAX control block:
Offset Size Description
00h WORD segment of next block (FFFFh if last)
02h WORD segment of previous block (FFFFh if first)
04h 12 BYTEs filename
10h WORD resident size in paragraphs
12h WORD environment size???
14h WORD real prsent environment size + 1 (0000h if ENVSAVE used)
16h 2 BYTEs ???
18h DWORD initial size or SIZE=n in 386LOAD commandline
1Ch DWORD SIZE=-1 ???
20h DWORD SIZE= ???
24h BYTE PRGREG= if specified, else FFh
25h BYTE ENVREG= if specified, else FFh
26h BYTE FlexFrame (00h not present, 01h present)
27h 3 BYTEs ???
2Ah BYTE GROUP= or 00h if not present
2Bh BYTE ???
2Ch WORD PSP
Format of high memory info record:
Offset Size Description
00h WORD segment address of memory region
02h WORD size of memory region in paragraphs
04h BYTE type or flags???
00h if locked out
02h if EMS page frame
04h if high RAM
42h if ROM
05h BYTE ???
Format of ROM shadowing record:
Offset Size Description
00h WORD segment of ROM???
02h WORD segment of ROM???
04h 2 BYTEs ???
06h WORD size of shadowed ROM in paragraphs
08h 4 BYTEs ???
Values for memory type:
00h unused by EMS
01h DOS
04h page frame overlapping ROM???
80h high memory
84h page frame???
87h video ROM???
Note: the type may be 00h (unused) if the 16K page is split among different
uses (such as ROM and high RAM)
Call 386MAX API (via OUT DX,AL) with:
STACK: WORD value for DX
AH = 01h get high memory information
ES:DI -> buffer for array of high memory info records
(see above)
Return: CX = number of records placed in buffer
AH = 02h get shadowed ROM info???
ES:DI -> buffer for array of ROM shadowing records (see above)
Return: CX = number of records placed in buffer
AH = 03h get 386MAX state
ES:DI -> 90-byte buffer for state (see above)
Return: AH = 00h (successful)
buffer filled
Note: unlike INT 21/AX=4402h"386MAX", this function omits
the first byte specifying the state buffer version
AH = 04h get memory types???
ES:DI -> buffer for memory type info (array of bytes, one per
16K page) (see above)
Return: CX = number of bytes placed in buffer
AH = 05h get ???
AL = A20 control (00h enable A20 first, 01h leave unchanged)
CX = number of 4K pages to report (0000h for default)
SI = first K to report (rounded down to 4K page)
ES:DI -> buffer for returned info on ???
Return: CX = number of 4K pages reported on
???
AH = 06h get memory speed info
ES:DI -> buffer for memory speed records (see below)
Return: AH = 00h (successful)
CX = number of bytes placed in buffer
Note: this function can take over a second to execute
AH = 07h ???
DX = EMS handle (on stack)
???
Return: ???
AH = 08h "EMM2_GOREAL" check whether possible to disable 386MAX
AL = ??? (00h or nonzero)
Return: AH = status (00h OK, A4h not possible at this time)
Note: if AL=00h, this function always returns success
AH = 09h toggle Bit Flags 1 flags
BX = bitmask of bit flags 1's flags to toggle (see above)
Return: AH = 00h (successful)
Note: enables A20 first
AH = 0Ah toggle system configuration flags
BX = bitmask of system configuration flags to toggle
(see above)
Return: AH = 00h (successful)
Notes: enabled A20 first
does ??? if bit 3 on after specified bits are toggled
AH = 0Bh toggle debugging flags 1
BX = bitmask of debugging flags 1's bits to toggle (see above)
Return: AH = 00h (successful)
Note: enables A20 first
AH = 0Ch toggle feature flags 3
BX = bitmask of feature flags 3's bits to toggle (see above)
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 = 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: ???
bit 1: physical address same as linear address
bit 2: EMS page frame
bit 6: ???
this function can take over a second to execute,
because it also tests the memory
AH = 12h ???
AL = subfunction
00h ???
01h ???
???
Return: AH = 00h (successful) if AL=00h or 01h
AH = 8Fh otherwise
AH = 13h page protection???
AL = subfunction
00h set all ??? 4K pages to read-only???
.NG limit reached, continued in next section...
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson