start tok64 d64-RGaYRx 0 REM from: june issue 1991 of run ---------------------------- 10 GOTO120:REM main menu 20 FORi=lTOh 30 a=p*PEEK(i+n)+PEEK(i):IFa=.THEN50 40 c=i-l+n:j=j+n:e(j,n)=c:e(j,2)=a:IFa>dTHENd=a 50 NEXT 60 RETURN 70 FORi=nTOj 80 b=INT(e(i,2)/d*70):IFb<2THEN100 90 PRINT#1,RIGHT$("{space*3}"+STR$(e(i,n)),4)" ";LEFT$(m$,INT((b-n)/k)) 100 NEXT 110 RETURN 120 CLR:GOSUB680 130 PRINT"{down*3}profiler c64{space*2}(version 1.1)" 140 PRINT"by ward shrake" 150 PRINT"press 1 to prepare for analysis, or" 160 PRINT"press 2 to display the results, or" 170 PRINT"press 3 to quit." 180 POKE198,0 190 IFPEEK(198)=0THEN190 200 GETg$ 210 IFg$="1"THEN250 220 IFg$="2"THEN380 230 IFg$<>"3"THEN180 240 END 250 RESTORE:PRINT"{down}preparing machine code{.*3}" 260 FORi=679TO765 270 READf:POKEi,f 280 NEXT 290 PRINT"{up}setting up analyzer{.*3}{space*3}" 300 SYS679 310 PRINT"{down}all ready. load the program you" 320 PRINT"wish to analyze now. remember that" 330 PRINT"sys 703 starts the profiler, and" 340 PRINT"sys 716 stops the profiler." 350 PRINT"{down}reload this program afterwards to" 360 PRINT"view or print the analyzer's report." 370 PRINT"{down*3}load"CHR$(34)"****************"CHR$(34)",8{up*3}":END 380 PRINT"{down}one moment{.*3}{space*8}" 390 REM (analysis buffer area @ 49152-53247) 400 l=49152:h=53247:j=0:d=0 410 RESTORE:FORi=679TO765:READf:NEXT 420 FORi=828TO854 430 READf:POKEi,f 440 NEXT 450 FORi=192TO207 460 POKE839,i: 470 SYS830 480 IFPEEK(829)=1THENh=(i*256)+255 490 NEXT 500 GOSUB20 510 PRINT"press 1 for printer, or" 520 PRINT"press 2 for screen.{down}" 530 REM user's response 540 POKE198,0 550 IFPEEK(198)=0THEN550 560 GETg$:k=VAL(g$) 570 IFg$="1"THENOPEN1,4:GOTO600 580 IFg$="2"THENOPEN1,3:GOTO640 590 GOTO540 600 PRINT#1,SPC(20);"profiler c64 by ward shrake" 610 PRINT#1:PRINT#1 620 PRINT#1,"line #{space*4}comparative amount of time the line took" 630 PRINT#1,"{-*50}":PRINT#1 640 GOSUB70 650 PRINT"all done." 660 PRINT#1:CLOSE1 670 END 680 i=0:l=0:h=0:a=0:b=0:c=0:d=0:f=0 690 g$="":j=0:m$="":n=1:p=256 700 m$="{Q*5}{W*5}{Q*5}{W*5}" 710 m$=m$+m$:m$=m$+m$ 720 DIMe(2048,2):REM 'thinking room' array 730 RETURN 740 DATA169,192,133,252,169,0,133,251,168,145,251,230,251,208,250,230 750 DATA252,166,252,224,208,208,242,96,120,169,217,141,20,3,169,2,141 760 DATA21,3,88,96,120,169,49,141,20,3,169,234,141,21,3,88,96,160,0,165 770 DATA57,133,251,165,58,9,192,133,252,177,251,170,232,138,145,251,208 780 DATA13,165,58,9,192,133,252,177,251,170,232,138,145,251,76,49,234,0 790 DATA0,169,0,141,61,3,160,0,185,0,192,205,60,3,208,4,200,208,245,96 800 DATA169,1,141,61,3,96 stop tok64 (bastext 1.0)