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

  1. 10 ifz<>0then175
  2. 15 ifa=0thena=1:load"compressor.o",8,1
  3. 20 ifa=1thena=2:poke56,31:poke55,255:clr:a=2:dimf$(3)
  4. 25 poke53281,15:poke53280,12:poke646,6
  5. 30 b$="[151]                                        [146]"
  6. 31 s$=""+b$+"               compressor               [146]"+b$
  7. 33 pa=30960
  8. 34 s1$="        * press return to exit *        [146]"+b$
  9. 35 ko$=""+chr$(193)+"[146]pic ":mi$="pic."
  10. 40 print"[147]"s$""tab(12)"koala"
  11. 43 printtab(12)"microillustrator"
  12. 45 printtab(12)"other"
  13. 47 printtab(12)"quit"
  14. 48 printtab(12)"press k, m, o, or q.":tp=1
  15. 50 wait198,15:gett$:bg=0:bo=0:nu=.
  16. 51 ift$="q"ort$="[209]"thengosub60000:goto48
  17. 55 ift$="k"thenp$=ko$:p=1:l1=32576:l2=33576:l3=24576:bg=34576:bo=0
  18. 60 ift$="m"thenp$=mi$:p=1:l1=6384:l2=7384:l3=8384:bg=6364:bo=6365
  19. 65 ift$<>"o"andt$<>"m"andt$<>"k"then50
  20. 70 ift$="o"thenprint"[147]"s$;s1$:tp=0:p=0:goto95
  21. 75 print"[147]"s$;s1$:tp=0:print"enter filename:";:gosub60500:f$=b$:p$=p$+f$
  22. 76 if b$="" then print:gosub 60000:print"[145][145][145]":goto 75
  23. 80 print"[145]"tab(15)""p$"[146]":ifleft$(p$,1)<>chr$(18)then95
  24. 85 l=len(p$):ifl<17thenp$=p$+chr$(32):goto85
  25. 90 p$=right$(p$,14):p$=chr$(129)+p$:print""
  26. 95 print" [154]load address of pic":print" address :      [157][157][157][157][157][157]";
  27. 96 nu=1:gosub60500:nu=.:f=val(b$):ifb$=""thenprint:gosub60000:print"[145][145][145]":goto95
  28. 97 iff<.orf>65535thenprint"[145][145][145]":goto95
  29. 98 n$=right$(str$(f),len(str$(f))-1)
  30. 100 print"[145]"tab(10)""n$"[157][146]":f1=int(f/256):f2=f-256*f1
  31. 105 ifpthen165
  32. 110 print"how many files to load":print" parts :        [157][157][157][157][157][157][157][157]";
  33. 112 nu=1:gosub 60500:d=val(b$):nu=0
  34. 113 if b$="" then print:gosub 60000:print"[145][145][145][145]":goto 110
  35. 115 print"[145]"tab(7)" "right$(str$(d),len(str$(d))-1)" [146]"
  36. 116 ifd<=3then120
  37. 117 print"          no more than 3 parts":fora=1to1000:next
  38. 118 print"[145]                                      [145][145][145][145][145]":goto110
  39. 120 fori=1tod
  40. 121 print"filename of part"i
  41. 122 print"-->";:gosub60500:f$(i)=b$
  42. 123 ifb$="" then print:gosub 60000:print"[145][145][145][145]":goto 121
  43. 125 print"[145]"tab(3)f$(i)"[146]":next:p$=f$(1):f$=p$
  44. 130 print"address of video matrix:";:nu=1:gosub60500:l1=val(b$)
  45. 133 ifb$="" then print:gosub 60000:print"[145][145][145]":goto130
  46. 135 l1$=right$(str$(l1),len(str$(l1))-1):print"[145]"tab(24)""l1$"[157][146]"
  47. 140 print"address of color memory:";:gosub60500:l2=val(b$)
  48. 143 ifb$="" then print:gosub 60000:print"[145][145][145]":goto140
  49. 145 l2$=right$(str$(l2),len(str$(l2))-1):print"[145]"tab(24)""l2$"[157][146]"
  50. 150 print"address of your bit map:";:gosub60500:nu=1:l3=val(b$)
  51. 153 ifb$="" thenprint:gosub 60000:print"[145][145]":goto150
  52. 155 l3$=right$(str$(l3),len(str$(l3))-1):print"[145]"tab(24)""l3$"[157][146]"
  53. 165 k$="[151]                                        [146]":print"[147]"k$""k$
  54. 170 print"[145][145][145]  insert picture disk and press  space  [146]"
  55. 171 print"     press return to return to menu"
  56. 172 poke198,.:wait198,1:gett$:ift$<>" "andt$<>chr$(13)then172
  57. 173 ift$=chr$(13)then25
  58. 174 gosub1000:ifok<>.thengosub2000:goto165
  59. 175 ifpthen195
  60. 180 ifz=0thenz=1:loadf$(1),8,1
  61. 185 ifd>1thenifz=1thenz=2:loadf$(2),8,1
  62. 190 ifd>2thenifz=2thenz=3:loadf$(3),8,1
  63. 195 ifz=0thenz=1:loadp$,8,1
  64. 200 ifl3=24576thenp$=right$(p$,14):p$="[193][146]"+p$
  65. 205 print""p$" is now loaded"
  66. 210 print""k$""k$:bg=peek(bg):bo=peek(bo)
  67. 215 print"[145][145][145]insert destination disk and hit return[146]":wait198,15:gett$
  68. 220 cp=49152:sv=cp+324
  69. 225 ifl1>29960andl1<40960thenpa=5000
  70. 230 ifl2>29960andl2<40960thenpa=5000
  71. 235 ifl3>29960andl3<40960thenpa=5000
  72. 240 syscp,l1,pa,1000
  73. 245 ra=peek(253)+256*peek(254)
  74. 250 syscp,l2,ra,1000
  75. 255 ra=peek(253)+256*peek(254)
  76. 260 syscp,l3,ra,8000
  77. 265 ra=peek(253)+256*peek(254)
  78. 270 ifl3=24576thenf$=right$(f$,len(f$)-2)
  79. 275 open2,8,2,f$+chr$(160)+n$+",p,w":syssv,pa,ra,f
  80. 277 print#2,chr$(bg)chr$(bo)
  81. 280 close2:sys65484:printtab(6)"old file length = 10000 bytes"
  82. 285 printtab(6)"new file length =";:ra=ra-pa:printra"bytes":sa=10000-ra
  83. 290 printtab(6)"[192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  84. 295 printtab(6)"memory saved    ="sa"bytes"
  85. 297 printtab(13)" hit any key [145][146]"
  86. 300 wait198,15:gett$
  87. 305 print"[147]"s$" another file (y/n)":wait198,15:gett$
  88. 310 ift$="y"thenz=0:open15,8,15:print#15,"i0:":close15:goto25
  89. 1000 ok=.
  90. 1010 fora=1tod:open15,8,15,"r0:"+f$(a)+"="+f$(a):input#15,er:close15
  91. 1020 ifer<>63thenok=a:a=d
  92. 1030 next:return
  93. 2000 mm$=f$(ok)+" is not on this disk!":ta=20-len(mm$)/2
  94. 2005 print""tab(ta)mm$
  95. 2010 print"             press space":poke198,.
  96. 2020 ifpeek(203)<>60then2020
  97. 2030 return
  98. 60000 print"[145]  are you sure you want to quit? (y/n)":poke198,.
  99. 60010 a=peek(203):ifa<>25anda<>39then60010
  100. 60020 ifa=39thenprint"[145]                                      [145]":return
  101. 60025 if (tp=.) then 25
  102. 60030 open15,8,15,"r0:compress menu=compress menu":input#15,er:close15
  103. 60040 ifer<>63then run
  104. 60050 load"compress menu",8
  105. 60500 poke198,.:b$="":print"[164]";:fora=1to17
  106. 60510 geta$:ifa$=""then60510
  107. 60520 ifa$=chr$(13)thenprint"[157] ":return
  108. 60530 ifa$=chr$(20)anda>1thenprint"[157][157]  [157][157][164]";:a=a-1:b$=left$(b$,a-1):goto60510
  109. 60535 ifa$=chr$(20)then 60510
  110. 60540 if(a=17)or((nu)and(a=6))then60510
  111. 60545 ifa$>="0"anda$<="9"then60560
  112. 60546 if nu=1 then 60510
  113. 60547 if  a$=>"[193]" and a$<="[218]" then60560
  114. 60550 if  a$<" " or a$>"z" then60510
  115. 60560 print"[157]"a$;:poke212,.:print"[164]";:b$=b$+a$:next
  116.