home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 248 / 248.d81 / dev (.txt) < prev    next >
Commodore BASIC  |  2022-08-26  |  3KB  |  129 lines

  1. 3 poke56,160:clr
  2. 4 dv=peek(186):poke1023,dv:db=peek(1023):dw=peek(1022):ifdw<8thendw=8
  3. 5 ifdb<8thendb=8
  4. 6 dimc$(100),c(100):c=0
  5. 7 poke53272,22
  6. 10 deffni(x)=peek(x)+256*peek(x+1)
  7. 11 deffnh(x)=int(x/256)
  8. 12 deffnl(x)=x-fnh(x)*256
  9. 20 mm=16*256:dd=56*256
  10. 100 sysmm+207,"$:*",dw,160*256,250
  11. 101 sysmm+210,5,255,5,20,1,1,1,1,160*256,t$,b$:print"[147]":ifw$=""then510
  12. 102 ifright$(f$,4)<>".dbs"thenprint"not a dbs file":end
  13. 103 df$=left$(f$,len(f$)-4)+".dml":printdf$
  14. 104 open4,dw,4,f$:b$=""
  15. 106 goto2000:
  16. 199 ifc=0then500
  17. 200 ck=1
  18. 201 b$="":cq=0:ce=c:forx=cktoce
  19. 202 ifleft$(c$(x),1)="#"then250
  20. 203 open4,dv,4,"dcm"+c$(x)+".ml"
  21. 204 fory=0to6:get#4,a$:a=asc(a$+chr$(0))
  22. 206 next
  23. 208 ifa=255then:close4:next:goto250
  24. 210 b$=".":ifaand128thenb$="#"
  25. 216 ifstthenclose4:stop
  26. 217 get#4,a$:a=asc(a$+chr$(0)):printa$;
  27. 218 ifa=0thengosub1000:get#4,a$:a=asc(a$+chr$(0)):goto208
  28. 220 b$=b$+a$:goto216
  29. 250 ifce<>cthenck=ce+1:goto201
  30. 300 pc=fni(dd+39):po=pc:l0=0
  31. 302 forx=1toc:l0=0:ifleft$(c$(x),1)="#"thenl0=1
  32. 303 l=len(c$(x))-1
  33. 304 ifl0=1thenl=lor128
  34. 306 pokepc,l:pc=pc+1
  35. 308 fory=2tolen(c$(x)):print".";
  36. 310 pokepc,asc(mid$(c$(x),y))
  37. 312 pc=pc+1:next:print
  38. 314 c(x)=pc:pc=pc+2:print"*";:next:print
  39. 316 pokepc,0:pe=pc
  40. 318 pc=pc+1
  41. 320 forx=1toc:printc$(x):printpc
  42. 322 sys57812"dcm"+c$(x)+".ml",dv,0
  43. 323 ph=int(pc/256):pl=pc-ph*256:printpl,ph:
  44. 324 poke780,0:poke781,pl
  45. 326 poke782,ph:sys65493
  46. 327 pokec(x)+1,ph:pokec(x),pl
  47. 328 rem pokec(x),fnl(pc):pokec(x)+1,fnh(pc)
  48. 330 pc=peek(781)+256*peek(782):ifpc<1000thenstop
  49. 332 next
  50. 390 open1,dw,15,"s0:"+df$:close1
  51. 400 sys57812df$,dw:poke193,0:poke194,56:poke174,fnl(pc):poke175,fnh(pc):sys62954
  52. 405 forx=1toc
  53. 410 ifc$(x)=".sid"thenp1=1:p3=1:gosub3000:printff$
  54. 412 ifc$(x)=".bmp"thenp2=1:p3=1:gosub3000:printff$
  55. 413 ifc$(x)=".graf"thenp4=1:p3=1:gosub3000:printff$
  56. 414 ifc$(x)=".script"thenp5=1:p3=1:gosub3000:printff$
  57. 419 next
  58. 490 goto600
  59. 499 goto40000
  60. 500 stop:open1,dv,15,"c0:"+df$+"="+f$:close1:end
  61. 510 print"no file chosen":end
  62. 600 dx=peek(1022):ifdx<8thendx=8
  63. 601 tb=160
  64. 602 poke44,8:poke2048,0:q$=chr$(34)
  65. 604 n$="b."+left$(f$,len(f$)-4)
  66. 606 print"[147]l[207]n$,dx":print"";
  67. 608 ifp1=1thengosub700
  68. 610 ifp2=1thengosub710
  69. 612 ifp4=1thengosub720
  70. 613 ifp5=1thengosub730
  71. 614 ifp3=1thenprint"1p[207]56,"tb":clr"
  72. 618 ifp3=1thenprint"goto60000":print"";
  73. 619 print"run":j=3+p1+p2+p3+p4+p5
  74. 620 poke198,j:forx=1toj:poke630+x,13:next
  75. 621 end
  76. 700 print"31sys57812"+q$+"dba.sid.ml"+q$+",d,0:p[207]780,0:p[207]781,0:p[207]782,192:sys65493
  77. 701 tb[178]144
  78. 702 [142]
  79. 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"
  80. 711 tb[178]128
  81. 712 [142]
  82. 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
  83. 725 tb=128
  84. 726 return
  85. 730 print"34sys57812"+q$+"dba.scr.ml"+q$+",d,0:p[207]780,0:p[207]781,0:p[207]782,153:sys65493
  86. 731 tb[178]128
  87. 732 [142]
  88. 999 [128]
  89. 1000 [139][202](b$,2,1)[178]"#"[167]b$[178][202](b$,2)
  90. 1001 [129]i[178]1[164]c:[139]b$[178]c$(i)[167]i[178]999
  91. 1002 [130]:[139]i[178]1000[167]1006
  92. 1004 c[178]c[170]1:c$(c)[178]b$:[153]
  93. 1006 b$[178]"":[142]
  94. 2000 [161]#4,a1$,a2$:ol[178][198](a1$)[170]256[172][198](a2$)
  95. 2002 [161]#4,a1$,a2$:nl[178][198](a1$[170][199](0))[170]256[172][198](a2$):ol[178]ol[170]2
  96. 2004 [161]#4,a1$,a2$:ol[178]ol[170]2
  97. 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]
  98. 2008 [139]a[178]143[167]2020
  99. 2010 [139]ol[179]nl[167]ol[178]ol[170]1:[161]#4,a$:[137]2010
  100. 2012 ol[178]nl:[137]2002
  101. 2020 ol[178]ol[170]1:[161]#4,a$:[139]a$[179][177]"."[167]2010
  102. 2022 b$[178]"."
  103. 2024 ol[178]ol[170]1:[161]#4,a$
  104. 2026 [139]a$[178]","[176]a$[178]""[167]2030
  105. 2028 b$[178]b$[170]a$:[137]2024
  106. 2030 [153]b$:[139]b$[178]".endlist"[167][160]4:[137]199
  107. 2032 [141]1000
  108. 2034 [139]a$[178]","[167]2020
  109. 2036 [137]2010
  110. 2999 [144]
  111. 3000 dw[178][194](1022):[139]dw[179]8[167]dw[178]8
  112. 3010 [139]c$(x)[178]".sid"[167]ff$[178]"dba.sid.ml":la[178]192:[137]3100
  113. 3020 [139]c$(x)[178]".bmp"[167]ff$[178]"dba.unp.ml":la[178]205:[137]3100
  114. 3030 [139]c$(x)[178]".graf"[167]ff$[178]"dba.gra.ml":la[178]134:[137]3100
  115. 3040 [139]c$(x)[178]".script"[167]ff$[178]"dba.scr.ml":la[178]153:[137]3100
  116. 3060 [153]"something went wrong":[128]
  117. 3100 [159]1,dw,15,"i0":[160]1
  118. 3110 [159]1,dw,15,"r0:"[170]ff$[170]"="[170]ff$:[132]1,en:[160]1
  119. 3120 [139]en[178]63[167][142]
  120. 3130 [158]57812ff$,dv,0:[151]780,0:[151]781,0:[151]782,la:[158]65493
  121. 3140 l[178][194](781):h[178][194](782)
  122. 3150 [158]57812ff$,dw,0:[151]193,0:[151]194,la:[151]174,l:[151]175,h:[158]62954
  123. 3160 [142]
  124. 9999 [128]
  125. 10000 d[178][194](186):[159]1,d,15,"i0":n$[178]"dev"
  126. 10001 [152]1,"s0:"[170]n$:[160]1:[148]n$,d:[128]
  127. 60000 [137]10000
  128. 60010 [151]186,10:[137]60000
  129.