=========================================================================== BBS: The Abacus * HST/DS * Potterville, MI Date: 04-06-93 (02:28) Number: 11 From: EARL MONTGOMERY Refer#: NONE To: ALL Recvd: NO Subj: A faster method Conf: (35) Quick Basi --------------------------------------------------------------------------- 'I was doing some peeking around in memory and thought the 'program was running way too slow using the first loop. I 'tried the second loop and it increased the speed by 60% 'For whatever it is worth. 'Don't forget to attach the two lines before running! CLS DEFLNG A-Z TIME$ = "00:00:00" FOR x = 0 TO 65530 p = PEEK(x) IF p = 66 AND PEEK(x + 1) = 97 AND PEEK(x + 2) = 102 AND ' attach to above line before running: PEEK(x + 4) = 67 THEN BEEP NEXT PRINT TIME$ PRINT "Time for first loop." PRINT "Press any key to time second loop." WHILE INKEY$ = "": WEND CLS TIME$ = "00:00:00" FOR x = 0 TO 65530 p = PEEK(x) IF p = 66 THEN GOSUB faster NEXT PRINT TIME$ PRINT "The second loop is 60% faster." PRINT "Press any key to end" WHILE INKEY$ = "": WEND CLS END faster: IF PEEK(x + 1) = 97 AND PEEK(x + 2) = 102 AND PEEK(x + 4) = 67 ' attach to the above line before running: THEN BEEP RETURN 'Earl --- Maximus 2.01wb * Origin: Rabbit and Snake's BBS - Richardson, Texas (1:124/6108) SEEN-BY: 1/211 11/2 4 13/13 101/1 108/89 109/25 110/69 114/5 123/19 124/1 SEEN-BY: 153/752 154/40 77 157/2 159/100 125 430 575 950 203/23 209/209 SEEN-BY: 280/1 390/1 396/1 15 397/2 2230/100 3603/20