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

  1. 10 ifa>0then25
  2. 15 poke53280,12:poke53281,15:print"":poke56,126:poke55,244:clr
  3. 20 ifa=0thena=1:print"[147]":load"decompressor.o",8,1
  4. 25 t$="[147][151]            decompressor demo           ":printt$
  5. 30 ifa=1thena=2:poke53265,peek(53265)or16
  6. 32 print"filename of pic":print" or (return) to exit :";
  7. 33 nu=0:gosub60500:f$=b$:gosub 60200
  8. 35 print"load address of pic :";:nu=1:gosub60500:la=val(b$)
  9. 38 if la<8192 then gosub 60000
  10. 40 print"   [151] hit + key to change border color."
  11. 45 print" [151] hit - key to change background color."
  12. 50 print"   [151] hit any other key to exit hires. ":fori=0to3500:next
  13. 55 print"          hit run/stop to end [146]"
  14. 60 gosub115:gosub100:poke53265,peek(53265)or16:d1=49152:d2=d1+26
  15. 65 sysd1,f$,la,52224:r1=peek(249)+256*peek(250)+6
  16. 70 sysd2,r1,55296:r2=peek(249)+256*peek(250)+6:sysd2,r2,57344
  17. 75 r3=peek(249)+256*peek(250)+6:poke53281,peek(r3+1):poke53280,peek(r3+2)
  18. 80 wait198,15:gett$:ift$="+"thenbo=bo+1:ifbo>15thenbo=0
  19. 85 ift$="-"thenbg=bg+1:ifbg>15thenbg=0
  20. 90 ift$="+"ort$="-"thenpoke53281,bg:poke53280,bo:goto80
  21. 95 gosub115:wait198,15:gett$:gosub100:goto80
  22. 100 rem ******* change banks *********
  23. 105 poke53272,56:poke53265,peek(53265)or32:poke53270,peek(53270)or16
  24. 110 poke56578,peek(56578)or3:poke56576,(peek(56576)and252)or0:return
  25. 115 rem ****** normal screen ********
  26. 120 poke53272,21:poke53265,peek(53265)and223:poke53270,peek(53270)and239
  27. 125 poke56578,peek(56578)or3:poke56576,(peek(56576)and252)or3:return
  28. 60000 print"                                   "
  29. 60001 print"     please enter a location which "
  30. 60002 print"         is larger than (8192)     "
  31. 60004 print"                                   "
  32. 60005 tt=val(ti$)+5:gosub 60100
  33. 60006 iftt>val(ti$) then 60006
  34. 60007 goto 25
  35. 60100 su=54272
  36. 60110 forcl=sutosu+24:pokecl,.:next
  37. 60120 poke su+24,15:pokesu,34
  38. 60130 poke su+1,75:pokesu+5,31
  39. 60135 poke su+6,15*16+9
  40. 60140 poke su+4,33:fordl=1to150:next
  41. 60150 poke su+4,32:fordl=1to50:next
  42. 60160 poke su+24,.:return
  43. 60200 iff$="" then 60300
  44. 60210 open15,8,15,"r0:"+f$+"="+f$
  45. 60220 input#15,er:close15
  46. 60230 if er<>63 then 60250
  47. 60240 return
  48. 60250 print"                                   "
  49. 60251 print"      disk error : file not found  "
  50. 60252 print"            please try again       "
  51. 60254 print"                                   "
  52. 60255 tt=val(ti$)+5:gosub 60100
  53. 60256 iftt>val(ti$) then 60256
  54. 60257 goto 25
  55. 60300 open15,8,15,"r0:compress menu=compress menu"
  56. 60320 input#15,er:close15
  57. 60330 if er<>63 then 25
  58. 60340 load"compress menu",8
  59. 60500 poke198,.:b$="":print"[164]";:fora=1to17
  60. 60510 geta$:ifa$="" then 60510
  61. 60520 ifa$=chr$(13) then print"[157] ":return
  62. 60530 ifa$=chr$(20)anda>1thenprint"[157][157]  [157][157][164]";:a=a-1:b$=left$(b$,a-1):goto60510
  63. 60535 ifa$=chr$(20)then 60510
  64. 60540 if(a=17) or((nu)and(a=6)) then 60510
  65. 60545 ifnu=1 and a$>="0" and a$<="9" then 60560
  66. 60546 ifnu=1 then 60510
  67. 60547 if a$=>"[193]" and a$=<"[218]"  then 60560
  68. 60550 if   a$<" " or a$>"z"  then 60510
  69. 60560 print"[157]"a$;:poke212,.:print"[164]";:b$=b$+a$:next
  70.