home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Compute! Gazette 1988 November
/
1988-11.d64
/
datamaker.fb
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-09-20
|
752b
|
21 lines
5 print"[147]":poke646,14:poke53280,14:poke53281,6
10 open15,8,15:input"[147]filename of data";f$:open1,8,8,"0:"+f$+",p,r":gosub140
20 input"filename to create";fc$:open2,8,9,"0:"+fc$+",p,w":gosub140
30 get#1,lo$,hi$:lo=asc(lo$+chr$(0)):hi=asc(hi$+chr$(0)):lk$="":be=lo+hi*256
40 en=be:print#2,chr$(1)chr$(8)lk$;:fori=1to9:reada:print#2,chr$(a);:nexti
50 print#2,lk$chr$(lo)chr$(hi)chr$(131)chr$(32);:ct=1
60 get#1,a$:s=st:print#2,mid$(str$(asc(a$+chr$(0))),2);:ct=ct+1:en=en+1
70 ifct<7ands=0thenprint#2,",";:goto60
80 if(s)then110
90 lo=lo+6:iflo>255thenlo=lo-256:hi=hi+1
100 print#2,chr$(0);:goto50
110 print#2,chr$(0)lk$;:fori=1to5:reada:print#2,chr$(a);:nexti
120 print#2,str$(be)chr$(164)str$(en-1);:fori=1to14:reada:print#2,chr$(a);
130 nexti:close1:close2:close15:end
140 input#15,en,em$,et,es:ifen=0thenreturn
150 close1:close2:close15:print"disk error> "en;em$;et;es
160 data 10,0,137,54,51,57,57,57,0
170 data 255,249,129,73,178,58,135
180 data 65,58,151,73,44,65,58,130
190 data 73,0,0,0