home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 38
/
038.d81
/
relocater
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
2KB
|
50 lines
8 ifmm>0then110
10 poke53281,15:poke53280,12:poke646,6
20 s$="[147][151] relocator [146]"
30 prints$
32 print" c [151]- relocate compressor"
34 print" d [151]- relocate decompressor"
36 print" q [151]- quit"
38 print" press c[151], d[151], or q[151]."
40 a=peek(203):ifa<>20anda<>18anda<>62then40
45 ifa=20thenf$="compressor.o":l=417
50 ifa=18thenf$="decompressor.o":l=255
55 ifa=62thengosub60000:goto38
70 print"[151]insert disk containing "f$" "
80 print"[151] and press return ";:ifl=255thenprint" "
90 a=peek(203):ifa<>1then90
100 ifmm=0thenmm=1:loadf$,8,1
110 print"[146]":print"enter new location:";:al=.:gosub60500:al=1:n=val(b$)
120 print"enter new filename:";:gosub60500:f$=b$
130 a=int(n/256):b=n-256*a:print""tab(12)"[151]...working..."
135 open15,8,15,"i0":print#15,"uj":close15
140 open2,8,2,f$+",p,w":print#2,chr$(b);:print#2,chr$(a);
150 fori=49152toi+l
160 p=peek(i):ifp<>76andp<>108andp<>32thenprint#2,chr$(p);:goto300
170 z=peek(i+2):ifz<192orz>194thenprint#2,chr$(p);:goto300
180 x=49152-n:y=peek(i+1):a=y+z*256-x:z=int(a/256):y=a-256*z
190 print#2,chr$(p);:print#2,chr$(y);:print#2,chr$(z);:i=i+2:goto300
200 ifl=255then220
210 close2:print"[151]new value for 'cp' = "n:goto400
220 close2:print"[151]new value for 'dc' = "n:goto400
300 ifi=49152+lthen200
310 next
400 print" press space to continue":poke198,.
410 ifpeek(203)<>60then410
420 run
60000 print"[145] are you sure you want to quit? (y[151]/n[151])"
60010 a=peek(203):ifa<>25anda<>39then60010
60020 ifa=39thenprint"[145] [145]":return
60030 open15,8,15,"r0:compress menu=compress menu":input#15,er:close15
60040 ifer<>63thenpoke198,.:print"[147]":end
60050 load"compress menu",8
60500 b$="":print"[164]";:poke198,.:fora=1to17
60510 geta$:ifa$=""then60510
60520 ifa$=chr$(13)thenprint"[157] ":return
60530 ifa$=chr$(20)anda>1thenprint"[157][157] [157][157][164]";:a=a-1:b$=left$(b$,a-1):goto60510
60540 if((al)and(a=17))or((no)and(a=6))then60510
60550 ifa$>="0"anda$<="9"then60580
60560 if(al)anda$>=" "anda$<="[218]"then60580
60570 goto60510
60580 print"[157]"a$;:poke212,.:print"[164]";:b$=b$+a$:next