home *** CD-ROM | disk | FTP | other *** search
/ Ahoy 1987 March / Ahoy_Magazine_87-03_1987_Double_L.d64 / Relocator (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  1KB  |  34 lines

  1. 0 rem *********************************
  2. 1 rem *****       relocator       *****
  3. 2 rem ***** by scott miller petty *****
  4. 3 rem ***** 407 b. smith avenue   *****
  5. 4 rem ***** chapel hill, n.c.     *****
  6. 5 rem *****               27514   *****
  7. 6 rem ***** (919)-967-8522        *****
  8. 7 rem *********************************
  9. 8 ifa>0then110
  10. 10 poke53281,15:poke53280,12:poke646,6
  11. 20 s$="[147][151]                relocator               [146]"
  12. 30 prints$"relocate c[146]ompressor or d[146]ecompressor ?"
  13. 40 wait198,15:gett$:ift$="c"thenf$="compressor.o":l=417
  14. 50 ift$="d"thenf$="decompressor.o":l=255
  15. 60 ift$<>"c"andt$<>"d"then40
  16. 70 print"[151]insert disk containing "f$" "
  17. 80 print"[151]            and hit return          ";:ifl=255thenprint"  "
  18. 90 wait198,15:gett$:ift$<>chr$(13)then90
  19. 100 ifa=0thena=1:loadf$,8,1
  20. 110 print"[146]":input"new location ";n
  21. 120 input"new filename ";f$
  22. 130 a=int(n/256):b=n-256*a:print""tab(12)"[151]...working..."
  23. 140 open2,8,2,f$+",p,w":print#2,chr$(b);:print#2,chr$(a);
  24. 150 fori=49152toi+l
  25. 160 p=peek(i):ifp<>76andp<>108andp<>32thenprint#2,chr$(p);:goto300
  26. 170 z=peek(i+2):ifz<192orz>194thenprint#2,chr$(p);:goto300
  27. 180 x=49152-n:y=peek(i+1):a=y+z*256-x:z=int(a/256):y=a-256*z
  28. 190 print#2,chr$(p);:print#2,chr$(y);:print#2,chr$(z);:i=i+2:goto300
  29. 200 ifl=255then220
  30. 210 close2:print"[151]new value for 'cp' = "n:end
  31. 220 close2:print"[151]new value for 'dc' = "n:end
  32. 300 ifi=49152+lthen200
  33. 310 next
  34.