DECLARE SUB TIMEDELAY (SECONDS!) ' SUBS AND FUNCTIONS MUST BE DECLARED DIM SET%(19) ' A SET FILE CONTAINS 20 INTEGERS DEF SEG = VARSEG(SET%(0)) ' SET THE SEGMENT ADDRESS BLOAD "OILDEM1.SET", VARPTR(SET%(0)) ' SET THE OFFSET ADDRESS AND LOAD DEF SEG ' RESTORE THE DEFAULT BASIC SEGMENT FRAMES% = SET%(0) ' THE NUMBER OF FRAMES IN THE SET XWIDTH% = SET%(1) ' THE WIDTH OF THE FRAMES LENGTH% = SET%(2) ' THE LENGTH OF THE FRAMES OFFSET% = SET%(3) ' THE OFFSET OF FRAMES IN THE ARRAY DIM GRAPH%(FRAMES% * OFFSET%) ' ARRAY TO HOLD THE GRAPHIC IMAGES DEF SEG = VARSEG(GRAPH%(0)) ' SET THE SEGMENT ADDRESS BLOAD "OILDEM1.GF", VARPTR(GRAPH%(0)) ' SET THE OFFSET ADDRESS AND LOAD DEF SEG ' RESTORE THE DEFAULT BASIC SEGMENT SCREEN 9 ' SET EGA 640 x 350 - 16 COLOR MODE PALETTE USING SET%(4) ' SET THE COLOR PALETTE GD = 0 ' INDEX OF THE GRAPHIC TO DISPLAY WHILE INKEY$ = "" ' LOOP UNTIL A KEY IS PRESSED PUT (0, 0), GRAPH%(GD * OFFSET%), PSET' DISPLAY THE GRAPHIC GD = GD + 1 ' INCREMENT THE INDEX IF GD > FRAMES% - 1 THEN GD = 0 ' KEEP INDEX VARIBLE WITHIN RANGE CALL TIMEDELAY(.33) ' CALL 1/3 SECOND DELAY WEND ' END OF WHILE LOOP END ' JUST A FORMALITY SUB TIMEDELAY (SECONDS) REM VERY SIMPLE TIME BASED DELAY REM NOT CPU SENSITIVE! TIME = TIMER XDELAY = TIME + SECONDS WHILE NOT (TIMER > XDELAY) WEND END SUB