home *** CD-ROM | disk | FTP | other *** search
/ Commodore Disk User Volume 4 #10 / Commodore_Disk_User_Vol.4_10_1991_-.d64 / c64panal (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  2KB  |  110 lines

  1. 10 gosub10000:gosub9000:t1=ti:goto30
  2. 20 pc=pc+1:pb=peek(pc):return
  3. 30 la=peek(pc)+peek(pc+1)*256
  4. 40 ifla=0thenpc=pc+2:t2=ti:goto1000
  5. 50 pc=pc+4:nl=nl+1:pb=peek(pc)
  6. 55 ln=peek(pc-2)+peek(pc-1)*256:print"";ln
  7. 60 ifpb=0thenpc=pc+1:goto30
  8. 70 ifpb=34goto150
  9. 90 ifpb<128goto200
  10. 100 pb=pband127:tk(pb)=tk(pb)+1:nt=nt+1
  11. 110 ifpb=3goto300
  12. 115 ifpb=15goto350
  13. 120 gosub20:goto60
  14. 130 :
  15. 150 gosub20:ifpb=34goto200
  16. 160 ifpb=0goto60
  17. 170 goto150
  18. 200 ifpb>64andpb<91thengosub400:goto60
  19. 210 gosub20:goto60
  20. 220 :
  21. 300 gosub20:ifpb=0goto60
  22. 310 ifpb=58thengosub20:goto60
  23. 320 goto300
  24. 330 :
  25. 350 gosub20:ifpb=0goto60
  26. 360 goto350
  27. 400 x=0:vr$="":vr$=chr$(pb)
  28. 410 gosub20
  29. 420 ifpb>64andpb<91thenvr$=vr$+chr$(pb):goto410
  30. 425 ifpb>47andpb<58thenvr$=vr$+chr$(pb):goto410
  31. 430 ifpb=36orpb=37thenvr$=vr$+chr$(pb):gosub20
  32. 440 ifvn$(x)=""thenvn$(x)=vr$:va(x)=va(x)+1:nv=nv+1:return
  33. 450 ifvn$(x)=vr$thenva(x)=va(x)+1:return
  34. 460 x=x+1:ifx<50goto440
  35. 470 return
  36. 1000 print"[147] -- program statistics --"
  37. 1005 print" program name    = ";nm$
  38. 1010 print" program size    =";pc-2049
  39. 1020 print" no of lines     =";nl
  40. 1030 print" no of commands  =";nt
  41. 1035 print" no of variables =";nv
  42. 1040 gosub1150
  43. 1060 x=0:print"[147]- commands -"
  44. 1070 fori=0to127:iftk(i)=0andi>74thennext:goto1120
  45. 1075 iftk(i)=0thengosub3000:next:goto1120
  46. 1080 x=x+1:ifx<23goto1110
  47. 1100 gosub1150:x=0:print"[147]";
  48. 1110 gosub3000:gosub3100:next
  49. 1120 gosub1150:goto1200
  50. 1140 :
  51. 1150 ifpa=1thenreturn
  52. 1160 print"  use any key to continue";
  53. 1170 getr$:ifr$=""goto1170
  54. 1180 return
  55. 1200 :
  56. 1210 print"[147]- variables -":x=0:j=0
  57. 1220 ifx>49goto1300
  58. 1225 ifvn$(x)=""goto1300
  59. 1230 pb=len(vn$(x)):ifpb>3thenpb=3
  60. 1240 onpbgoto1250,1260,1270
  61. 1250 printvn$(x);"  =";:goto1280
  62. 1260 printvn$(x);" =";:goto1280
  63. 1270 printvn$(x);"=";
  64. 1280 printva(x)
  65. 1290 x=x+1:j=j+1:ifj<22goto1220
  66. 1294 j=0:gosub1150
  67. 1298 print"[147]";:goto1220
  68. 1300 print" r=re-display, x=end, p=printer";:close4:pa=0
  69. 1310 getr$:ifr$=""goto1310
  70. 1320 ifr$="r"goto1510
  71. 1330 ifr$="x"goto2000
  72. 1340 ifr$="p"thenclose4:goto1500
  73. 1350 goto1310
  74. 1500 open4,4:cmd4:pa=1
  75. 1510 x=0:tn=41118:goto1000
  76. 1990 :
  77. 2000 print"[147]time taken=";(t2-t1)/60:end
  78. 2990 :
  79. 3000 tn$="":pb=peek(tn)
  80. 3010 ifpb>127thenpb=pband127:tn$=tn$+chr$(pb):tn=tn+1:return
  81. 3020 tn$=tn$+chr$(pb):tn=tn+1:pb=peek(tn):goto3010
  82. 3030 :
  83. 3100 j=len(tn$):j=7-j:printtn$spc(j)"=";tk(i):return
  84. 9000 :
  85. 9020 rem  load basic program at 2049
  86. 9130 :
  87. 9140 input"load from disk (y/n)";r$
  88. 9150 ifr$="n"thende=1:goto9200
  89. 9160 ifr$="y"thende=8:goto9200
  90. 9170 goto9140
  91. 9180 :
  92. 9200 input"program to be loaded==>";nm$
  93. 9210 fl=len(nm$)
  94. 9220 forj=1tofl:poke511+j,asc(mid$(nm$,j,1)):next
  95. 9230 :
  96. 9300 poke780,192:sys65424
  97. 9310 poke780,1:poke781,de:poke782,0
  98. 9320 sys65466
  99. 9330 poke780,fl:poke781,0:poke782,2
  100. 9340 sys65469
  101. 9350 poke780,0:poke781,1:poke782,8
  102. 9360 sys65493
  103. 9370 poke780,0:sys65424
  104. 9420 :
  105. 9430 return
  106. 9440 :
  107. 10000 pb=0:pc=2049:nb=0:nl=0:la=0:dimtk(127):nt=0:nv=0:x=0:j=0:tn=41118:pa=0
  108. 10015 dimva(49):dimvn$(49):vr$="":tn$="":r$="":nm$=""
  109. 10020 print"[147]":return
  110.