http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Extended memory control (Dos)



Hi,

I'm having some trouble using HIMEM to allocate extended memory to be used
by my game. My problem is: Once I have the control address, I can't seem
to jump to it. I have it as 'long XMScontrol;' in C, and then I put it in
like this (Asm): (Assuming that it's currently in ES:DX, I can't remember
the exact location, but I have it in my REAL code)

	mov [XMScontrol], es
	mov [XMScontrol + 2], dx

Then, later on, I tried to jump to it using:

	call [XMScontrol]

Now this part is giving me an error when I try to compile, but I can't see
anything wrong with it, I looked in NGASM and it looks legal to me! Can
somebody help me out here? Also, is it possible to do this type of far
call in C? AFAIK All C functions are inside the program, what would I do
if I wanted to jump to another programs' functions? Assuming that I have
the address in XMScontrol?

Ciao,

Lionel

P.s. I have the XMS specification from Microsoft/Lotus/Intel/AST.

=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html