Skip to content

Commit ff4a52a

Browse files
authored
Merge pull request #120 from ecm-pushbx/ecm-2026-09a
ecm 2026-09a: INT 30/31 details, dosemu2 PM XMS, XMS move overlap specification error
2 parents f623bfb + 26b9f44 commit ff4a52a

4 files changed

Lines changed: 62 additions & 7 deletions

File tree

‎source/Interrupt List/INT 2F Multiplex/Memory/INT 2F4300 EXTENDED MEMORY SPECIFICATION XMS v2 INSTALLATION CHECK.txt‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Notes: XMS gives access to extended memory and noncontiguous/nonEMS memory
1212
above 640K
1313
this installation check DOES NOT follow the format used by other
1414
software
15+
dosemu2 provides an XMS interface when calling the Protected Mode
16+
INT 2F handler, other DPMI hosts such as HDPMI are known not to.
1517
SeeAlso: AX=4310h,AX=1687h,INT 67/AH=40h,@xxxxh:xxxxh"PMM"
1618
Index: installation check;XMS version 2+
17-
19+

‎source/Interrupt List/INT 2F Multiplex/Memory/INT 2F4310 EXTENDED MEMORY SPECIFICATION XMS v2 GET DRIVER ADDRESS.txt‎

Lines changed: 55 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,13 @@ Return: ES:BX -> driver entry point (see #02749,#02750,#02753,#02760,#02769,#027
1010
Notes: HIMEM.SYS v2.77 chains to previous handler if AH is not 00h or 10h
1111
HIMEM.SYS requires at least 256 bytes free stack space when calling
1212
the driver entry point
13+
dosemu2 provides an entrypoint when INT 2F/AX=4310h is called in
14+
Protected Mode. this entrypoint is a far pointer either in ES:BX
15+
or ES:EBX, which must be called with the operand size that
16+
corresponds to the client bitness. that is, 32-bit clients must
17+
far call dword (o32) ES:EBX while 16-bit clients must far call
18+
word (o16) ES:BX. stack size (B bit) and code segment default size
19+
(D bit) do not matter to the entrypoint however.
1320
SeeAlso: AX=4300h,AX=4310h"Cloaking",AX=4310h"Netroom",AX=4310h"XMZ"
1421

1522
Format of XMS driver entry point:
@@ -146,7 +153,16 @@ Return: AX = status
146153
Notes: if either handle in the EMM structure is 0000h, the corresponding
147154
offset is considered to be an absolute segment:offset address in
148155
directly addressable memory
149-
SeeAlso: #02759,#02762
156+
if either handle is zero when calling the dosemu2 Protected Mode
157+
XMS entrypoint, handling may differ depending on the dosemu2
158+
revision and the bitness of the DPMI client. it may use the
159+
address field as a segment:offset of Virtual 86 Mode addressable
160+
memory (just like the Virtual 86 Mode entrypoint), or as a
161+
32-bit near offset in the caller's current DS, or as a 16:16
162+
selector:offset value using the caller's current GDT and LDT.
163+
under dosemu2 as of 2026-09-22, use PM XMS function 7Bh to specify
164+
explicitly what interpretation to use for zero handle addresses.
165+
SeeAlso: #02759,#02762,#26008
150166

151167
(Table 02762)
152168
Call the XMS driver "Lock extended memory block" function with:
@@ -256,6 +272,29 @@ Call the QEMM v5.11 "???" function with:
256272
Return: ???
257273
SeeAlso: #02769,#02783
258274

275+
(Table 26008)
276+
Call the dosemu2 PM XMS driver "Move extended memory block" function with:
277+
AH = 7Bh
278+
AL = type of address used for zero handle
279+
00h = Virtual 86 Mode 16:16 segment:offset
280+
01h = 32-bit linear address
281+
02h = 32-bit near offset in current DS
282+
03h = Protected Mode 16:16 selector:offset
283+
else unknown, may be assigned in future revisions
284+
DS:SI -> EMM structure (see #02776)
285+
Return: AX = status
286+
0001h success
287+
0000h failure
288+
BL = error code (80h-82h,A3h-A9h,AEh) (see #02775)
289+
Notes: added to dosemu2 as of 2026-09-22
290+
only available when calling the Protected Mode XMS entrypoint
291+
dosemu2 which supports this call never returns error 80h, which
292+
is the expected error return for XMS handlers that do not know
293+
of this extension. an unsupported type in AL will return the
294+
new error code AEh, to allow dispatching based on whether the
295+
subfunction or the whole function is unsupported.
296+
SeeAlso: #02761
297+
259298
(Table 02771)
260299
Call the XMS v3.0 driver "Query free extended memory" function with:
261300
AH = 88h
@@ -333,6 +372,7 @@ Values for XMS error code returned in BL:
333372
ABh block is locked
334373
ACh block lock count overflowed
335374
ADh lock failed
375+
AEh (dosemu2 XMS PM) unknown/unsupported move type
336376
B0h only a smaller UMB is available
337377
B1h no UMB's are available
338378
B2h UMB segment number is invalid
@@ -344,11 +384,22 @@ Offset Size Description (Table 02776)
344384
06h DWORD offset into source block
345385
0Ah WORD destination handle
346386
0Ch DWORD offset into destination block
347-
Notes: if source and destination overlap, only forward moves (source base
348-
less than destination base) are guaranteed to work properly
387+
Notes: if source and destination overlap, only forward (UP) moves are
388+
guaranteed to work properly. this is incorrectly referred to as
389+
"where the source base is less than the destination base" in the
390+
XMS v2 and v3 specifications. an UP move, forward move, or move
391+
with the Direction Flag clear, with overlapping data in fact
392+
only works to place the entire source data at the destination if
393+
the destination starts below the source.
394+
it is not clearly specified, but it may be assumed that moves with
395+
overlap will either work to preserve the source data or, if the
396+
handler doesn't support backwards (DN) moves, return error A8h.
349397
if either handle is zero, the corresponding offset is interpreted
350398
as a real-mode address referring to memory directly addressable
351-
by the processor
399+
by the processor for V86M function 0Bh or PM function 7B00h. see
400+
description of functions 0Bh and 7Bh for other interpretations
401+
of zero-handle addresses in the Protected Mode XMS interface.
402+
SeeAlso: #02761,#26008
352403

353404
Format of XMS handle info [array]:
354405
Offset Size Description (Table 02777)

‎source/Interrupt List/INT 30 NOT A VECTOR DOS 1 FAR JMP instruction/INT 30 NOT A VECTOR DOS 1 FAR JMP instruction for CPMstyle calls.txt‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@ INT 30 - (NOT A VECTOR!) - DOS 1+ - FAR JMP instruction for CP/M-style calls
1212
BUGS: in PSPs created by MS-DOS 2+ Debug, the instruction at PSP:0005h
1313
(see #01378) points two bytes too low in memory. fixed in lDOS
1414
MSDebug (fork based on MS-DOS v2 Debug)
15-
SeeAlso: INT 21/AH=26h
16-
15+
previous revisions of this interrupt list misidentified the Debug
16+
bug as being a DOS (kernel) bug, likely due to testing in Debug.
17+
SeeAlso: INT 31"CP/M",INT 21/AH=26h

‎source/Interrupt List/INT 31 DOS PROTECTED MODE INTERFACE/INT 31 overwritten by CPM jump instruction in INT 30.txt‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,4 @@ Notes: segment of this vector refers to DOSDATA segment in DR-DOS,
1414
points to DOSDATA:0000h in lDOS, which contains a valid
1515
handler. currently this handler simply returns CF set
1616
and AX = 0001h, but it could be extended in the future.
17+
SeeAlso: INT 30"CP/M"

0 commit comments

Comments
 (0)