home *** CD-ROM | disk | FTP | other *** search
Wrap
RISC OS BBC BASIC V Source | 1996-04-29 | 16.4 KB | 526 lines
--> CD Catalogue This program and all documentation David Holden 1995 A_$="1.00": 262343,D_%,E_% G_%:A%=1:B%=E_%:G%=H_%:H%=I_%: 262341,,E_% 262351,,L_%+100: L_%?108=4 :E_%!100=K_%: 262342,,E_%+100:M_%=N_%:O_%=P_%:Q_$=$R_% 262342,,E_%:I%= T_(0) 262342,,E_%:E_%!4=0: 262340,,E_%:I%= T_(0) 262342,,E_% W_(X_%,Y_%) 262364,E_%!24 17,18: E_%!16 262351,,E_%+&C0:c_%=E_%!&C8:d_%=E_%!&C4: E_%!4=-1 0:!E_%=G_%: 262342,,E_%:!E_%=U_%: 262342,,E_%:$e_%="CDview Help": f_(g_$+".!Help") c_%=1 262356,,h_%,i_%,j_% k_%,l_%:i_%=!E_%:d_%=E_%!4:c_%=E_%!8:l_%=E_%!12:k_%=E_%!16: k_%=m_% 1:P_%=O_%:N_%=M_%:$R_%=Q_$: n_(P_%) 2:j_%=228: 262356,,h_%,i_%-60,j_% 4:P_%=o_%+1:N_%=48: $(o_%+4)=".^" $R_%=g_$+".^" $R_%=$(o_%+4) n_(P_%) 263872: p_(k_%) 64,16:I%= q_(k_%,P_%)+1: :I%+=1: ?I%>32:r_$=$R_%+"."+$I%: s_(K_%,k_%) &416,&404:I%= q_(k_%,P_%)+1: :I%+=1: ?I%>32:r_$=$R_%+"."+$I% 263873 N_%=48 263872:A%=4:B%=P_%:C%=N_%:P_%= (J_%):N_%=P_%?1:I%=R_%+ ($R_%): ?I%<>46:I%-=1: :?I%=13: n_(P_%): 263873: q_(i%,p%): t_%:t_%=i%:p%= u_(p%): t_%>0: ?p%<>N_%:p%= u_(p%): u_(p%) u_(p%) :t_%-=1: p_(i%): v_%,t_%,x%,y%,w_%: q_(i%,P_%): ">":P_%=v_%:N_%+=1:v_%+=2: ?v_%<32:v_%+=1: :$R_%=$R_%+"."+$v_%: n_(P_%) x_(K_%,i%,0):I%=v_%+1: :I%+=1: ?I%>32:$e_%=$I%:r_$=$R_%+"."+$e_%:!E_%=G_%: 262342,,E_%:!E_%=U_%: 262342,,E_%:I%= T_(0): ?v_%<> !y_%=U_%: 262348,,y_%:$(y_%!76)=$e_%: 53,-1,11 ,,x%: 53,-1,4 ,,w_%:x%=x%<<w_%: 53,-1,12 ,,y%: 53,-1,5 ,,w_%:y%=y%<<w_%:!E_%=0:E_%!4=-(y%-40):E_%!8=x%-32:E_%!12=0: 262359,U_%,E_% z_(&D94,r_$) f_(r_$) z_(&AFF,r_$) z_(&FF9,r_$) f_(__$): 8,17,__$ F%,,,,I_%: 1)<>1 I%= A`(1,"File not found."): T_(I_%+20)= A`(1,"Not enough memory available to load this file"): !y_%=G_%: 262348,,y_%:$(y_%!76)=$e_%: 8,16,__$,H_%,0:H_%!I_%=&0A0A0A0A:A%=2:B%=H_%:C%=I_%:`_%= (J_%):!E_%=0:E_%!4=-`_%:E_%!8=1232:E_%!12=0: 262359,G_%,E_%:!E_%=G_%: 262347,,E_%:E_%!20=0:E_%!24=0:E_%!28=-1: 262341,,E_%: n_(p%): B`%,C`%,a$:B`%=-20:C`%=0: 263872:!y_%=K_%: 262348,,y_%:I%=y_%!88: I%>=0:!L_%=K_%:L_%!4=I%-1: 262340,,L_%:I%-=1: :I%=R_%+ ($R_%): ?I%<>46:I%-=1: :I%+=1:a$=$I%: a$="^" a$="$" U$(y_%!76)=a$:p%= u_(p%): 4:L_%!(I%+4)=D`%!I%: :!L_%=K_%: ?p%>=N_%: p%?1=N_%+1 E`(F`%,p%+2) :A%=3:B%=p%:C%=N_%:p%= (J_%) E`(F`%+64,p%+1):p%= u_(p%) E`(F`%+16,p%+1):p%= u_(p%) E`(F`%+32,p%+1):p%= u_(p%) E`(F`%+48,p%+1):p%= u_(p%) u_(p%) :B`%=-(C`% 2+C`% 2)*40-20: B`%>G`% B`%=G`% !L_%=0:L_%!4=B`%:L_%!8=274:L_%!12=0: 262359,K_%,L_%:!y_%=K_%: 262348,,y_%+1:y_%!24=0:y_%!28=-1: 262341,,y_%: 262353,-1,y_%!4,y_%!8,y_%!12,y_%!16+40: 263873: E`(i%,p%): ?p%<32:p%+=1: :L_%!24=p%:L_%!28=i%: 262338,,L_%: L_%!4>200 >L_%!8=L_%!8-40:L_%!16=L_%!16-40:L_%!4=8:L_%!12=272:B`%-=40 :L_%!4=276:L_%!12=542 :C`%+=1: 8,17,g_$+".Cat_File" F%,,,,I_%: 1)<>1 I%= A`(1,"No catalogue data found - unable to continue"): I`% I_%+&20: 8,16,g_$+".Cat_File",I`%,0:A%=0:B%=I`%:C%=I_%: J_%:J`$=$I`%:o_%= u_(I`%):P_%=o_%+1:O_%=P_%:N_%=48:M_%=N_%: $(o_%+4)=".^" $R_%=g_$+".^" $R_%=$(o_%+4) MQ_$=$R_%:!E_%=K_%: 262347,,E_%:G`%=E_%!8-E_%!16: n_(P_%): 262341,,E_%: s_(w%,i%):X_%=w%:Y_%=i%:!E_%=w%: 262347,,E_%:X%=E_%!4-E_%!20:Y%=E_%!16-E_%!24:E_%!4=i%: 262350,,E_%:!E_%=w%:E_%!4=5:E_%!8=E_%!8+X%:E_%!12=E_%!12+Y%:E_%!16=E_%!16+X%:E_%!20=E_%!20+Y%:E_%!24=0:E_%!28=0 5E_%!32=&7FFFFFFF:E_%!36=&7FFFFFFF: 262352,,E_%: W_(w%,i%): e_$:E_%!&80=w%:E_%!&84=i%: 262350,,E_%+&80:I%=(E_%!&9C): $(I%),"."):I%+=1: :e_$=$(I%): 262351,,E_%:E_%!20=E_%!12:E_%!24=E_%!16:E_%!28=!E_%:E_%!32=E_%!4:E_%!16=1:$(E_%+44)=e_$:!E_%=( (e_$)+49) 3:E_%!12=0 262375,17,E_%,E_%!20,E_%!24: f$,d$,i$,i%: i%=E_%+44: ?i%>31:i%+=1: ?i%<>46:i%-=1: :?i%=13:d$=$(E_%+44):$L_%=r_$:i%=L_%+ ?i%<>46:i%-=1: :?i%=13:f$=$L_%:!y_%=K_%: 262348,,y_%:i%=y_%!88: i%>=0: K`(K_%,i%)= Gi$="."+ L`(K_%,i%): "copy "+f$+i$+" "+d$+i$+" RQ~V~C": x_(K_%,i%,0) :i%-=1: x_(w%,i%,s%):!L_%=w%:L_%!4=i%:L_%!8=s%<<21:L_%!12=1<<21: 262349,,L_%: L`(w%,i%):!L_%=w%:L_%!4=i%: 262350,,L_%:I%=(L_%!28): ?I%>31:I%+=1: :?I%=13:=$(L_%!28) K`(w%,i%):!L_%=w%:L_%!4=i%: 262350,,L_%: (L_%!24 1<<21):= T_(M`%): 262380,N`%+M`%,-1 e%>=(N`%+M`%):= 262380,N`%,-1:= P`,Q`,R`,S`,m%:Q`=1:P`=2:S`=4:R`=&80: T`%&200:m%=T`%:h_%= U`(m%,"CDview",180):m%= V`("Help",0,0):m%= V`("Info",0,W`%):m%= V`("Quit",R`,0): U` (a%,X`$,Y`%):$a%=X`$:a%!12=&70207:a%!16=Y`%:a%!20=40:a%!24=0:m%=a%+28:=a% V` (Z`$,a`%,b`%):!m%=a`%:m%!4=b`%:m%!8=&7000001:$(m%+12)=Z`$:=m%+24 c` (d`$,e`%,f`$): g`% 24:$g`%="s!"+d`$:$(g`%+16)=f`$:!E_%=e`%:E_%!4=0:E_%!8=-24:E_%!12=80:E_%!16=80:E_%!20=&1700210B:E_%!28=g`%:E_%!24=g`%+16:E_%!32=8: 262338,,E_% I%:=I% u_(p%): :p%+=1: ?p%=10 ?p%=13:=p%+1 C_(h`$,i`%): 263874:D_%=&C31:!L_%= :$(L_%+4)="Error "+ )+": "+h`$++ 262367,L_%,1,j`%: 262365,k`%,&4B534154: A`(l`%,a$):L_%!&80=0:$(L_%+&84)=a$+ 262367,L_%+&80,16 l`%,j`% ,I%:=I% J_%&500: 2:P%=J_%:[OPT n`:adr r8,o`:mov r0,r0,lsl#2:ldr pc,[r8,r0]:.p` equd 0;return data at code%+12:equd 0 l/.o` equd q`:equd r`:equd s`:equd t`:equd S_ ; r1=ptr, r2=level, exit with r0=ptr:.t`:mov r0,r1;put ptr in r0 ready for return:.u` ldrb r1,[r0],#1;look for line beginning with 'level' charater:cmp r1,#13:cmpne r1,#10:bne u`:ldrb r1,[r0]:cmp r1,r2:bne u` }e.u` ldrb r1,[r0],#1;skip the line with the level number:cmp r1,#13:cmpne r1,#10:bne u`:mov pc,r14 ; r1=ptr, r2=level, exit with r0=ptr:.S_ mov r0,r1;transfer ptr to r0:.u` ldrb r1,[r0,#-1]!;look for end of prev line:cmp r1,#13:bne u`:ldrb r1,[r0,#1];get sol char:cmp r1,#62;if it's not '>' carry on:bne u` uldrb r1,[r0,#2];get char after '>':cmp r1,r2;if it's < level all done:bge u`:add r0,r0,#1;point to sol:mov pc,r14 ;enter with r1 points to text, r2=length:.s` add r2,r1,r2:mov r0,#32;start with 32 in case there's no final cr:.u` ldrb r3,[r1],#1:cmp r1,r2:movgt pc,r14:cmp r3,#10:cmpne r3,#13:bne u`:ldrb r11,[r1];get char after eol Badd r11,r11,r3:cmp r11,#23:addeq r1,r1,#1:add r0,r0,#32:bal u` ;enter with r1 points to text, r2=length:.q` add r2,r1,r2:.u` ldrb r0,[r1],#1:cmp r0,#10:moveq r0,#13:streqb r0,[r1,#-1]:cmp r1,r2:blt u`:mov pc,r14 ;enter with r1=blk, r6=text, r7=text length:.r` stmfd r13!,{r14}:add r7,r7,r6;r7 now = end of text:ldr r2,v`;get window handle:str r2,[r1]:swi "Wimp_RedrawWindow":.w` cmp r0,#0:ldmeqfd r13!,{pc}:ldr r0,[r1,#4]:ldr r2,[r1,#20] asub r8,r0,r2:add r8,r8,#16:ldr r0,[r1,#16]:ldr r2,[r1,#24]:sub r9,r0,r2;r9 = top of work area ldr r3,[r1,#40];get top of graphics window:sub r3,r9,r3;r3 = offset from top:mov r3,r3,lsr#5;divide by 32 = number of lines:mov r2,r3,lsl#5:sub r9,r9,r2:mov r2,r6;point to text:subs r3,r3,#1:bmi x` .y` ldrb r0,[r2],#1;count down to required line:cmp r0,#13:cmpne r0,#10:bne y`:ldrb r11,[r2];get char after eol in r11:add r11,r11,r0;add to eol char:cmp r11,#23:addeq r2,r2,#1;if sum=23 it's cr/lf so inc r2:subs r3,r3,#1 bpl y` .x` ldr r4,[r1,#40];get graphics window max y:ldr r3,[r1,#32];get graphics window min y:sub r5,r4,r3;r5=height:mov r5,r5,lsr#5;divide by 5 = num lines:add r5,r5,#1;+1:sub r9,r9,#4;allow 4 points gap at top:bl z` z._` cmp r2,r7:bgt ``;at end of text:ldrb r0,[r2],#1:cmp r0,#31:swigt "OS_WriteC":bgt _`:cmp r0,#10:cmpne r0,#13:beq Aa ;check for tab here bal _` .Aa ldr r11,[r2];get char after eol in r11:add r11,r11,r0;add to eol char:cmp r11,#23:addeq r2,r2,#1;if sum=23 it's cr/lf so inc r2:subs r5,r5,#1;dec line count:bmi ``;graphics window redrawn, get next bsub r9,r9,#32;move down a line:bl z`:bal _`;print next line:.`` swi "Wimp_GetRectangle":bal w` .z` swi 256+25:swi 256+4:mov r0,r8:swi "OS_WriteC":mov r0,r0,lsr#8:swi "OS_WriteC":mov r0,r9:swi "OS_WriteC":mov r0,r0,lsr#8:swi "OS_WriteC":movs pc,r14 .v` equd G_% .Ba% equd 0:.Ca% equd 0:.Da% equd 0:.Ea% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Fa% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Ga% equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0 equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:equd 0:.Ha% equd 0:.Ia% equd 0:.Ja% equd 0:.Ka% equd-1:.La% equd 0:.Ma% equd 0:.Na% equd 0:.Oa% equd 0:.Pa% equd 0:.Qa% equd 255 2<equs "Unable to resize block for ArtWorks!":equb 0:align .Ra cmp r11,#0:stmfd r13!,{r4-r8,r14}:andne r5,r15,#(%1101<<28):teqnep r15,r5:ldmnefd r13!,{r4-r8,pc}:mov r1,#0:sub r1,r1,#1:cmp r0,r1:beq Sa:ldmltfd r13!,{r4-r8,pc}:.Ta str r0,Ba%:ldr r3,Ia%:sub r3,r3,#&8000:add r3,r3,r0 mov r0,r3:swi "Wimp_SlotSize":cmp r3,r0:bgt Ua:ldr r0,Ia%:ldr r1,Ba%:str r1,Ja%:ldr r2,Ka%:ldr r3,La%:and r5,r15,#(%111<<29): make sure V is clear teqp r15,r5:ldmfd r13!,{r4-r8,pc}:.Ua:adr r0,Qa%:orr r5,r15,#1<<28:teqp r15,r5:ldmfd r13!,{r4-r8,pc}:.Sa:ldr r0,Ia%:ldr r1,Ja%:ldr r2,Ka%:ldr r3,La%:ldmfd r13!,{r4-r8,pc}:.Ca stmfd r13!,{r14}:swi "XAWRender_FileInitAddress" str r0,Ca%:ldr r0,Ia%:mov r12,r1:adr r1,Ra:ldr r2,Ja%:adr r14,Va:ldr pc,Ca%:.Va swivs "OS_GenerateError":str r0,Ja%:ldmfd r13!,{pc}:.Da stmfd r13!,{r14}:swi "XAWRender_RenderAddress":str r0,Da%:ldr r0,Ka%:mov r12,r1 adr r1,Ea%:adr r2,Fa%:adr r3,Ga%:ldr r4,Ia%:adr r5,Ra:ldr r6,Ha%:mov r7,#0:adr r14,Wa:ldr pc,Da%:.Wa swivs "OS_GenerateError":ldmfd r13!,{pc}:.Xa stmfd r13!,{r14}:ldr r0,Ka%:swi "XAWRender_DocBounds":str r2,Ma%:str r3,Na% |/str r4,Oa%:str r5,Pa%:ldmfd r13!,{pc}:]: Ya (Za%): aa% Za%,ba%&100:E%=aa%+Za%: 262361,,g_$+".templates": 262363,,H_%,aa%,E%,-1,"info",0 ,,R%: 262337,,H_% 262363,,H_%,R%,E%,-1,"file",0 ,,R%: 262337,,H_% 262363,,H_%,R%,E%,-1,"text",0 262337,,H_% 262363,,H_%,R%,E%,-1,"pic",0 ,,R%: 262337,,H_% 262362:!E_%=W`%:E_%!4=1: 262350,,E_%:$(E_%!28)=ca$:!E_%=W`%:E_%!4=2: 262350,,E_%:$(E_%!28)=da$:!E_%=W`%:E_%!4=3: 262350,,E_%:$(E_%!28)=ea$ E!E_%=K_%:E_%!4=0: 262350,,E_%:J%=E_%+8: 32:D`%!I%=J%!I%: 262336,200,&4B534154,"CDview" fa%,k`%: fa%<300 0,"This program requires RISC-OS 3 or better": E_%&180,L_%&100,j`% 24,R_%&100,e_% 15: D`%&28,F`%&60,y_%&B000:$j`%="CDview": $+" During initialisation", -&8000:H_%= 35,"CD1View$Dir",E_%,256,0,3 ,,I%:E_%?I%=13:g_$=$E_%: T_(&1000)= A`(1,"Not enough memory available to run !CDview"): Ya(&400): H`:m_%= c`("CDview",-1,J`$): O`:I%= T_(0): ga:$F`%="Ssmall_dir":$(F`%+16)="Ssmall_FFF":$(F`%+32)="Ssmall_FF9":$(F`%+48)="Ssmall_AFF":$(F`%+64)="Ssmall_D94":$(F`%+80)="Ssmall_FF9":ca$="CDview v0.13":da$="David Holden":ea$=" A.P.D.L. 1995":D_%=%110000110001:G`%=-550 ha%&300,ia 24,ja% 13,ka% 15,la% 255: ma:na%= z_(oa%,pa$): qa%,ra%,sa%: ta%,d`%,ua%: Get file length 131080,5,pa$ ,,,,I_%:!y_%=U_%: 262348,,y_%: If window has an icon, delete it y_%!88>0 ,!E_%=U_%:E_%!4=0: 262340,,E_%:I%= T_(0) Get size of window Iqa%=y_%!12-y_%!4:ra%=y_%!16-y_%!8: Calculate space needed for sprite Lsa%= va(qa%, ,ta%): Grab space, initialise sprite area(s) and load file T_(ta%+I_%+8)=0 I%= A`(1,"Not enough memory available to load this file"): /d`%=H_%:ua%=d`%+ta%: wa(d`%,ta%): oa%=&FF9 wa(ua%,I_%+8): 46,10+256,ua%,pa$ 131080,255,pa$,ua% Make the sprite xa(oa%,ua%,I_%,$e_%,d`%,sa%, ya(d`%, Add the sprite to the window !E_%=U_%:E_%!4=0:E_%!12=qa%:E_%!8=-qa%:E_%!16=0:E_%!20=&0700A11A:E_%!24=e_%:E_%!28=d`%:E_%!32= ($e_%): 262338,,E_%: Open the window c!E_%=U_%: 262347,,E_%:E_%!28=-1: 262341,,E_%: 262353,-1,E_%!4,E_%!8,E_%!4+qa%,E_%!8+qa%+40: xa(oa%,za%,_a%,`a$,Ab%,Bb%,Cb%): r0%,r1%,r2%,r3%: Db%,Eb%,I%: Fb%,Gb%,Hb%,Ib%,Jb%,Kb%,Lb%: Mb(Cb%,Fb%,Gb%,Hb%,Ib%,Jb%,Kb%,Lb%): Fb%>=63 Db%=0 Db%=1 Create a sprite 131118,15+256,Ab%,`a$,Db%,Bb% Hb%,Bb% Jb%,Cb%: Divert output to it g!ha%=0: 131118,60+256,Ab%,`a$,ha% r0%,r1%,r2%,r3%: 46,r0%,r1%,r2%,r3%:I%= T_(0): Give the sprite a palette (if less than 63 colours) 131118,24+256,Ab%,`a$ ,,Eb%: 4:Eb%!(44+I%*2)=Nb%!I%:Eb%!(44+I%*2+4)=Nb%!I%: 4:Eb%!(44+I%*2)=Ob%!I%:Eb%!(44+I%*2+4)=Ob%!I%: 4:Eb%!(44+I%*2)=Pb%!I%:Eb%!(44+I%*2+4)=Pb%!I%: 264016: Make white background Qb(&FFFFFF00): 0,0,Bb%: Call appropriate sub-routine &FF9: Rb(za%,1,Cb%,0,0,Bb%,Bb%) &AFF,&CC3: Sb(za%,Bb%,_a%) &D94: Tb(za%,Bb%,_a%) Restore output back to screen 46,r0%,r1%,r2%,r3%: 264016: A`(1,"Unable to display this Artworks file."):na%= Rb(Ub%,Vb%,Cb%,Wb%,Xb%,Yb%,Zb%): ab%,bb%,cb%,Fb%,Gb%,db%,Ib%,eb%,Kb%,Lb%,Hb%,Jb%: fb,gb,hb,ib,jb,kb,lb%: mb%,nb%,ob%,pb%,qb%: 46,13+256,Ub%,ja%,13,Vb%: 131118,40+256,Ub%,ja% ,,,ab%,bb%,,cb% Mb(cb%,ob%,Gb%,db%,Ib%,eb%,Kb%,Lb%):fb=ab%*db%:ka%!0=db%*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