'Future.Library Simple software scrolling
'

REM $INCLUDE: 'future.bi'

Set800x600 8'Set 800x600 svga screen

handle% = AllExpMem(480000) 'get 480000 of EMS memory

FOR i% = 0 TO 1600
Future.CIRCLE 400, 300, i%, i%
Future.CIRCLE 401, 300, i%, i%
NEXT

Future.EMSGet 0, 0, 799, 599, handle%

Set320x200 8'Set 320x200 svga screen
Future.MouseOn
KBHon
DO

P% = P% XOR 1
Setpage P%

DO
SELECT CASE 1
CASE GetKey%(72)
posY% = posY% - 1
EXIT DO
CASE GetKey%(80)
posY% = posY% + 1
EXIT DO
CASE GetKey%(75)
posX% = posX% - 1
EXIT DO
CASE GetKey%(77)
posX% = posX% + 1
EXIT DO
CASE GetKey%(1)
GOTO endp
END SELECT

Future.UpdateMouse
LOOP

ClearKeyBuffer

Future.EMSPut posX%, posY%, handle%'redraw screen
Viewpage P%
LOOP

endp:
KBHoff
DeallExpMem handle%  'free up EMS memory
ReSetScreen

