DEFINT A-Z 'also download http://www.ocf.berkeley.edu/~horie/bitplane.bas 'for a more useful SCREEN 7-12 pixel plotting code (using OUT and POKE) 'this is the fastest version of my EGA direct output program in QBASIC. 'of course it's slow, but hack it all you want, and enjoy. Provided by TRS. SCREEN 9: DEF SEG = &HA000: 'set EGA video segment OUT &H3CE, 5: OUT &H3CF, 0: 'EGA write mode 0 t1# = TIMER FOR s = 0 TO 28000 - 1 '-------------------main loop------------------- OUT &H3C4, 2: OUT &H3C5, 1: 'plane 1, BLUE POKE s, RND * 256: 'write dots OUT &H3C4, 2: OUT &H3C5, 2: 'plane 1, GREEN POKE s, RND * 256: 'write dots OUT &H3C4, 2: OUT &H3C5, 4: 'plane 1, RED POKE s, RND * 256: 'write dots OUT &H3C4, 2: OUT &H3C5, 8: 'plane 1, INTENSITY POKE s, RND * 256: 'write dots IF INKEY$ > "" THEN STOP '-------------------------------------------- NEXT s OUT &H3C4, &H2: OUT &H3C5, &HF: 'reset t2# = TIMER - t1# LOCATE 1, 1: PRINT USING "Time to fill EGA screen: ####.##s"; t2# END