home *** CD-ROM | disk | FTP | other *** search
/ The Datafile PD-CD 2 / DATAFILE_PDCD2.iso / utilities2 / _suite / !Suite / !RunImage (.txt) < prev    next >
RISC OS BBC BASIC V Source  |  1993-09-21  |  14KB  |  606 lines

  1.  >!RunImage
  2.  For !Suite
  3.  NSW 21/09/93
  4. Qp$="1.41 (21st September 93)":
  5. $+" (internal error code "+
  6. +")",
  7. $+" (internal error code "+
  8. +")",
  9. &400E1,,c%,
  10. ea%>0
  11. fa%>ea%+K%*100
  12. &ea%=0:$L%="hh:mm":
  13. $L%+=":ss"
  14. _%=D%:
  15. D%=-1
  16. _%=-2
  17. i(_%,l%)
  18. :?a%=0:
  19. &7,14,a%:e$=$(a%+16):
  20. z%=0e$=
  21. e$,5)
  22. _%=D%:
  23. D%=-1
  24. _%=-2
  25. W$L%=e$:!a%=_%:a%!4=l%:
  26. &400CE,,a%:
  27. &400D1,a%!0,a%!8+12,a%!12+12,a%!16-12,a%!20-12
  28. &400C5,,c%
  29. &400C6,,c%:
  30. !c%=p%
  31. !c%=M%d$()="":ga%=0:ha%=0
  32. 5:ia%=
  33. d(g%,3):
  34. !c%=p%
  35. ja%:`%=
  36. ja%=121`%=
  37. 8:ka%=c%!24:q%=!c%:la%=-42:
  38. ka%=13
  39. &400DC,ka%
  40. 17,18,19:
  41. &400DD:
  42. d:a$()="":j%=0:B%=0:
  43. f(p%):
  44. c% 512,na% 512,oa% 128,pa% 512,qa% 128,ra% 20,sa% 256,ta% 512,ua% 128,va% 512,wa% 128,a% 256,xa% 1512,ya% 600,za% 5,Aa% 15
  45. a$(77),a%(77),d$(77),Ba% 512,Ca% 256,L% 10,Da% 30,Ea% 100,Fa% 300,c$(1),Ga% 512,Ha% 128,b$(2),Ia% 128,Ja% 128,Ka% 5,La% 30:
  46. &400C0,200,&4B534154,"Suite"
  47. E:f%=
  48. ("<Suite$Dir>.Sprites")
  49. f%=0o%=
  50. b("What have you done with my sprites file?!",0):
  51. &400DD:
  52. 'dNa%=
  53. #f%+16:
  54. C% Na%:!C%=Na%-1:C%!4=0:C%!8=16:C%!12=16:
  55. &2E,256+10,C%,"<Suite$Dir>.Sprites"
  56. (zB%=0:j%=0:ha%=0:ga%=0:Oa%=0:Pa%=
  57. :$Aa%="sspeakeroff":$za%="":$Da%="sclks":$L%="hh:mm:ss":ea%=0:$La%="sarm3off":$Ka%=""
  58. l$="":r%=0:s%=0:t%=0:u%=0:m%=0:v%=0:l%=0:n%=0:w%=0:Qa%=0:Ra%=
  59. :$ra%="Error from Suite":Sa%=
  60. :ma%=
  61. c("pro"):h$=
  62. h$-4):c$(0)="hh:mm":c$(1)="hh:mm:ss":b$(0)="on left icon bar":b$(1)="on right icon bar":b$(2)="in window"
  63. 5,"Set ARM3$Present -1":
  64. 5,"RMEnsure ARM3Support 0 Set ARM3$Present 0":Ta%=
  65. g("ARM3$Present"):
  66. 5,"UnSet ARM3$Present":
  67. v:N%=0:O%=0:P%=0:Q%=0:R%=0:S%=0:T%=0:F%=0:U%=0:
  68. &20010
  69. d$:d$=
  70. d$,"!RunImage")+9)):
  71. d$,"BIN")>0N%=-1
  72. d$,"SET")>0O%=-1
  73. d$,"BAS")>0P%=-1
  74. d$,"VDU")>0Q%=-1
  75. d$,"SPE")>0R%=-1
  76. d$,"CSD")>0S%=-1
  77. d$,"SPR")>0T%=-1
  78. d$,"CLK")>0F%=-1
  79. d$,"ARM")>0U%=-1
  80. Ua%k%=2048:x%=17:y%=34
  81. k%=0:x%=34:y%=68
  82. N%r%=
  83. a(-2,0,0,x%*2-(x%
  84. 17)*5,68,12554+k%,"bin",0,0,0,
  85. O%s%=
  86. a(-2,0,0,x%*2,68,12554+k%,"settype",0,0,0,
  87. P%t%=
  88. a(-2,0,0,x%*2,68,12554+k%,"basedit",0,0,0,
  89. Q%u%=
  90. a(-2,0,0,x%*2,68,12554+k%,"vdu",0,0,0,
  91. m:m%=
  92. a(-2,0,0,x%*2-(x%
  93. 17)*10,y%,12555+k%,"",za%,Aa%,5,
  94. S%v%=
  95. a(-2,0,0,x%*2,68,12554+k%,"csd",0,0,0,
  96. T%w%=
  97. a(-2,0,0,x%*2,68,12554+k%,"icons",0,0,0,
  98. k:n%=
  99. a(-2,0,0,x%*2,68,12555+k%,"",Ka%,La%,5,
  100. (r%=0
  101. n%=0)Qa%=
  102. a(-2,0,0,68,68,12298,"!suite",0,0,0,
  103. l%<>0
  104. _%=D%:
  105. D%=-1
  106. _%=-2
  107. b(_%,l%)
  108. 0:$L%="hh:mm":$Da%="sclkm":Va%=54*2
  109. 1:$L%="hh:mm:ss":$Da%="sclks":Va%=78*2
  110. 0:D%=-2:x%=0:Wa%=0:Xa%=68:
  111. f(Ya%)
  112. 1:D%=-1:x%=0:Wa%=0:Xa%=68:
  113. f(Ya%)
  114. 2:D%=Ya%:x%=(190-Va%)/2:Wa%=-84:Xa%=0:
  115. h(Ya%)
  116. N:l%=
  117. a(D%,x%,Wa%,x%+Va%,Xa%,385888571,"",L%,Da%,10,
  118. &400D9,,"<Suite$Dir>.Templates":Za%=
  119. e(na%,oa%,127,"info",C%):M%=
  120. e(ta%,ua%,127,"sett",C%):p%=
  121. e(va%,wa%,127,"delf",C%):Ya%=
  122. e(Ga%,Ha%,127,"clck",C%):_a%=
  123. e(Ba%,Ca%,255,"scsd",C%)
  124. PFg%=
  125. e(xa%,ya%,599,"opts",C%):
  126. &400DA:$(oa%+20)=p$:
  127. F(g%,8,
  128. Ta%):
  129. w:h%=&7091031:b%=pa%:$b%="!Suite":b%!12=459271:b%!16=16*11:b%!20=44:b%!24=0:
  130. a(b%+28,0,Za%,h%,"Info"):
  131. a(b%+52,0,b%+200,h%,"Show"):
  132. a(b%+76,0,g%,h%,"Options"):
  133. a(b%+100,128,-1,h%,"Quit")
  134. b%=pa%+200:$b%="Show":b%!12=459271:b%!16=16*12:b%!20=44:b%!24=0:
  135. a(b%+28,(0-N%),-1,h%,"Bin"):
  136. a(b%+52,(0-O%),-1,h%,"Set-Type"):
  137. a(b%+76,(0-P%),-1,h%,"BASIC Ed"):
  138. a(b%+100,(0-Q%),-1,h%,"VDU")
  139. a(b%+124,(0-R%),-1,h%,"Speaker"):
  140. a(b%+148,(0-S%),-1,h%,"Set CSD"):
  141. a(b%+172,(0-T%),-1,h%,"Icon Cacher"):
  142. a(b%+196,(0-F%),-1,h%,"Clock"):
  143. a(b%+220,(128-U%),-1,h%+((Ta%+1)<<22),"ARM3 Cache")
  144. b%=Ea%:$b%="Format":b%!12=459271:b%!16=16*12:b%!20=44:b%!24=0:
  145. a(b%+28,0+(z%=0)*-1,-1,h%,c$(0)):
  146. a(b%+52,128+(z%=1)*-1,-1,h%,c$(1)):b%=Fa%:$b%="Time":b%!12=459271:b%!16=16*8:b%!20=44:b%!24=0
  147. a(b%+4+e%*24,0+(e%=K%)*-1,-1,h%,
  148. e%+" secs"):
  149. a(b%+4+9*24,128+(K%=9)*-1,-1,h%,"9 secs"):b%=Ia%:$b%="Position":b%!12=459271:b%!16=16*20:b%!20=44:b%!24=0:
  150. a(b%+28,(G%=0)*-1,-1,h%,b$(0))
  151. a(b%+52,(G%=1)*-1,-1,h%,b$(1)):
  152. a(b%+76,128+(G%=2)*-1,-1,h%,b$(2)):
  153. !c%<>2`a%=0
  154. 0:N%=
  155. 1:O%=
  156. 2:P%=
  157. 3:Q%=
  158. 4:R%=
  159. 5:S%=
  160. 6:T%=
  161. 7:F%=
  162. 8:U%=
  163. 3:ma%=
  164. 1:e%=0:
  165. e%+=4:
  166. c%!e%=-1:e%+=4:z%=c%!e%:
  167. 1:Ea%!(28+e%*24)=Ea%!(28+e%*24)
  168. c(g%,14,c$(z%)):
  169. 2:e%=0:
  170. e%+=4:
  171. c%!e%=-1:e%+=4:K%=(c%!e%)+1:
  172. 9:Fa%!(4+e%*24)=(Fa%!(4+e%*24)
  173. 1)+(e%=K%)
  174. c(g%,12,
  175. 3:e%=0:
  176. e%+=4:
  177. c%!e%=-1:e%+=4:G%=c%!e%:
  178. 2:Ia%!(28+e%*24)=(Ia%!(28+e%*24)
  179. 1)+(e%=G%)
  180. c(g%,13,b$(G%)):
  181. &400CF,,a%:
  182. (!(a%+8)
  183. 1)>0`a%=0:
  184. &400D4,,pa%,!a%,a%!4
  185. c%!16
  186. 0:ma%=
  187. 3:E%=c%!40:
  188. G:c$="":i%=c%+43:
  189. i%?1<>0:i%+=1:c$+=
  190. c%!24
  191. B%=78
  192. c("er7"),
  193. t1a$(B%)=c$:
  194. E%=4096
  195. E%=8192
  196. a%(B%)=
  197. a%(B%)=
  198. B%+=1:
  199. E%=4096
  200. E%=8192o%=
  201. c("er1"),0):
  202. d$(ha%)=c$:ha%+=1:
  203. E%=4096
  204. E%=8192o%=
  205. c("er2"),0):
  206. H(c$)
  207. E%=4096
  208. E%=8192o%=
  209. c("er3"),0):
  210. I(c$)
  211. m%:o%=
  212. c("er4"),0)
  213. J(c$,(E%=4096
  214. E%=8192))
  215. K(c$,(E%=8192))
  216. l%:o%=
  217. c("er9"),0)
  218. n%:o%=
  219. c("e10"),0)
  220. #c%!20,"Run "+
  221. g("Suite$Dir")
  222. 1282:
  223. &4C49454E:
  224. c%!20
  225. 0:N%=(c%!24=1)
  226. 1:O%=(c%!24=1)
  227. 2:P%=(c%!24=1)
  228. 3:Q%=(c%!24=1)
  229. 4:R%=(c%!24=1)
  230. 5:S%=(c%!24=1)
  231. 6:T%=(c%!24=1)
  232. 7:F%=(c%!24=1)
  233. 8:U%=(c%!24=1)
  234. y:x%=!c%:y%=c%!4:ab%=c%!8:q%=c%!12:d%=c%!16:
  235. M(x%,y%,q%=-2)
  236. p%:`%=
  237. d%=4`%=
  238. d%=l%
  239. ea%:?a%=0:
  240. &7,14,a%:e$=$(a%+16):
  241. z%=0e$=
  242. e$,5)
  243. Y$L%=e$:!a%=D%:a%!4=l%:
  244. &400CE,,a%:
  245. &400D1,a%!0,a%!8+12,a%!12+12,a%!16-12,a%!20-12:
  246. r%:a$=
  247. c("ex1")
  248. s%:a$=
  249. c("ex2")
  250. u%:a$=
  251. c("ex3")
  252. m%:Ra%=
  253. v%:a$=
  254. c("ex4")
  255. w%:a$=
  256. c("ex5")
  257. ea%:?a%=0:
  258. &7,14,a%:e$=$(a%+16):
  259. z%=0e$=
  260. e$,5)
  261. Y$L%=e$:!a%=-2:a%!4=l%:
  262. &400CE,,a%:
  263. &400D1,a%!0,a%!8+12,a%!12+12,a%!16-12,a%!20-12:
  264. n%:V%=
  265. Qa%:o%=
  266. c("er6"),0):
  267. c("er5")+a$,0)
  268. 6:ca%=
  269. 8:da%=
  270. 12:`a%=2:
  271. &400E8,,Fa%,x%,y%
  272. 13:`a%=3:
  273. &400E8,,Ia%,x%,y%
  274. 14:`a%=1:
  275. &400E8,,Ea%,x%,y%
  276. j%>=B%
  277. d(g%,4)
  278. Ma%>=310
  279. :j%+=1:g$=a$(j%):
  280. g$<>""
  281. j%>=B%:
  282. j%+=1:
  283. a$(j%)=""
  284. A:ga%+=1:
  285. d$(ga%)=""d$()="":ha%=0:ga%=0:
  286. f(M%):
  287. M(bb%,cb%,db%):
  288. db%cb%=272
  289. $`a%=0:
  290. &400D4,,pa%,bb%-64,cb%:
  291. K(f$,eb%):
  292. (f$+".!Sprites"):
  293. &5,"IconSprites "+f$+".!Sprites"
  294. c("er8"),
  295. J(f$,fb%):gb%=
  296. d(g%,5):
  297. f(f$)
  298. &5,"Dir "+f$:
  299. h(_a%):
  300. c(_a%,1,
  301. f$,50))
  302. k:hb%=V%:V%=
  303. ib%*-1:
  304. hb%<>V%
  305. n%<>0
  306. Q:V%=
  307. ib%:$La%=
  308. "sarm3off,sarm3on",V%*10,8):V%=V%*-1:
  309. jb%:$La%="sarm3on"
  310. kb%:$La%="sarm3off"
  311. i(-2,n%):
  312. x:lb%=Ra%:Ra%=
  313. mb%*-1:
  314. lb%<>Ra%
  315. m%<>0
  316. nb%:$Aa%="sspeakeron"
  317. ob%:$Aa%="sspeakeroff"
  318. i(-2,m%):
  319. i(I%,d%):a%!0=I%:a%!4=d%:
  320. &400CE,,a%:
  321. &400D1,a%!0,a%!8,a%!12,a%!16,a%!20:
  322. b(-2,r%):r%=0
  323. b(-2,s%):s%=0
  324. b(-2,t%):t%=0
  325. b(-2,u%):u%=0
  326. b(-2,v%):v%=0
  327. b(-2,w%):w%=0
  328. b(-2,m%):m%=0
  329. b(-2,n%):n%=0
  330. j:b%=pa%+200:
  331. Ua%k%=2048:x%=17:y%=34
  332. k%=0:x%=34:y%=68
  333. 0:Va%=0
  334. 1:Va%=78
  335. N%=-1r%=
  336. a(-2,0,0,x%*2-(x%
  337. 17)*5,68,268448042+k%,"bin",0,0,0,
  338. O%=-1s%=
  339. a(-2,0,0,x%*2,68,268448042+k%,"settype",0,0,0,
  340. P%=-1t%=
  341. a(-2,0,0,x%*2,68,268448042+k%,"basedit",0,0,0,
  342. Q%=-1u%=
  343. a(-2,0,0,x%*2,68,268448042+k%,"vdu",0,0,0,
  344. R%=-1
  345. m:m%=
  346. a(-2,0,0,x%*2-(x%
  347. 17)*10,y%,268448011+k%,"",za%,Aa%,5,
  348. S%=-1v%=
  349. a(-2,0,0,x%*2,68,268448042+k%,"csd",0,0,0,
  350. T%=-1w%=
  351. a(-2,0,0,x%*2,68,268448042+k%,"icons",0,0,0,
  352. F%=-1
  353. U%=-1
  354. Q:n%=
  355. a(-2,0,0,x%*2,68,268448011+k%,"",Ka%,La%,5,
  356. b(-2,r%):r%=0
  357. b(-2,s%):s%=0
  358. b(-2,t%):t%=0
  359. b(-2,u%):u%=0
  360. b(-2,m%):m%=0
  361. b(-2,v%):v%=0
  362. b(-2,w%):w%=0
  363. b(D%,l%):l%=0:
  364. f(Ya%)
  365. b(-2,n%):n%=0
  366. (r%=0
  367. n%=0)
  368. a(-2,0,0,68,68,12298,"!suite",0,0,0,
  369. b(-2,Qa%):Qa%=0
  370. pb%!28=0-N%:b%!52=0-O%:b%!76=0-P%:b%!100=0-Q%:b%!124=0-R%:b%!148=0-S%:b%!172=0-T%:b%!196=0-F%:b%!220=128-U%:
  371. b(q%,d%):
  372. "a%!0=q%:a%!4=d%:
  373. &400C4,,a%:
  374. n:g$=a$(j%):
  375. c(p%,1,
  376. g$,35)):
  377. a%(j%)=
  378. c(p%,2,h$+"directory?")
  379. c(p%,2,h$+"file?")
  380. d(g%,4)
  381. c(p%,2,h$+"selection?"):
  382. c(p%,1,
  383. f(g$),35)+".*")
  384. d(g%,3):
  385. #!a%=p%:
  386. a%!4=3
  387. &400C4,,a%:
  388. i(p%,3)
  389. 8!a%=p%:a%!8=8388608:a%!12=0:
  390. a%!4=3
  391. &400CD,,a%:
  392. h(p%):
  393. =67734
  394. &5,"UP":
  395. $+" (internal error code "+
  396. +")",
  397. d(g%,0)n$="F":pb%=5:
  398. n$="":pb%=1
  399. Ma%>=310
  400. d(g%,4)
  401. &400DE,"Filer_Action"
  402. &40F80,qb%,
  403. f(a$(j%))+
  404. 0:m$="":i$=
  405. f(a$(j%)):
  406. :o$=a$(j%):
  407. f(o$)=i$
  408. h(o$)+" ":a$(j%)=""
  409. lj%+=1:
  410. j%>=B%:
  411. &40F81,qb%,m$+
  412. &40F82,qb%,2,pb%,0,0,0:j%=0:m$="":
  413. :j%+=1:
  414. a$(j%)<>""
  415. j%>=B%:
  416. &400DE,"Filer_Action"
  417. &40F80,qb%,
  418. f(g$)+
  419. &40F81,qb%,
  420. h(g$):
  421. &40F82,qb%,2,pb%,0,0,0
  422. &5,"Wipe "+g$+" ~C~VR"+n$
  423. h(i$):$a%=i$:A%=a%:=$
  424. a$(e%)<>""
  425. f(i$):$a%=i$:A%=a%:
  426. sb%:=$a%
  427. o:l$=d$(ga%):j$="":
  428. c(M%,2,
  429. l$,35)):
  430. c(M%,3,j$):
  431. h(M%):
  432. R(M%,3,
  433. H(c$):
  434. d(g%,1)
  435. Di%=0:k$=c$:
  436. k$,".")<>0:i%+=1:k$=
  437. c$-i%):
  438. c$,i%-1):
  439. &5,"Dir "+q$
  440. :k$=c$:
  441. r("*BASIC -load """+k$+""""+
  442. 13+"EDIT"+
  443. &400DE,"BASIC":
  444. r("*BASIC"+
  445. 13+"EDIT"+
  446. &400DE,"BASIC":
  447. I(c$):tb%=
  448. &5,"echo <22><12>":
  449. &5,"echo <28><0><31><79><0><17><134><12>":
  450. &5,"echo <17><4><31><33><0>Shift to continue":
  451. &5,"echo <28><0><30><79><1>":
  452. &5,"echo <17><128><17><2><12>"
  453. &5,"echo <14>":
  454. &5,"type "+c$:
  455. &5,"echo <15>":
  456. '"Press SPACE or click mouse to continue":
  457. :ka%=
  458. ka%<>-1:
  459. &400E3,tb%:
  460. z:j$=
  461. k(M%,3):
  462. &5,"SetType "+l$+" "+j$:
  463.