'=========================================================================== ' Subject: SET BITPLANES Date: 05-15-96 (15:41) ' Author: Jon Merkel Code: QB, QBasic, PDS ' Origin: FidoNet QUIK_BAS Echo Packet: GRAPHICS.ABC '=========================================================================== ' I thought you would like to see (and would not be offended) by ' seeing your code changed a bit. The speed increase is fantastic! ' Noticed I changed the line command to a routine that sets the ' entire screen with random pixels. Change your code too if you ' want to compare speed. Compiled the new code takes 13 seconds ' to fill the entire screen. Your code took 2:31 seconds. ' I wish I could take credit for this but a guy I know who ' programs in ASM and PASCAL (Jon Merkel) looked over your ' code and came up with this. I am sure you would like to ' see it. I think I know you well enough to know you will ' not be offended. But rather amazed at the speed increase. DECLARE SUB vPSET2 (x%, Y%, Culler%) DEFINT A-Z SCREEN 12: CLS Red% = 4: Green% = 2 FOR Y% = 0 TO 479 FOR x% = 0 TO 639 CALL vPSET2(x%, Y%, RND * 15) NEXT: NEXT BEEP: SLEEP SCREEN 0: WIDTH 80 END SUB vPSET2 (x%, Y%, Culler%) DEF SEG = &HA000 VideoOffset& = (Y% * 80&) + (x% \ 8) BitMask% = 1 FOR J% = 1 TO ((x% AND 7) XOR 7): BitMask% = BitMask% * 2: NEXT OUT &H3CE, 8: OUT &H3CF, BitMask% OUT &H3CE, 5: OUT &H3CF, 2 BYTE% = PEEK(VideoOffset&): POKE VideoOffset&, Culler% OUT &H3CF, 0 DEF SEG END SUB