home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Ahoy 1987 March
/
Ahoy_Magazine_87-03_1987_Double_L.d64
/
Relocator
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
1KB
|
34 lines
0 rem *********************************
1 rem ***** relocator *****
2 rem ***** by scott miller petty *****
3 rem ***** 407 b. smith avenue *****
4 rem ***** chapel hill, n.c. *****
5 rem ***** 27514 *****
6 rem ***** (919)-967-8522 *****
7 rem *********************************
8 ifa>0then110
10 poke53281,15:poke53280,12:poke646,6
20 s$="[147][151] relocator [146]"
30 prints$"relocate c[146]ompressor or d[146]ecompressor ?"
40 wait198,15:gett$:ift$="c"thenf$="compressor.o":l=417
50 ift$="d"thenf$="decompressor.o":l=255
60 ift$<>"c"andt$<>"d"then40
70 print"[151]insert disk containing "f$" "
80 print"[151] and hit return ";:ifl=255thenprint" "
90 wait198,15:gett$:ift$<>chr$(13)then90
100 ifa=0thena=1:loadf$,8,1
110 print"[146]":input"new location ";n
120 input"new filename ";f$
130 a=int(n/256):b=n-256*a:print""tab(12)"[151]...working..."
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:end
220 close2:print"[151]new value for 'dc' = "n:end
300 ifi=49152+lthen200
310 next