I've called int 2fh with ax == 4310H and already have the HIMEM.SYS entry point in a far pointer. How exactly do I execute a call statement so that I appropriately call the XMS driver?
I thought it was 'CALL FAR PTR [XMSDriverEntryPoint]' but this just spawned illegal instruction ints with TD.
What am I doing wrong?
Thanks in advance,
Carlos
It looks like you're new here. If you want to get involved, click one of these buttons!
Comments
I finally got xms calls to work for me, but
you have to run in raw dos mode (reboot to
msdos - outside windows). My smallest
working program is 19k in size, and does
a lot more than just the xms calls, and
I will email it to you if you like - it works,
I call it "ramtest.asm". I pulled out just
the code that tests xms, and I am pasting it
below - 'hope it looks ok - email me if you
want the whole source. alcman@neto.com
.MODEL tiny
.486
.DATA
...
xmsfptr dd 0 dup (?)
xmsoff dw 0
xmsseg dw 0
xmaxk dd 0
xtotk dd 0
....
xmsproc: ;check xms, if present, allocate and lock
mov eax,00004300h ;code to test for xms
int 2fh
cmp al,80h ;code 80 indicates xms driver
jne noxms
mov ax,4310h ;code to get segmented pointer
int 2fh
mov xmsoff,bx
mov xmsseg,es
getmax:
mov ah,88h ;code to get xms maxk and totk
call xmsfptr ;call xms
mov blcode,ebx
cmp bl,0
jne noexms
mov xmaxk,eax ;largest 1k-block of extended ram
mov xtotk,edx ;total extended ram addressable
....
noexms: ....
: Hi! Sorry for the stupid question, but I just can't get my calls to the XMS driver to work.
: I've called int 2fh with ax == 4310H and already have the HIMEM.SYS entry point in a far pointer. How exactly do I execute a call statement so that I appropriately call the XMS driver?
: I thought it was 'CALL FAR PTR [XMSDriverEntryPoint]' but this just spawned illegal instruction ints with TD.
: What am I doing wrong?
: Thanks in advance,
: Carlos
: I've called int 2fh with ax == 4310H and already have the HIMEM.SYS entry point in a far pointer. How exactly do I execute a call statement so that I appropriately call the XMS driver?
: I thought it was 'CALL FAR PTR [XMSDriverEntryPoint]' but this just spawned illegal instruction ints with TD.
: What am I doing wrong?
: Thanks in advance,
: Carlos
:
:
Greetings from cold Russia!
Yes! That's exactly the same problem I couldn't solve for a long time! But now I figured out the following quite simple solution:
void farcall(void far *address)
{
__emit__(0xFF, 0x5E, 0x04); /* asm call dword ptr address */
}
I think it should work for you, too.
Mike.