home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Light
/
Light_Vol.1_May_1992_Datasphere_Publications_Disk_1_of_2_Side_B.d64
/
tracer
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
4KB
|
116 lines
1 a=a+1:ifa=1thenload"trc.chr",8,1
2 poke53280,11:poke53281,11:poke53265,11
3 poke56578,63:poke56576,148:poke53272,49:poke648,204
4 print"[147]the disk program tracer august 1991"
5 print"[158] written for the light sampler disk"
6 print"[153] please insert a disk into drive"
7 print" device 8 and then press return to"
8 print" begin the analysis procedure.":poke198,0:poke53265,27
9 geta$:ifa$<>chr$(13)then9
10 open15,8,15,"i0":open8,8,8,"#0":open9,8,9,"#1":input#15,e,e$:ife=0then13
11 close9:close8:close15:print"[147] disk error: [158]"e$
12 print"[153] press any key to continue":poke198,0:wait198,1:poke198,0:run
13 dim f$(144)
14 print"[147][158] 1 tracks[158] 2 3 ":print" ";:fort=1to35
15 printright$(str$(t),1);:next:print"[150] [219][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177][177]"
16 fors=0to20:print""mid$(" sectors ",s+1,1)"[158] ";
17 printchr$(-157*(s=10ors=20))right$(str$(s),1-1*(s=10ors=20))"[150][179]"
18 next:printtab(34)"[152][145][145][145][145][166][166][166][166][166]":printtab(28)"[166][166][166][166][166][166][166][166][166][166][166]":fori=1to2
19 print,," [166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166][166]":next
20 print" reading and plotting bam information [157][148] [155]";
21 print#15,"u1:8 0 18 0":fort=1to35:print#15,"b-p:8"t*4+1
22 poke52227+t,peek(52227+t)or128:poke52267+t,peek(52267+t)or128
23 fory=0to2:get#8,a$:b(y)=asc(a$+chr$(0))
24 next:s=20:ift>17thens=18
25 ift>24thens=17
26 ift>30thens=16
27 poke646,-15*(t<>18)
28 poke781,3:poke782,3+t:poke783,0:sys65520
29 r=0:fory=0to2:b=b(y):forbt=0to7:v=int(b/2):ss=b-v*2
30 ifr>sthen32
31 poke199,1-ss:print"@[157]";
32 b=v:r=r+1:nextbt,y
33 poke52227+t,peek(52227+t)and127:poke52267+t,peek(52267+t)and127:next
34 ds=1:fi=0:poke781,24:poke782,0:poke783,0:sys65520
35 print#15,"u1:9 0 18"ds:print#15,"b-p:9 0"
36 get#9,t$:nt=asc(t$+chr$(0))
37 get#9,s$:ns=asc(s$+chr$(0))
38 forf=0to7:print#15,"b-p:9"f*32+2
39 print"[146] [145]":poke53223,32
40 get#9,ty$:ty=asc(ty$+chr$(0)):fi$=""
41 if(tyand128)=0then63
42 ty=tyand3:ifty<1orty>2then63
43 get#9,ts$:get#9,ss$:t=asc(ts$+chr$(0)):s=asc(ss$+chr$(0)):ift=0then63
44 forn=0to15:get#9,a$:fi$=fi$+a$:next
45 forn=0to8:get#9,a$:next
46 get#9,bl$:get#9,bh$:b=asc(bl$+chr$(0))+(asc(bh$+chr$(0))*256)
47 ifb=0then63
48 fi$=right$(" "+str$(b),3)+" "+fi$+" "+mid$("seqprg",ty*3-2,3)
49 print" working on "mid$(fi$,6,16)" [145]":poke53223,160
50 f$(fi)=fi$:f0=(fi/36-int(fi/36))*36:f1=129+f0-21*(f0>25)
51 f2=val(mid$("05071014",int(fi/36)*2+1,2)):fi=fi+1:ifb<0thenb=0
52 printtab(36)""right$(" "+str$(b),3)"[145]"
53 print#15,"u1:8 0"t;s:b=b-1:input#15,e:ife=0then56
54 f$(fi-1)="[150] "+f$(fi-1)+" "
55 poke52347+t+s*40,42:poke55419+t+s*40,1:goto63
56 if(peek(52347+t+s*40)=128)andb>-1then58
57 poke52347+t+s*40,f1-128:poke55419+t+s*40,15:goto59
58 poke52347+t+s*40,f1:poke55419+t+s*40,f2
59 print#15,"b-p:8 0":get#8,t$:t=asc(t$+chr$(0))
60 get#8,s$:s=asc(s$+chr$(0)):ift<1ort>35thenprinttab(38)"0[145]":goto63
61 ifs>20then54
62 goto52
63 next:ifntthends=ns:goto35
64 t=0:s=0:close9:close8:close15:w=14:a$="":goto77
65 p=52347+t+s*40
66 z1=peek(p):z2=peek(p+3072)and15
67 w=w+1:ifw>7thenpokep,z1:pokep+3072,z2
68 ifw=15thenw=0:pokep,160:pokep+3072,1
69 geta$:ifa$=""then67
70 k=0:fori=1to8:ifa$=mid$("[145][157]tq"+chr$(13),i,1)thenk=i:i=8
71 next:ifk=0then67
72 pokep,z1:pokep+3072,z2:s1=s:t1=t
73 ifa$=""thent=1:s=0:goto81
74 ifa$="[145]"thens=s+1*(s>0):goto81
75 ifa$=""thens=s-1*(s<20):goto81
76 ifa$="[157]"thent=t+1*(t>1):goto81
77 ifa$=""thent=t-1*(t<35)
78 ifa$="t"then91
79 ifa$="q"then110
80 ifa$=chr$(13)then102
81 p=peek(52347+t+s*40):ifp=102thens=s1:t=t1:w=14:goto65
82 w=14:z1=peek(52347+t+s*40):z2=peek(55419+t+s*40)and15:z1=z1+128*(z1>128)
83 poke56295,1
84 ifz2>0andz2<15then87
85 ifz2=15and((z1>0andz1<128)and(z1<>46))then87
86 print" [145]":fi=-1:poke53223,32:goto65
87 fi=(z1-1)+21*(z1>47):fi=fi-36*(z2=7)-72*(z2=10)-108*(z2=14)
88 print" [145]"
89 ifz1=42thenprint" errornous sector[145]":poke53223,160:goto65
90 print" details: "f$(fi)"[145]":poke53223,160:goto65
91 if(z1<>128)or(t=18)then67
92 print" please wait - tracking sectors [145]":poke2023,160
93 poke52347+t+s*40,46:poke55419+t+s*40,15
94 open15,8,15:open8,8,8,"#"
95 print#15,"u1:8 0"t;s:input#15,e:ife=0then97
96 poke52347+t+s*40,42:poke55419+t+s*40,1:goto101
97 print#15,"b-p:8 0":get#8,t$:t1=asc(t$+chr$(0)):ift1<1ort1>35then101
98 get#8,s$:s1=asc(s$+chr$(0))
99 p=52347+t1+s1*40:ifpeek(p)<>128andpeek(p)<>46then101
100 pokep,43:pokep+3072,15:t=t1:s=s1:goto95
101 close8:close15:w=14:t=t-1:a$="":goto77
102 iffi=-1then67
103 f0=(fi/36-int(fi/36))*36:f1=129+f0-21*(f0>25)
104 f1=f1+128*((peek(52347+t+s*40))<128)
105 f2=val(mid$("05071014",int(fi/36)*2+1,2))
106 iff1<128thenf2=15
107 poke251,f1:poke252,f2:sys51200
108 print" press any key to continue [145]":poke53223,160
109 poke198,0:wait198,1:poke198,0:sys51304:w=14:goto65
110 print"[153] do you really want to quit? select y/n[145]"
111 poke53223,160:poke56295,13:poke198,0
112 geta$:ifa$="y"then115
113 ifa$<>"n"then112
114 t=t-1:a$="":goto77
115 print"[147]":sys64738