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