Qbasicnews.com
April 09, 2020, 05:50:25 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Back to Qbasicnews.com | QB Online Help | FAQ | Chat | All Basic Code | QB Knowledge Base
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: XMS in Qbasic using Future.Library  (Read 1392 times)
VonGodric
Ancient Guru
****
Posts: 674



WWW
« on: September 14, 2003, 07:10:32 AM »

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?
Logged

url]http://fbide.sourceforge.net/[/url]
seph
Na_th_an
*****
Posts: 1915



« Reply #1 on: September 14, 2003, 07:47:40 AM »

Yes. Switch to UGL.
Logged

earn.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!