Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

arrays and xms

Status
Not open for further replies.

qbasicking

Programmer
Aug 19, 2001
628
US
I'm mainly a qbasic programmer, but needed a little bit more speed so I am going to be using some assembly, but I am new at it. If I allocate a large amount of XMS memory using a libary (written in either C or ASM) can I access parts of it, assuming that I pass the handle through the stack, or do I have to transfer the sprite from XMS to a regular array before I can access it.

If I use an assembly array:
sprite1 DB 10000 dup (0)

how large and how many such arrays can I have, is that restricted? My game has two megabyte in more than three hundred sprites.
 
Not quite sure on mixxing the 2, but I know masm32 - windows assembly - can access and allocate memmory upto 128 meg. with 32 bit code. Might be able to have masm32 do it and then return the location to VB to use.

Thaz
 
No, I will be using this in a library for Qbasic, so it has to be 16bit
 
XMS returns a handle and not a pointer. So you would have to use XMS functions to access it. More than likely you'll have to do XMS functions in assembly and copy it to a pointer (dereferenced) for qbasic to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top