Home » Archimedes archive » Acorn User » AU 1993-09.adf » !3DGraphic_3DGraphic » BAU3DSrce
BAU3DSrce
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1993-09.adf » !3DGraphic_3DGraphic |
Filename: | BAU3DSrce |
Read OK: | ✔ |
File size: | 1172 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM >BAU3DSrce 20REM by DCA 30REM for 32-bit machines 40REM (c) BAU July 1993 50REM Updated August, September 1993 60: 70DIM code% &10000,swi$(64),swi(64),def(64) 80def()=FALSE 90max_swi=-1 100i%=0 110REPEAT 120 SYS "OS_GBPB",9,"Source",code%,1,i%,&100,"*" TO ,,,read%,i% 130 IF read%=1 THEN 140 j%=code% 150 WHILE ?j%>=32 160 j%+=1 170 ENDWHILE 180 ?j%=13 190 f$=FNlc($code%) 200 IF LEFT$(f$,3)="swi" THEN 210 swi_no=VAL(MID$(f$,4)) 220 def(swi_no)=TRUE 230 IF swi_no>max_swi max_swi=swi_no 240 swi$(swi_no)="Source."+f$ 250 ENDIF 260 ENDIF 270UNTIL i%=-1 280IF max_swi=-1 ERROR 0,"No source files found!" 290swi$(64)="Source.Version" 300OVERLAY swi$() 310swi_chunk=&CE440 320vbit=1<<28 330wp=12:sp=13:link=14:pc=15 340wk=0 350FOR swi=0 TO max_swi:REM *** 360 IF def(swi) THEN z=EVAL("FNswi"+RIGHT$("0"+STR$swi,2)+"_vars"):REM *** 370NEXT:REM *** 380FOR pass%=4 TO 6 STEP 2 390P%=0 400O%=code% 410[OPT pass% 420.module_base 430 DCD 0 440 DCD init 450 DCD final 460 DCD service 470 DCD title 480 DCD help 490 DCD 0 500 DCD swi_chunk 510 DCD swi_handler 520 DCD swi_table 530 DCD 0 540 550.init STMFD (sp)!,{link} 560 MOV r0,#6 570 MOV r2,#0 580 MOV r3,#wk AND &FF 590 ORR r3,r3,#wk AND &FF00 600 SWI "XOS_Module" 610 MOVVS r2,#0 620 LDMFD (sp)!,{link} 630 CMP r2,#0 640 ADREQ r0,cant_init 650 ORREQS pc,link,#vbit 660 STR r2,[wp] 670 FNinit_code:REM *** 680 BICS pc,link,#vbit 690 700.cant_init 710 DCD 0 720 EQUS "BAU3D cannot initialise" 730 DCB 0 740 ALIGN 750 760.final STMFD (sp)!,{link} 770 FNfinal_code:REM *** 780 MOV r0,#7 790 LDR r2,[wp] 800 SWI "XOS_Module" 810 LDMFD (sp)!,{pc} 820 830.service 840 STMFD (sp)!,{link} 850 LDMFD (sp)!,{pc} 860 870.title EQUS "BAU3D" 880 DCB 0 890 ALIGN 900 910.help EQUS "BAU3D" 920 DCB 9 930 DCB 9 940 EQUS FNversion 950 DCB 0 960 ALIGN 970 980.swi_handler 990 LDR wp,[wp] 1000 CMP r11,#max_swi+1 1010 ADDCC pc,pc,r11,LSL #2 1020 B unknown_swi 1030] 1040FOR swi=0 TO max_swi 1050 [OPT pass% 1060 B swi(swi) 1070 ] 1080NEXT 1090[OPT pass% 1100.unknown_swi 1110 ADR r0,bad_swi_err 1120 ORRS pc,link,#vbit 1130.bad_swi_err 1140 DCD &1E6 1150 EQUS "Unknown BAU3D operation" 1160 DCB 0 1170 ALIGN 1180 1190.swi_table 1200 EQUS "BAU3D" 1210 DCB 0 1220] 1230FOR swi=0 TO max_swi 1240 IF def(swi) THEN 1250 [OPT pass% 1260 EQUS EVAL("FNswi"+RIGHT$("0"+STR$swi,2)+"_name") 1270 DCB 0 1280 ] 1290 ELSE 1300 [OPT pass% 1310 EQUS "Unused"+RIGHT$("0"+STR$swi,2) 1320 DCB 0 1330 ] 1340 ENDIF 1350NEXT 1360[OPT pass% 1370 DCB 0 1380 ALIGN 1390 1400] 1410FOR swi=0 TO max_swi 1420 swi(swi)=P% 1430 IF def(swi) THEN 1440 k=EVAL("FNswi"+RIGHT$("0"+STR$swi,2)+"_code") 1450 ELSE 1460 [OPT pass% 1470 MOV pc,link 1480 ] 1490 ENDIF 1500NEXT 1510[OPT pass% 1520.divide 1530 STMFD (sp)!,{r3,link} 1540 EOR r3,r0,r1 1550 CMP r0,#0 1560 RSBLT r0,r0,#0 1570 CMP r1,#0 1580 RSBLT r1,r1,#0 1590 MOV r14,r1 1600 CMP r14,r0,LSR #1 1610.div1 MOVLS r14,r14,LSL #1 1620 CMPLS r14,r0,LSR #1 1630 BLS div1 1640 MOV r2,#0 1650.div2 CMP r0,r14 1660 SUBCS r0,r0,r14 1670 ADC r2,r2,r2 1680 MOV r14,r14,LSR #1 1690 CMP r14,r1 1700 BCS div2 1710 TST r3,#1<<31 1720 RSBNE r2,r2,#0 1730 LDMFD (sp)!,{r3,pc} 1740] 1750NEXT pass% 1760SYS "OS_File",10,"BAU3D",&FFA,,code%,O% 1770END 1780: 1790DEF FNtable(size%) 1800P%+=size% 1810O%+=size% 1820=0 1830: 1840DEF FNswap(a,b) 1850[OPT pass% 1860 EOR a,a,b 1870 EOR b,a,b 1880 EOR a,a,b 1890] 1900=0 1910: 1920DEF FNadrl(reg,off) 1930[OPT pass% 1940 ADD reg,wp,#(off AND &FF) 1950 ADD reg,reg,#(off AND &FF00) 1960] 1970=0 1980: 1990DEF FNadreql(reg,off) 2000[OPT pass% 2010 ADDEQ reg,wp,#(off AND &FF) 2020 ADDEQ reg,reg,#(off AND &FF00) 2030] 2040=0 2050: 2060DEF FNwk(req) 2070wk+=req 2080=wk-req 2090: 2100DEF FNlc(a$) 2110LOCAL b$,i,c 2120FOR i=1 TO LEN(a$) 2130 c=ASCMID$(a$,i) 2140 IF c>=ASC"A" AND c<=ASC"Z" c+=32 2150 b$+=CHR$c 2160NEXT 2170=b$ 2180: 2190DEF FNassert(a$):REM *** 2200IF pass%>4 THEN IF NOT EVAL(a$) PRINT"Assertion '"a$"' failed":END 2210=0
� >BAU3DSrce � by DCA � for 32-bit machines (� (c) BAU July 1993 2$� Updated August, September 1993 <: F+� code% &10000,swi$(64),swi(64),def(64) Pdef()=� Zmax_swi=-1 di%=0 n� x> ș "OS_GBPB",9,"Source",code%,1,i%,&100,"*" � ,,,read%,i% � � read%=1 � � j%=code% � ȕ ?j%>=32 � j%+=1 � � � ?j%=13 � f$=�lc($code%) � � �f$,3)="swi" � � swi_no=�(�f$,4)) � def(swi_no)=� �& � swi_no>max_swi max_swi=swi_no � swi$(swi_no)="Source."+f$ � � � � i%=-1 -� max_swi=-1 � 0,"No source files found!" "swi$(64)="Source.Version" , ȣ swi$() 6swi_chunk=&CE440 @vbit=1<<28 Jwp=12:sp=13:link=14:pc=15 Twk=0 ^� swi=0 � max_swi:� *** h9 � def(swi) � z=�("FNswi"+�"0"+�swi,2)+"_vars"):� *** r�:� *** |� pass%=4 � 6 � 2 �P%=0 �O%=code% �[OPT pass% �.module_base � DCD 0 � DCD init � DCD final � DCD service � DCD title � DCD help � DCD 0 � DCD swi_chunk � DCD swi_handler DCD swi_table DCD 0 & .init STMFD (sp)!,{link} 0 MOV r0,#6 : MOV r2,#0 D MOV r3,#wk � &FF N$ �R r3,r3,#wk � &FF00 X SWI "XOS_Module" b MOVVS r2,#0 l LDMFD (sp)!,{link} v CMP r2,#0 � ADREQ r0,cant_init � �REQS pc,link,#vbit � STR r2,[wp] � �init_code:� *** �! BICS pc,link,#vbit � �.cant_init � DCD 0 �- EQUS "BAU3D cannot initialise" � DCB 0 � ALIGN � � .final STMFD (sp)!,{link} �final_code:� *** MOV r0,#7 LDR r2,[wp] SWI "XOS_Module" * LDMFD (sp)!,{pc} 4 >.service H STMFD (sp)!,{link} R LDMFD (sp)!,{pc} \ f.title EQUS "BAU3D" p DCB 0 z ALIGN � �.help EQUS "BAU3D" � DCB 9 � DCB 9 � EQUS �version � DCB 0 � ALIGN � �.swi_handler � LDR wp,[wp] �" CMP r11,#max_swi+1 �$ ADDCC pc,pc,r11,LSL #2 � B unknown_swi ] � swi=0 � max_swi [OPT pass% $ B swi(swi) . ] 8� B[OPT pass% L.unknown_swi V" ADR r0,bad_swi_err ` �RS pc,link,#vbit j.bad_swi_err t DCD &1E6 ~- EQUS "Unknown BAU3D operation" � DCB 0 � ALIGN � �.swi_table � EQUS "BAU3D" � DCB 0 �] �� swi=0 � max_swi � � def(swi) � � [OPT pass% �3 EQUS �("FNswi"+�"0"+�swi,2)+"_name") � DCB 0 ] � [OPT pass% ) EQUS "Unused"+�"0"+�swi,2) ( DCB 0 2 ] < � F� P[OPT pass% Z DCB 0 d ALIGN n x] �� swi=0 � max_swi � swi(swi)=P% � � def(swi) � �' k=�("FNswi"+�"0"+�swi,2)+"_code") � � � [OPT pass% � MOV pc,link � ] � � �� �[OPT pass% �.divide �# STMFD (sp)!,{r3,link} � r3,r0,r1 CMP r0,#0 RSBLT r0,r0,#0 " CMP r1,#0 , RSBLT r1,r1,#0 6 MOV r14,r1 @! CMP r14,r0,LSR #1 J".div1 MOVLS r14,r14,LSL #1 T! CMPLS r14,r0,LSR #1 ^ BLS div1 h MOV r2,#0 r.div2 CMP r0,r14 | SUBCS r0,r0,r14 � ADC r2,r2,r2 �" MOV r14,r14,LSR #1 � CMP r14,r1 � BCS div2 � TST r3,#1<<31 � RSBNE r2,r2,#0 �! LDMFD (sp)!,{r3,pc} �] �� pass% �*ș "OS_File",10,"BAU3D",&FFA,,code%,O% �� �: �� �table(size%) P%+=size% O%+=size% =0 &: 0� �swap(a,b) :[OPT pass% D � a,a,b N � b,a,b X � a,a,b b] l=0 v: �� �adrl(reg,off) �[OPT pass% �' ADD reg,wp,#(off � &FF) �* ADD reg,reg,#(off � &FF00) �] �=0 �: �� �adreql(reg,off) �[OPT pass% �' ADDEQ reg,wp,#(off � &FF) �* ADDEQ reg,reg,#(off � &FF00) �] �=0 : � �wk(req) wk+=req =wk-req *: 4 � �lc(a$) >� b$,i,c H� i=1 � �(a$) R c=��a$,i) \ � c>=�"A" � c<=�"Z" c+=32 f b$+=�c p� z=b$ �: �� �assert(a$):� *** �6� pass%>4 � � � �(a$) �"Assertion '"a$"' failed":� �=0 �
00000000 0d 00 0a 10 f4 20 3e 42 41 55 33 44 53 72 63 65 |..... >BAU3DSrce| 00000010 0d 00 14 0c f4 20 62 79 20 44 43 41 0d 00 1e 19 |..... by DCA....| 00000020 f4 20 66 6f 72 20 33 32 2d 62 69 74 20 6d 61 63 |. for 32-bit mac| 00000030 68 69 6e 65 73 0d 00 28 17 f4 20 28 63 29 20 42 |hines..(.. (c) B| 00000040 41 55 20 4a 75 6c 79 20 31 39 39 33 0d 00 32 24 |AU July 1993..2$| 00000050 f4 20 55 70 64 61 74 65 64 20 41 75 67 75 73 74 |. Updated August| 00000060 2c 20 53 65 70 74 65 6d 62 65 72 20 31 39 39 33 |, September 1993| 00000070 0d 00 3c 05 3a 0d 00 46 2b de 20 63 6f 64 65 25 |..<.:..F+. code%| 00000080 20 26 31 30 30 30 30 2c 73 77 69 24 28 36 34 29 | &10000,swi$(64)| 00000090 2c 73 77 69 28 36 34 29 2c 64 65 66 28 36 34 29 |,swi(64),def(64)| 000000a0 0d 00 50 0b 64 65 66 28 29 3d a3 0d 00 5a 0e 6d |..P.def()=...Z.m| 000000b0 61 78 5f 73 77 69 3d 2d 31 0d 00 64 08 69 25 3d |ax_swi=-1..d.i%=| 000000c0 30 0d 00 6e 05 f5 0d 00 78 3e 20 c8 99 20 22 4f |0..n....x> .. "O| 000000d0 53 5f 47 42 50 42 22 2c 39 2c 22 53 6f 75 72 63 |S_GBPB",9,"Sourc| 000000e0 65 22 2c 63 6f 64 65 25 2c 31 2c 69 25 2c 26 31 |e",code%,1,i%,&1| 000000f0 30 30 2c 22 2a 22 20 b8 20 2c 2c 2c 72 65 61 64 |00,"*" . ,,,read| 00000100 25 2c 69 25 0d 00 82 10 20 e7 20 72 65 61 64 25 |%,i%.... . read%| 00000110 3d 31 20 8c 0d 00 8c 0e 20 20 6a 25 3d 63 6f 64 |=1 ..... j%=cod| 00000120 65 25 0d 00 96 10 20 20 c8 95 20 3f 6a 25 3e 3d |e%.... .. ?j%>=| 00000130 33 32 0d 00 a0 0c 20 20 20 6a 25 2b 3d 31 0d 00 |32.... j%+=1..| 00000140 aa 07 20 20 ce 0d 00 b4 0c 20 20 3f 6a 25 3d 31 |.. ..... ?j%=1| 00000150 33 0d 00 be 14 20 20 66 24 3d a4 6c 63 28 24 63 |3.... f$=.lc($c| 00000160 6f 64 65 25 29 0d 00 c8 16 20 20 e7 20 c0 66 24 |ode%).... . .f$| 00000170 2c 33 29 3d 22 73 77 69 22 20 8c 0d 00 d2 17 20 |,3)="swi" ..... | 00000180 20 20 73 77 69 5f 6e 6f 3d bb 28 c1 66 24 2c 34 | swi_no=.(.f$,4| 00000190 29 29 0d 00 dc 14 20 20 20 64 65 66 28 73 77 69 |)).... def(swi| 000001a0 5f 6e 6f 29 3d b9 0d 00 e6 26 20 20 20 e7 20 73 |_no)=....& . s| 000001b0 77 69 5f 6e 6f 3e 6d 61 78 5f 73 77 69 20 6d 61 |wi_no>max_swi ma| 000001c0 78 5f 73 77 69 3d 73 77 69 5f 6e 6f 0d 00 f0 20 |x_swi=swi_no... | 000001d0 20 20 20 73 77 69 24 28 73 77 69 5f 6e 6f 29 3d | swi$(swi_no)=| 000001e0 22 53 6f 75 72 63 65 2e 22 2b 66 24 0d 00 fa 07 |"Source."+f$....| 000001f0 20 20 cd 0d 01 04 06 20 cd 0d 01 0e 0b fd 20 69 | ..... ...... i| 00000200 25 3d 2d 31 0d 01 18 2d e7 20 6d 61 78 5f 73 77 |%=-1...-. max_sw| 00000210 69 3d 2d 31 20 85 20 30 2c 22 4e 6f 20 73 6f 75 |i=-1 . 0,"No sou| 00000220 72 63 65 20 66 69 6c 65 73 20 66 6f 75 6e 64 21 |rce files found!| 00000230 22 0d 01 22 1d 73 77 69 24 28 36 34 29 3d 22 53 |"..".swi$(64)="S| 00000240 6f 75 72 63 65 2e 56 65 72 73 69 6f 6e 22 0d 01 |ource.Version"..| 00000250 2c 0d c8 a3 20 73 77 69 24 28 29 0d 01 36 14 73 |,... swi$()..6.s| 00000260 77 69 5f 63 68 75 6e 6b 3d 26 43 45 34 34 30 0d |wi_chunk=&CE440.| 00000270 01 40 0e 76 62 69 74 3d 31 3c 3c 32 38 0d 01 4a |.@.vbit=1<<28..J| 00000280 1d 77 70 3d 31 32 3a 73 70 3d 31 33 3a 6c 69 6e |.wp=12:sp=13:lin| 00000290 6b 3d 31 34 3a 70 63 3d 31 35 0d 01 54 08 77 6b |k=14:pc=15..T.wk| 000002a0 3d 30 0d 01 5e 1b e3 20 73 77 69 3d 30 20 b8 20 |=0..^.. swi=0 . | 000002b0 6d 61 78 5f 73 77 69 3a f4 20 2a 2a 2a 0d 01 68 |max_swi:. ***..h| 000002c0 39 20 e7 20 64 65 66 28 73 77 69 29 20 8c 20 7a |9 . def(swi) . z| 000002d0 3d a0 28 22 46 4e 73 77 69 22 2b c2 22 30 22 2b |=.("FNswi"+."0"+| 000002e0 c3 73 77 69 2c 32 29 2b 22 5f 76 61 72 73 22 29 |.swi,2)+"_vars")| 000002f0 3a f4 20 2a 2a 2a 0d 01 72 0b ed 3a f4 20 2a 2a |:. ***..r..:. **| 00000300 2a 0d 01 7c 15 e3 20 70 61 73 73 25 3d 34 20 b8 |*..|.. pass%=4 .| 00000310 20 36 20 88 20 32 0d 01 86 08 50 25 3d 30 0d 01 | 6 . 2....P%=0..| 00000320 90 0c 4f 25 3d 63 6f 64 65 25 0d 01 9a 0e 5b 4f |..O%=code%....[O| 00000330 50 54 20 70 61 73 73 25 0d 01 a4 10 2e 6d 6f 64 |PT pass%.....mod| 00000340 75 6c 65 5f 62 61 73 65 0d 01 ae 15 20 20 20 20 |ule_base.... | 00000350 20 20 20 20 44 43 44 20 20 20 20 20 30 0d 01 b8 | DCD 0...| 00000360 18 20 20 20 20 20 20 20 20 44 43 44 20 20 20 20 |. DCD | 00000370 20 69 6e 69 74 0d 01 c2 19 20 20 20 20 20 20 20 | init.... | 00000380 20 44 43 44 20 20 20 20 20 66 69 6e 61 6c 0d 01 | DCD final..| 00000390 cc 1b 20 20 20 20 20 20 20 20 44 43 44 20 20 20 |.. DCD | 000003a0 20 20 73 65 72 76 69 63 65 0d 01 d6 19 20 20 20 | service.... | 000003b0 20 20 20 20 20 44 43 44 20 20 20 20 20 74 69 74 | DCD tit| 000003c0 6c 65 0d 01 e0 18 20 20 20 20 20 20 20 20 44 43 |le.... DC| 000003d0 44 20 20 20 20 20 68 65 6c 70 0d 01 ea 15 20 20 |D help.... | 000003e0 20 20 20 20 20 20 44 43 44 20 20 20 20 20 30 0d | DCD 0.| 000003f0 01 f4 1d 20 20 20 20 20 20 20 20 44 43 44 20 20 |... DCD | 00000400 20 20 20 73 77 69 5f 63 68 75 6e 6b 0d 01 fe 1f | swi_chunk....| 00000410 20 20 20 20 20 20 20 20 44 43 44 20 20 20 20 20 | DCD | 00000420 73 77 69 5f 68 61 6e 64 6c 65 72 0d 02 08 1d 20 |swi_handler.... | 00000430 20 20 20 20 20 20 20 44 43 44 20 20 20 20 20 73 | DCD s| 00000440 77 69 5f 74 61 62 6c 65 0d 02 12 15 20 20 20 20 |wi_table.... | 00000450 20 20 20 20 44 43 44 20 20 20 20 20 30 0d 02 1c | DCD 0...| 00000460 04 0d 02 26 20 2e 69 6e 69 74 20 20 20 53 54 4d |...& .init STM| 00000470 46 44 20 20 20 28 73 70 29 21 2c 7b 6c 69 6e 6b |FD (sp)!,{link| 00000480 7d 0d 02 30 19 20 20 20 20 20 20 20 20 4d 4f 56 |}..0. MOV| 00000490 20 20 20 20 20 72 30 2c 23 36 0d 02 3a 19 20 20 | r0,#6..:. | 000004a0 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 32 | MOV r2| 000004b0 2c 23 30 0d 02 44 20 20 20 20 20 20 20 20 20 4d |,#0..D M| 000004c0 4f 56 20 20 20 20 20 72 33 2c 23 77 6b 20 80 20 |OV r3,#wk . | 000004d0 26 46 46 0d 02 4e 24 20 20 20 20 20 20 20 20 84 |&FF..N$ .| 000004e0 52 20 20 20 20 20 72 33 2c 72 33 2c 23 77 6b 20 |R r3,r3,#wk | 000004f0 80 20 26 46 46 30 30 0d 02 58 20 20 20 20 20 20 |. &FF00..X | 00000500 20 20 20 53 57 49 20 20 20 20 20 22 58 4f 53 5f | SWI "XOS_| 00000510 4d 6f 64 75 6c 65 22 0d 02 62 19 20 20 20 20 20 |Module"..b. | 00000520 20 20 20 4d 4f 56 56 53 20 20 20 72 32 2c 23 30 | MOVVS r2,#0| 00000530 0d 02 6c 20 20 20 20 20 20 20 20 20 4c 44 4d 46 |..l LDMF| 00000540 44 20 20 20 28 73 70 29 21 2c 7b 6c 69 6e 6b 7d |D (sp)!,{link}| 00000550 0d 02 76 19 20 20 20 20 20 20 20 20 43 4d 50 20 |..v. CMP | 00000560 20 20 20 20 72 32 2c 23 30 0d 02 80 20 20 20 20 | r2,#0... | 00000570 20 20 20 20 20 41 44 52 45 51 20 20 20 72 30 2c | ADREQ r0,| 00000580 63 61 6e 74 5f 69 6e 69 74 0d 02 8a 20 20 20 20 |cant_init... | 00000590 20 20 20 20 20 84 52 45 51 53 20 20 70 63 2c 6c | .REQS pc,l| 000005a0 69 6e 6b 2c 23 76 62 69 74 0d 02 94 1b 20 20 20 |ink,#vbit.... | 000005b0 20 20 20 20 20 53 54 52 20 20 20 20 20 72 32 2c | STR r2,| 000005c0 5b 77 70 5d 0d 02 9e 1c 20 20 20 20 20 20 20 20 |[wp].... | 000005d0 a4 69 6e 69 74 5f 63 6f 64 65 3a f4 20 2a 2a 2a |.init_code:. ***| 000005e0 0d 02 a8 21 20 20 20 20 20 20 20 20 42 49 43 53 |...! BICS| 000005f0 20 20 20 20 70 63 2c 6c 69 6e 6b 2c 23 76 62 69 | pc,link,#vbi| 00000600 74 0d 02 b2 04 0d 02 bc 0e 2e 63 61 6e 74 5f 69 |t.........cant_i| 00000610 6e 69 74 0d 02 c6 15 20 20 20 20 20 20 20 20 44 |nit.... D| 00000620 43 44 20 20 20 20 20 30 0d 02 d0 2d 20 20 20 20 |CD 0...- | 00000630 20 20 20 20 45 51 55 53 20 20 20 20 22 42 41 55 | EQUS "BAU| 00000640 33 44 20 63 61 6e 6e 6f 74 20 69 6e 69 74 69 61 |3D cannot initia| 00000650 6c 69 73 65 22 0d 02 da 15 20 20 20 20 20 20 20 |lise".... | 00000660 20 44 43 42 20 20 20 20 20 30 0d 02 e4 11 20 20 | DCB 0.... | 00000670 20 20 20 20 20 20 41 4c 49 47 4e 0d 02 ee 04 0d | ALIGN.....| 00000680 02 f8 20 2e 66 69 6e 61 6c 20 20 53 54 4d 46 44 |.. .final STMFD| 00000690 20 20 20 28 73 70 29 21 2c 7b 6c 69 6e 6b 7d 0d | (sp)!,{link}.| 000006a0 03 02 1d 20 20 20 20 20 20 20 20 a4 66 69 6e 61 |... .fina| 000006b0 6c 5f 63 6f 64 65 3a f4 20 2a 2a 2a 0d 03 0c 19 |l_code:. ***....| 000006c0 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 | MOV | 000006d0 72 30 2c 23 37 0d 03 16 1b 20 20 20 20 20 20 20 |r0,#7.... | 000006e0 20 4c 44 52 20 20 20 20 20 72 32 2c 5b 77 70 5d | LDR r2,[wp]| 000006f0 0d 03 20 20 20 20 20 20 20 20 20 20 53 57 49 20 |.. SWI | 00000700 20 20 20 20 22 58 4f 53 5f 4d 6f 64 75 6c 65 22 | "XOS_Module"| 00000710 0d 03 2a 1e 20 20 20 20 20 20 20 20 4c 44 4d 46 |..*. LDMF| 00000720 44 20 20 20 28 73 70 29 21 2c 7b 70 63 7d 0d 03 |D (sp)!,{pc}..| 00000730 34 04 0d 03 3e 0c 2e 73 65 72 76 69 63 65 0d 03 |4...>..service..| 00000740 48 20 20 20 20 20 20 20 20 20 53 54 4d 46 44 20 |H STMFD | 00000750 20 20 28 73 70 29 21 2c 7b 6c 69 6e 6b 7d 0d 03 | (sp)!,{link}..| 00000760 52 1e 20 20 20 20 20 20 20 20 4c 44 4d 46 44 20 |R. LDMFD | 00000770 20 20 28 73 70 29 21 2c 7b 70 63 7d 0d 03 5c 04 | (sp)!,{pc}..\.| 00000780 0d 03 66 1b 2e 74 69 74 6c 65 20 20 45 51 55 53 |..f..title EQUS| 00000790 20 20 20 20 22 42 41 55 33 44 22 0d 03 70 15 20 | "BAU3D"..p. | 000007a0 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 30 | DCB 0| 000007b0 0d 03 7a 11 20 20 20 20 20 20 20 20 41 4c 49 47 |..z. ALIG| 000007c0 4e 0d 03 84 04 0d 03 8e 1b 2e 68 65 6c 70 20 20 |N.........help | 000007d0 20 45 51 55 53 20 20 20 20 22 42 41 55 33 44 22 | EQUS "BAU3D"| 000007e0 0d 03 98 15 20 20 20 20 20 20 20 20 44 43 42 20 |.... DCB | 000007f0 20 20 20 20 39 0d 03 a2 15 20 20 20 20 20 20 20 | 9.... | 00000800 20 44 43 42 20 20 20 20 20 39 0d 03 ac 1c 20 20 | DCB 9.... | 00000810 20 20 20 20 20 20 45 51 55 53 20 20 20 20 a4 76 | EQUS .v| 00000820 65 72 73 69 6f 6e 0d 03 b6 15 20 20 20 20 20 20 |ersion.... | 00000830 20 20 44 43 42 20 20 20 20 20 30 0d 03 c0 11 20 | DCB 0.... | 00000840 20 20 20 20 20 20 20 41 4c 49 47 4e 0d 03 ca 04 | ALIGN....| 00000850 0d 03 d4 10 2e 73 77 69 5f 68 61 6e 64 6c 65 72 |.....swi_handler| 00000860 0d 03 de 1b 20 20 20 20 20 20 20 20 4c 44 52 20 |.... LDR | 00000870 20 20 20 20 77 70 2c 5b 77 70 5d 0d 03 e8 22 20 | wp,[wp]..." | 00000880 20 20 20 20 20 20 20 43 4d 50 20 20 20 20 20 72 | CMP r| 00000890 31 31 2c 23 6d 61 78 5f 73 77 69 2b 31 0d 03 f2 |11,#max_swi+1...| 000008a0 24 20 20 20 20 20 20 20 20 41 44 44 43 43 20 20 |$ ADDCC | 000008b0 20 70 63 2c 70 63 2c 72 31 31 2c 4c 53 4c 20 23 | pc,pc,r11,LSL #| 000008c0 32 0d 03 fc 1f 20 20 20 20 20 20 20 20 42 20 20 |2.... B | 000008d0 20 20 20 20 20 75 6e 6b 6e 6f 77 6e 5f 73 77 69 | unknown_swi| 000008e0 0d 04 06 05 5d 0d 04 10 15 e3 20 73 77 69 3d 30 |....]..... swi=0| 000008f0 20 b8 20 6d 61 78 5f 73 77 69 0d 04 1a 0f 20 5b | . max_swi.... [| 00000900 4f 50 54 20 70 61 73 73 25 0d 04 24 1c 20 20 20 |OPT pass%..$. | 00000910 20 20 20 20 20 42 20 20 20 20 20 20 20 73 77 69 | B swi| 00000920 28 73 77 69 29 0d 04 2e 06 20 5d 0d 04 38 05 ed |(swi).... ]..8..| 00000930 0d 04 42 0e 5b 4f 50 54 20 70 61 73 73 25 0d 04 |..B.[OPT pass%..| 00000940 4c 10 2e 75 6e 6b 6e 6f 77 6e 5f 73 77 69 0d 04 |L..unknown_swi..| 00000950 56 22 20 20 20 20 20 20 20 20 41 44 52 20 20 20 |V" ADR | 00000960 20 20 72 30 2c 62 61 64 5f 73 77 69 5f 65 72 72 | r0,bad_swi_err| 00000970 0d 04 60 20 20 20 20 20 20 20 20 20 84 52 53 20 |..` .RS | 00000980 20 20 20 70 63 2c 6c 69 6e 6b 2c 23 76 62 69 74 | pc,link,#vbit| 00000990 0d 04 6a 10 2e 62 61 64 5f 73 77 69 5f 65 72 72 |..j..bad_swi_err| 000009a0 0d 04 74 18 20 20 20 20 20 20 20 20 44 43 44 20 |..t. DCD | 000009b0 20 20 20 20 26 31 45 36 0d 04 7e 2d 20 20 20 20 | &1E6..~- | 000009c0 20 20 20 20 45 51 55 53 20 20 20 20 22 55 6e 6b | EQUS "Unk| 000009d0 6e 6f 77 6e 20 42 41 55 33 44 20 6f 70 65 72 61 |nown BAU3D opera| 000009e0 74 69 6f 6e 22 0d 04 88 15 20 20 20 20 20 20 20 |tion".... | 000009f0 20 44 43 42 20 20 20 20 20 30 0d 04 92 11 20 20 | DCB 0.... | 00000a00 20 20 20 20 20 20 41 4c 49 47 4e 0d 04 9c 04 0d | ALIGN.....| 00000a10 04 a6 0e 2e 73 77 69 5f 74 61 62 6c 65 0d 04 b0 |....swi_table...| 00000a20 1c 20 20 20 20 20 20 20 20 45 51 55 53 20 20 20 |. EQUS | 00000a30 20 20 22 42 41 55 33 44 22 0d 04 ba 15 20 20 20 | "BAU3D".... | 00000a40 20 20 20 20 20 44 43 42 20 20 20 20 20 30 0d 04 | DCB 0..| 00000a50 c4 05 5d 0d 04 ce 15 e3 20 73 77 69 3d 30 20 b8 |..]..... swi=0 .| 00000a60 20 6d 61 78 5f 73 77 69 0d 04 d8 11 20 e7 20 64 | max_swi.... . d| 00000a70 65 66 28 73 77 69 29 20 8c 0d 04 e2 10 20 20 5b |ef(swi) ..... [| 00000a80 4f 50 54 20 70 61 73 73 25 0d 04 ec 33 20 20 20 |OPT pass%...3 | 00000a90 20 20 20 20 20 45 51 55 53 20 20 20 20 a0 28 22 | EQUS .("| 00000aa0 46 4e 73 77 69 22 2b c2 22 30 22 2b c3 73 77 69 |FNswi"+."0"+.swi| 00000ab0 2c 32 29 2b 22 5f 6e 61 6d 65 22 29 0d 04 f6 15 |,2)+"_name")....| 00000ac0 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 | DCB | 00000ad0 30 0d 05 00 07 20 20 5d 0d 05 0a 06 20 cc 0d 05 |0.... ].... ...| 00000ae0 14 10 20 20 5b 4f 50 54 20 70 61 73 73 25 0d 05 |.. [OPT pass%..| 00000af0 1e 29 20 20 20 20 20 20 20 20 45 51 55 53 20 20 |.) EQUS | 00000b00 20 20 22 55 6e 75 73 65 64 22 2b c2 22 30 22 2b | "Unused"+."0"+| 00000b10 c3 73 77 69 2c 32 29 0d 05 28 15 20 20 20 20 20 |.swi,2)..(. | 00000b20 20 20 20 44 43 42 20 20 20 20 20 30 0d 05 32 07 | DCB 0..2.| 00000b30 20 20 5d 0d 05 3c 06 20 cd 0d 05 46 05 ed 0d 05 | ]..<. ...F....| 00000b40 50 0e 5b 4f 50 54 20 70 61 73 73 25 0d 05 5a 15 |P.[OPT pass%..Z.| 00000b50 20 20 20 20 20 20 20 20 44 43 42 20 20 20 20 20 | DCB | 00000b60 30 0d 05 64 11 20 20 20 20 20 20 20 20 41 4c 49 |0..d. ALI| 00000b70 47 4e 0d 05 6e 04 0d 05 78 05 5d 0d 05 82 15 e3 |GN..n...x.].....| 00000b80 20 73 77 69 3d 30 20 b8 20 6d 61 78 5f 73 77 69 | swi=0 . max_swi| 00000b90 0d 05 8c 10 20 73 77 69 28 73 77 69 29 3d 50 25 |.... swi(swi)=P%| 00000ba0 0d 05 96 11 20 e7 20 64 65 66 28 73 77 69 29 20 |.... . def(swi) | 00000bb0 8c 0d 05 a0 27 20 20 6b 3d a0 28 22 46 4e 73 77 |....' k=.("FNsw| 00000bc0 69 22 2b c2 22 30 22 2b c3 73 77 69 2c 32 29 2b |i"+."0"+.swi,2)+| 00000bd0 22 5f 63 6f 64 65 22 29 0d 05 aa 06 20 cc 0d 05 |"_code").... ...| 00000be0 b4 10 20 20 5b 4f 50 54 20 70 61 73 73 25 0d 05 |.. [OPT pass%..| 00000bf0 be 1b 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 |.. MOV | 00000c00 20 20 70 63 2c 6c 69 6e 6b 0d 05 c8 07 20 20 5d | pc,link.... ]| 00000c10 0d 05 d2 06 20 cd 0d 05 dc 05 ed 0d 05 e6 0e 5b |.... ..........[| 00000c20 4f 50 54 20 70 61 73 73 25 0d 05 f0 0b 2e 64 69 |OPT pass%.....di| 00000c30 76 69 64 65 0d 05 fa 23 20 20 20 20 20 20 20 20 |vide...# | 00000c40 53 54 4d 46 44 20 20 20 28 73 70 29 21 2c 7b 72 |STMFD (sp)!,{r| 00000c50 33 2c 6c 69 6e 6b 7d 0d 06 04 1a 20 20 20 20 20 |3,link}.... | 00000c60 20 20 20 82 20 20 20 20 20 72 33 2c 72 30 2c 72 | . r3,r0,r| 00000c70 31 0d 06 0e 19 20 20 20 20 20 20 20 20 43 4d 50 |1.... CMP| 00000c80 20 20 20 20 20 72 30 2c 23 30 0d 06 18 1c 20 20 | r0,#0.... | 00000c90 20 20 20 20 20 20 52 53 42 4c 54 20 20 20 72 30 | RSBLT r0| 00000ca0 2c 72 30 2c 23 30 0d 06 22 19 20 20 20 20 20 20 |,r0,#0..". | 00000cb0 20 20 43 4d 50 20 20 20 20 20 72 31 2c 23 30 0d | CMP r1,#0.| 00000cc0 06 2c 1c 20 20 20 20 20 20 20 20 52 53 42 4c 54 |.,. RSBLT| 00000cd0 20 20 20 72 31 2c 72 31 2c 23 30 0d 06 36 1a 20 | r1,r1,#0..6. | 00000ce0 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 20 72 | MOV r| 00000cf0 31 34 2c 72 31 0d 06 40 21 20 20 20 20 20 20 20 |14,r1..@! | 00000d00 20 43 4d 50 20 20 20 20 20 72 31 34 2c 72 30 2c | CMP r14,r0,| 00000d10 4c 53 52 20 23 31 0d 06 4a 22 2e 64 69 76 31 20 |LSR #1..J".div1 | 00000d20 20 20 4d 4f 56 4c 53 20 20 20 72 31 34 2c 72 31 | MOVLS r14,r1| 00000d30 34 2c 4c 53 4c 20 23 31 0d 06 54 21 20 20 20 20 |4,LSL #1..T! | 00000d40 20 20 20 20 43 4d 50 4c 53 20 20 20 72 31 34 2c | CMPLS r14,| 00000d50 72 30 2c 4c 53 52 20 23 31 0d 06 5e 18 20 20 20 |r0,LSR #1..^. | 00000d60 20 20 20 20 20 42 4c 53 20 20 20 20 20 64 69 76 | BLS div| 00000d70 31 0d 06 68 19 20 20 20 20 20 20 20 20 4d 4f 56 |1..h. MOV| 00000d80 20 20 20 20 20 72 32 2c 23 30 0d 06 72 1a 2e 64 | r2,#0..r..d| 00000d90 69 76 32 20 20 20 43 4d 50 20 20 20 20 20 72 30 |iv2 CMP r0| 00000da0 2c 72 31 34 0d 06 7c 1d 20 20 20 20 20 20 20 20 |,r14..|. | 00000db0 53 55 42 43 53 20 20 20 72 30 2c 72 30 2c 72 31 |SUBCS r0,r0,r1| 00000dc0 34 0d 06 86 1c 20 20 20 20 20 20 20 20 41 44 43 |4.... ADC| 00000dd0 20 20 20 20 20 72 32 2c 72 32 2c 72 32 0d 06 90 | r2,r2,r2...| 00000de0 22 20 20 20 20 20 20 20 20 4d 4f 56 20 20 20 20 |" MOV | 00000df0 20 72 31 34 2c 72 31 34 2c 4c 53 52 20 23 31 0d | r14,r14,LSR #1.| 00000e00 06 9a 1a 20 20 20 20 20 20 20 20 43 4d 50 20 20 |... CMP | 00000e10 20 20 20 72 31 34 2c 72 31 0d 06 a4 18 20 20 20 | r14,r1.... | 00000e20 20 20 20 20 20 42 43 53 20 20 20 20 20 64 69 76 | BCS div| 00000e30 32 0d 06 ae 1d 20 20 20 20 20 20 20 20 54 53 54 |2.... TST| 00000e40 20 20 20 20 20 72 33 2c 23 31 3c 3c 33 31 0d 06 | r3,#1<<31..| 00000e50 b8 1c 20 20 20 20 20 20 20 20 52 53 42 4e 45 20 |.. RSBNE | 00000e60 20 20 72 32 2c 72 32 2c 23 30 0d 06 c2 21 20 20 | r2,r2,#0...! | 00000e70 20 20 20 20 20 20 4c 44 4d 46 44 20 20 20 28 73 | LDMFD (s| 00000e80 70 29 21 2c 7b 72 33 2c 70 63 7d 0d 06 cc 05 5d |p)!,{r3,pc}....]| 00000e90 0d 06 d6 0b ed 20 70 61 73 73 25 0d 06 e0 2a c8 |..... pass%...*.| 00000ea0 99 20 22 4f 53 5f 46 69 6c 65 22 2c 31 30 2c 22 |. "OS_File",10,"| 00000eb0 42 41 55 33 44 22 2c 26 46 46 41 2c 2c 63 6f 64 |BAU3D",&FFA,,cod| 00000ec0 65 25 2c 4f 25 0d 06 ea 05 e0 0d 06 f4 05 3a 0d |e%,O%.........:.| 00000ed0 06 fe 13 dd 20 a4 74 61 62 6c 65 28 73 69 7a 65 |.... .table(size| 00000ee0 25 29 0d 07 08 0d 50 25 2b 3d 73 69 7a 65 25 0d |%)....P%+=size%.| 00000ef0 07 12 0d 4f 25 2b 3d 73 69 7a 65 25 0d 07 1c 06 |...O%+=size%....| 00000f00 3d 30 0d 07 26 05 3a 0d 07 30 10 dd 20 a4 73 77 |=0..&.:..0.. .sw| 00000f10 61 70 28 61 2c 62 29 0d 07 3a 0e 5b 4f 50 54 20 |ap(a,b)..:.[OPT | 00000f20 70 61 73 73 25 0d 07 44 17 20 20 20 20 20 20 20 |pass%..D. | 00000f30 20 82 20 20 20 20 20 61 2c 61 2c 62 0d 07 4e 17 | . a,a,b..N.| 00000f40 20 20 20 20 20 20 20 20 82 20 20 20 20 20 62 2c | . b,| 00000f50 61 2c 62 0d 07 58 17 20 20 20 20 20 20 20 20 82 |a,b..X. .| 00000f60 20 20 20 20 20 61 2c 61 2c 62 0d 07 62 05 5d 0d | a,a,b..b.].| 00000f70 07 6c 06 3d 30 0d 07 76 05 3a 0d 07 80 14 dd 20 |.l.=0..v.:..... | 00000f80 a4 61 64 72 6c 28 72 65 67 2c 6f 66 66 29 0d 07 |.adrl(reg,off)..| 00000f90 8a 0e 5b 4f 50 54 20 70 61 73 73 25 0d 07 94 27 |..[OPT pass%...'| 00000fa0 20 20 20 20 20 20 20 20 41 44 44 20 20 20 20 20 | ADD | 00000fb0 72 65 67 2c 77 70 2c 23 28 6f 66 66 20 80 20 26 |reg,wp,#(off . &| 00000fc0 46 46 29 0d 07 9e 2a 20 20 20 20 20 20 20 20 41 |FF)...* A| 00000fd0 44 44 20 20 20 20 20 72 65 67 2c 72 65 67 2c 23 |DD reg,reg,#| 00000fe0 28 6f 66 66 20 80 20 26 46 46 30 30 29 0d 07 a8 |(off . &FF00)...| 00000ff0 05 5d 0d 07 b2 06 3d 30 0d 07 bc 05 3a 0d 07 c6 |.]....=0....:...| 00001000 16 dd 20 a4 61 64 72 65 71 6c 28 72 65 67 2c 6f |.. .adreql(reg,o| 00001010 66 66 29 0d 07 d0 0e 5b 4f 50 54 20 70 61 73 73 |ff)....[OPT pass| 00001020 25 0d 07 da 27 20 20 20 20 20 20 20 20 41 44 44 |%...' ADD| 00001030 45 51 20 20 20 72 65 67 2c 77 70 2c 23 28 6f 66 |EQ reg,wp,#(of| 00001040 66 20 80 20 26 46 46 29 0d 07 e4 2a 20 20 20 20 |f . &FF)...* | 00001050 20 20 20 20 41 44 44 45 51 20 20 20 72 65 67 2c | ADDEQ reg,| 00001060 72 65 67 2c 23 28 6f 66 66 20 80 20 26 46 46 30 |reg,#(off . &FF0| 00001070 30 29 0d 07 ee 05 5d 0d 07 f8 06 3d 30 0d 08 02 |0)....]....=0...| 00001080 05 3a 0d 08 0c 0e dd 20 a4 77 6b 28 72 65 71 29 |.:..... .wk(req)| 00001090 0d 08 16 0b 77 6b 2b 3d 72 65 71 0d 08 20 0b 3d |....wk+=req.. .=| 000010a0 77 6b 2d 72 65 71 0d 08 2a 05 3a 0d 08 34 0d dd |wk-req..*.:..4..| 000010b0 20 a4 6c 63 28 61 24 29 0d 08 3e 0c ea 20 62 24 | .lc(a$)..>.. b$| 000010c0 2c 69 2c 63 0d 08 48 11 e3 20 69 3d 31 20 b8 20 |,i,c..H.. i=1 . | 000010d0 a9 28 61 24 29 0d 08 52 0e 20 63 3d 97 c1 61 24 |.(a$)..R. c=..a$| 000010e0 2c 69 29 0d 08 5c 1e 20 e7 20 63 3e 3d 97 22 41 |,i)..\. . c>=."A| 000010f0 22 20 80 20 63 3c 3d 97 22 5a 22 20 63 2b 3d 33 |" . c<=."Z" c+=3| 00001100 32 0d 08 66 0b 20 62 24 2b 3d bd 63 0d 08 70 05 |2..f. b$+=.c..p.| 00001110 ed 0d 08 7a 07 3d 62 24 0d 08 84 05 3a 0d 08 8e |...z.=b$....:...| 00001120 17 dd 20 a4 61 73 73 65 72 74 28 61 24 29 3a f4 |.. .assert(a$):.| 00001130 20 2a 2a 2a 0d 08 98 36 e7 20 70 61 73 73 25 3e | ***...6. pass%>| 00001140 34 20 8c 20 e7 20 ac 20 a0 28 61 24 29 20 f1 22 |4 . . . .(a$) ."| 00001150 41 73 73 65 72 74 69 6f 6e 20 27 22 61 24 22 27 |Assertion '"a$"'| 00001160 20 66 61 69 6c 65 64 22 3a e0 0d 08 a2 06 3d 30 | failed":.....=0| 00001170 0d ff |..| 00001172