Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
XMS in Qbasic using Future.Library
#1
I have a question: How to use XMS memory in Qbasic using Future.Library. I know that Ordinary way:

Code:
'$INCLUDE: 'Future.bi'
TYPE DataBase
   Xpos AS INTEGER
   Ypos AS INTEGER
END TYPE

'Define Two Arrays
DIM Object1 AS DataBase
DIM Object2 AS DataBase

'Create XMS Handle
XMS = AllocateXMS(LEN(Object1))

'Give to Object1 Array some values
Object1.Xpos = 100
Object1.Ypos = 200

'Move Object1 into XMS
Segment = VARSEG(Object1)
Offset = VARPTR(Object1)
Size = LEN(Object1)
MoveToXMS XMS, Segment, Offset, Size, 0

'Move data from Xms into Object2 array.
Segment = VARSEG(Object2)
Offset = VARPTR(Object2)
Size = LEN(Object2)
MoveFromXMS XMS, Segment, Offset, Size, 0

CLS
PRINT Object2.Xpos
PRINT Object2.Ypos

DeAllocateXMS XMS

Well but it's quite slow. I'm making a Gui(WizGUI) and there I need speed. I don't want to use convertional memory.
So is there any faster way to do this?
url]http://fbide.sourceforge.net/[/url]
Reply
#2
Yes. Switch to UGL.
earn.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)