home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 248
/
248.d81
/
dev
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-08-26
|
3KB
|
129 lines
3 poke56,160:clr
4 dv=peek(186):poke1023,dv:db=peek(1023):dw=peek(1022):ifdw<8thendw=8
5 ifdb<8thendb=8
6 dimc$(100),c(100):c=0
7 poke53272,22
10 deffni(x)=peek(x)+256*peek(x+1)
11 deffnh(x)=int(x/256)
12 deffnl(x)=x-fnh(x)*256
20 mm=16*256:dd=56*256
100 sysmm+207,"$:*",dw,160*256,250
101 sysmm+210,5,255,5,20,1,1,1,1,160*256,t$,b$:print"[147]":ifw$=""then510
102 ifright$(f$,4)<>".dbs"thenprint"not a dbs file":end
103 df$=left$(f$,len(f$)-4)+".dml":printdf$
104 open4,dw,4,f$:b$=""
106 goto2000:
199 ifc=0then500
200 ck=1
201 b$="":cq=0:ce=c:forx=cktoce
202 ifleft$(c$(x),1)="#"then250
203 open4,dv,4,"dcm"+c$(x)+".ml"
204 fory=0to6:get#4,a$:a=asc(a$+chr$(0))
206 next
208 ifa=255then:close4:next:goto250
210 b$=".":ifaand128thenb$="#"
216 ifstthenclose4:stop
217 get#4,a$:a=asc(a$+chr$(0)):printa$;
218 ifa=0thengosub1000:get#4,a$:a=asc(a$+chr$(0)):goto208
220 b$=b$+a$:goto216
250 ifce<>cthenck=ce+1:goto201
300 pc=fni(dd+39):po=pc:l0=0
302 forx=1toc:l0=0:ifleft$(c$(x),1)="#"thenl0=1
303 l=len(c$(x))-1
304 ifl0=1thenl=lor128
306 pokepc,l:pc=pc+1
308 fory=2tolen(c$(x)):print".";
310 pokepc,asc(mid$(c$(x),y))
312 pc=pc+1:next:print
314 c(x)=pc:pc=pc+2:print"*";:next:print
316 pokepc,0:pe=pc
318 pc=pc+1
320 forx=1toc:printc$(x):printpc
322 sys57812"dcm"+c$(x)+".ml",dv,0
323 ph=int(pc/256):pl=pc-ph*256:printpl,ph:
324 poke780,0:poke781,pl
326 poke782,ph:sys65493
327 pokec(x)+1,ph:pokec(x),pl
328 rem pokec(x),fnl(pc):pokec(x)+1,fnh(pc)
330 pc=peek(781)+256*peek(782):ifpc<1000thenstop
332 next
390 open1,dw,15,"s0:"+df$:close1
400 sys57812df$,dw:poke193,0:poke194,56:poke174,fnl(pc):poke175,fnh(pc):sys62954
405 forx=1toc
410 ifc$(x)=".sid"thenp1=1:p3=1:gosub3000:printff$
412 ifc$(x)=".bmp"thenp2=1:p3=1:gosub3000:printff$
413 ifc$(x)=".graf"thenp4=1:p3=1:gosub3000:printff$
414 ifc$(x)=".script"thenp5=1:p3=1:gosub3000:printff$
419 next
490 goto600
499 goto40000
500 stop:open1,dv,15,"c0:"+df$+"="+f$:close1:end
510 print"no file chosen":end
600 dx=peek(1022):ifdx<8thendx=8
601 tb=160
602 poke44,8:poke2048,0:q$=chr$(34)
604 n$="b."+left$(f$,len(f$)-4)
606 print"[147]l[207]n$,dx":print"";
608 ifp1=1thengosub700
610 ifp2=1thengosub710
612 ifp4=1thengosub720
613 ifp5=1thengosub730
614 ifp3=1thenprint"1p[207]56,"tb":clr"
618 ifp3=1thenprint"goto60000":print"";
619 print"run":j=3+p1+p2+p3+p4+p5
620 poke198,j:forx=1toj:poke630+x,13:next
621 end
700 print"31sys57812"+q$+"dba.sid.ml"+q$+",d,0:p[207]780,0:p[207]781,0:p[207]782,192:sys65493
701 tb[178]144
702 [142]
710 [153]"32sys57812"[170]q$[170]"dba.unp.ml"[170]q$[170]",d,0:p(NULL)780,0:p(NULL)781,0:p(NULL)782,205:sys65493"
711 tb[178]128
712 [142]
720 [153]"33sys57812"[170]q$[170]"dba.gra.ml"[170]q$[170]",d,0:p(NULL)780,0:p(NULL)781,0:p(NULL)782,134:sys65493
725 tb=128
726 return
730 print"34sys57812"+q$+"dba.scr.ml"+q$+",d,0:p[207]780,0:p[207]781,0:p[207]782,153:sys65493
731 tb[178]128
732 [142]
999 [128]
1000 [139][202](b$,2,1)[178]"#"[167]b$[178][202](b$,2)
1001 [129]i[178]1[164]c:[139]b$[178]c$(i)[167]i[178]999
1002 [130]:[139]i[178]1000[167]1006
1004 c[178]c[170]1:c$(c)[178]b$:[153]
1006 b$[178]"":[142]
2000 [161]#4,a1$,a2$:ol[178][198](a1$)[170]256[172][198](a2$)
2002 [161]#4,a1$,a2$:nl[178][198](a1$[170][199](0))[170]256[172][198](a2$):ol[178]ol[170]2
2004 [161]#4,a1$,a2$:ol[178]ol[170]2
2006 [161]#4,a$:ol[178]ol[170]1:a[178][198](a$[170][199](0)):[139]st[179][177]0[167][160]4:[144]
2008 [139]a[178]143[167]2020
2010 [139]ol[179]nl[167]ol[178]ol[170]1:[161]#4,a$:[137]2010
2012 ol[178]nl:[137]2002
2020 ol[178]ol[170]1:[161]#4,a$:[139]a$[179][177]"."[167]2010
2022 b$[178]"."
2024 ol[178]ol[170]1:[161]#4,a$
2026 [139]a$[178]","[176]a$[178]""[167]2030
2028 b$[178]b$[170]a$:[137]2024
2030 [153]b$:[139]b$[178]".endlist"[167][160]4:[137]199
2032 [141]1000
2034 [139]a$[178]","[167]2020
2036 [137]2010
2999 [144]
3000 dw[178][194](1022):[139]dw[179]8[167]dw[178]8
3010 [139]c$(x)[178]".sid"[167]ff$[178]"dba.sid.ml":la[178]192:[137]3100
3020 [139]c$(x)[178]".bmp"[167]ff$[178]"dba.unp.ml":la[178]205:[137]3100
3030 [139]c$(x)[178]".graf"[167]ff$[178]"dba.gra.ml":la[178]134:[137]3100
3040 [139]c$(x)[178]".script"[167]ff$[178]"dba.scr.ml":la[178]153:[137]3100
3060 [153]"something went wrong":[128]
3100 [159]1,dw,15,"i0":[160]1
3110 [159]1,dw,15,"r0:"[170]ff$[170]"="[170]ff$:[132]1,en:[160]1
3120 [139]en[178]63[167][142]
3130 [158]57812ff$,dv,0:[151]780,0:[151]781,0:[151]782,la:[158]65493
3140 l[178][194](781):h[178][194](782)
3150 [158]57812ff$,dw,0:[151]193,0:[151]194,la:[151]174,l:[151]175,h:[158]62954
3160 [142]
9999 [128]
10000 d[178][194](186):[159]1,d,15,"i0":n$[178]"dev"
10001 [152]1,"s0:"[170]n$:[160]1:[148]n$,d:[128]
60000 [137]10000
60010 [151]186,10:[137]60000