home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 38 / 038.d81 / relocater (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  2KB  |  50 lines

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