'Future.Library EMSget/EMSput, Pageing and Mouse Support
'

REM $INCLUDE: 'future.bi'

Set640x400 8'Set 640x400 svga screen

handle% = AllExpMem(256000)'get 256000 of EMS memory
handle1% = AllExpMem(256000)'get 256000 of EMS memory

FOR i% = 400 TO 0 STEP -1
Future.BOX 320 - i%, 200 - i%, 320 + i%, 200 + i%, i%
NEXT

Future.EMSGet 0, 0, 639, 399, handle%

Future.CLS 0

FOR i% = 0 TO 200 STEP 2
Future.CIRCLE 320, 200, i%, i%
NEXT

Future.EMSGet 0, 0, 639, 399, handle1%



Future.MouseOn
T! = TIMER
DO


IF tempX% <> Future.MouseX OR tempY% <> Future.MouseY THEN
       
        P% = P% XOR 1

        Setpage P%

        newposX% = Future.MouseX
        newposY% = Future.MouseY

        Future.EMSPut 0, 0, handle% 'redraw screen
       
        SetMaskColor 0
        Future.EMSPut newposX% - 320, newposY% - 200, handle1%'redraw screen
        SetMaskColor -1
       
        ViewPage P%
       
        tempX% = newposX%
        tempY% = newposY%

END IF

LOOP UNTIL INKEY$ = CHR$(27)

Future.MouseOff

DeallExpMem handle%  'free up EMS memory
DeallExpMem handle1%  'free up EMS memory
ReSetScreen

