Home » Personal collection » Acorn hard disk » games » !Cars » !RunImage
!RunImage
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 » Personal collection » Acorn hard disk » games » !Cars |
Filename: | !RunImage |
Read OK: | ✔ |
File size: | 13945 bytes |
Load address: | 0000 |
Exec address: | 0000 |
Duplicates
There is 1 duplicate copy of this file in the archive:
- Recent acquisitions » Acorn ADFS disks » adfs_ArchimedesWorld_199403.adf » Disk1Mar94 » !AWMar94/Goodies/CarWars/!Cars/!RunImage
- Personal collection » Acorn hard disk » games » !Cars » !RunImage
File contents
10REM >!RunImage 20REM Written By Ben Mansell LENEVAL1993 30ON ERROR SYS&400DF," "+REPORT$+" at line "+STR$ERL,1,"Car Wars":END 40VOICES 4:A=RND(-TIME):max%=20:exmax%=3:pl=1:scanr=7:ttt=4:trr=24 50SYS8,5,"<Obey$Dir>.NewCars" TO ,,,,slen% 60DIM m% 14800,sp% slen%+1024,ta% 1000,b 512,sp1% 192,sp2% 192,bu% (max%+1)*40 70DIM ob% 1024,oa% 32,ex%(7),bo% 1024,ba%(20),expl% 128,bonus% 128,spare% 100 80DIM sound% 1024,dam% 128,stdat 512,exblock% 512,bbb% 128,w% 2048,temp% 2048 90DIM st% 1024,pal% 128,scrme 4096,p2% 128,p3% 128,hi% 200,num% 50,bt% 512 100DIM bomap% 128,dm3% 400,back% 45000,btsp% 64,bitad%(7),asc% 256 110sob%=ob%:!sp%=slen%+1024:j=128:sh=7:DIM b%(10):!back%=45000 120SYS8,255,"<Obey$Dir>.NewCars",sp%+4 130SYS8,255,"<Obey$Dir>.!Palette",pal% 140SYS8,255,"<Obey$Dir>.Backdrop",back%+4 150SYS8,255,"<Obey$Dir>.ASCIItable",asc% 160FORi%=1TO9:SYS46,280,sp%,"bullet"+STR$i% TO ,,b%(i%):NEXT 170FORi%=0TO7:SYS46,280,sp%,"explode"+STR$i% TO ,,ex%(i%):NEXT 180FORi%=1TO20:SYS46,280,sp%,"bonus"+STR$i% TO ,,ba%(i%):NEXT 190FORi%=0TO3:SYS46,280,sp%,"barrier"+STR$i% TO ,,oa%!(i%*4):NEXT 200FORi%=0TO9:SYS46,280,sp%,STR$i% TO ,,num%!(i%*4):NEXT 210FORi%=0TO3:SYS46,280,sp%,"bitm"+STR$i% TO ,,bitad%(i%) 220SYS46,280,sp%,"bitn"+STR$i% TO ,,bitad%(i%+4):NEXT 230SYS46,280,sp%,"title" TO ,,title% 240SYS46,280,sp%,"shield" TO ,,shield% 250SYS46,280,sp%,"spinner" TO ,,spinner% 260SYS46,280,sp%,"writer" TO ,,writer% 270SYS46,280,sp%,"archworld" TO ,,archw% 280SYS46,280,sp%,"complete" TO ,,comp% 290SYS46,280,sp%,"gameover" TO ,,gover% 300SYS46,280,sp%,"level" TO ,,level% 310SYS46,280,sp%,"lives" TO ,,lives% 320SYS46,280,sp%,"energybar" TO ,,enbar% 330SYS46,280,sp%,"bonus" TO ,,enbo% 340SYS46,280,sp%,"time" TO ,,time% 350SYS46,280,sp%,"blevt" TO ,,blevt% 360SYS46,280,sp%,"congrats" TO ,,congrats% 370SYS46,280,sp%,"tyre" TO ,,tyre% 380SYS46,280,sp%,"opt1" TO ,,opt1% 390SYS46,280,sp%,"opt2" TO ,,opt2% 400SYS46,280,sp%,"opt3" TO ,,opt3% 410SYS46,280,sp%,"keyleft" TO ,,kleft% 420SYS46,280,sp%,"keyright" TO ,,kright% 430SYS46,280,sp%,"keyup" TO ,,kup% 440SYS46,280,sp%,"keydown" TO ,,kdown% 450SYS46,280,sp%,"keyfire" TO ,,kfire% 460SYS46,280,sp%,"gamemode" TO ,,gamem% 470SYS46,280,sp%,"twogame" TO ,,gamem2% 480SYS46,280,sp%,"onegame" TO ,,gamem1% 490SYS46,280,sp%,"gameplayer" TO ,,gamepl% 500SYS46,280,sp%,"optselect" TO ,,optsel% 510SYS46,280,sp%,"questionmark" TO ,,questm% 520SYS46,280,back%,"backdrop" TO ,,backsp% 530FOR pass%=0 TO 2 STEP 2 540P%=m%:[ OPT pass% 550.blackp MOV R0,#19 560 LDR R1,fadeb2 570 MOV R2,#0 580.fillbp STR R2,[R1],#4 590 SUBS R0,R0,#1 600 BPL fillbp 610 LDR R1,fadeb2 620 SWI "Wimp_SetPalette" 630 MOV PC,R14 640.fadeb2 EQUD p3% 650.fadep2 EQUD pal% 660.fade2 STMFD R13!,{R0-R6,R14} 670 MOV R5,#255 680.fadem3 MOV R6,#19 690 LDR R3,fadeb2 700 LDR R4,fadep2 710.fadem MOV R0,#0 720 STRB R0,[R3],#1 730 ADD R4,R4,#1 740 MOV R1,#2 750.fadem2 LDRB R0,[R4],#1 760 ADD R0,R0,R5 770 CMP R0,#255 780 MOVGT R0,#255 790 STRB R0,[R3],#1 800 SUBS R1,R1,#1 810 BPL fadem2 820 SUBS R6,R6,#1 830 BPL fadem 840 LDR R1,fadeb2 850 SWI "Wimp_SetPalette" 860 MOV R0,#19 870 SWI "OS_Byte" 880 SUBS R5,R5,R9 890 BPL fadem3 900 LDR R1,fadep2 910 SWI "Wimp_SetPalette" 920 LDMIA R13!,{R0-R6,PC}^ 930 940.fade3 STMFD R13!,{R0-R6,R14} 950 MOV R5,#255 960.faden3 MOV R6,#19 970 LDR R3,fadeb2 980 LDR R4,fadep2 990.faden MOV R0,#0 1000 STRB R0,[R3],#1 1010 ADD R4,R4,#1 1020 MOV R1,#2 1030.faden2 LDRB R0,[R4],#1 1040 SUBS R0,R0,R5 1050 MOVMI R0,#0 1060 STRB R0,[R3],#1 1070 SUBS R1,R1,#1 1080 BPL faden2 1090 SUBS R6,R6,#1 1100 BPL faden 1110 LDR R1,fadeb2 1120 SWI "Wimp_SetPalette" 1130 MOV R0,#19 1140 SWI "OS_Byte" 1150 SUBS R5,R5,R9 1160 BPL faden3 1170 LDR R1,fadep2 1180 SWI "Wimp_SetPalette" 1190 LDMIA R13!,{R0-R6,PC}^ 1200 1210.plex STMFD R13!,{R2-R4,R14} 1220 RSB R4,R4,#960 1230 MOV R4,R4,ASR#2 1240 LDR R0,[R2,#32] 1250 LDR R5,[R2,#36] 1260 ADD R0,R0,R2 1270 ADD R5,R5,R2 1280 LDR R1,bacdro 1290 MOV R2,#160 1300 MLA R1,R4,R2,R1 1310 ADD R1,R1,R3,ASR#3 1320 MOV R2,#15 1330.exylp LDMIA R1,{R3-R4} 1340 LDMIA R0!,{R6-R7} 1350 LDMIA R5!,{R8-R9} 1360 BIC R3,R3,R8 1370 BIC R4,R4,R9 1380 ORR R3,R3,R6 1390 ORR R4,R4,R7 1400 STMIA R1,{R3-R4} 1410 ADD R1,R1,#160 1420 SUBS R2,R2,#1 1430 BPL exylp 1440 LDMIA R13!,{R2-R4,PC}^ 1450.dump EQUD 0 1460.bonpl STMFD R13!,{R3-R4} 1470 LDR R0,[R2,#32] 1480 ADD R0,R0,R2 1490 LDR R1,bacdro 1500 MOV R2,#160 1510 RSB R4,R4,#960 1520 MOV R4,R4,ASR#2 1530 MLA R1,R4,R2,R1 1540 ADD R1,R1,R3,ASR#3 1550 MOV R5,#15 1560.ybolp LDMIA R0!,{R3-R4} 1570 STMIA R1,{R3-R4} 1580 ADD R1,R1,#160 1590 SUBS R5,R5,#1 1600 BPL ybolp 1610 LDMIA R13!,{R3-R4} 1620 B bonret 1630 1640.crbits STMFD R13!,{R14} 1650 MOV R7,#112 1660 BL sound 1670 MOV R12,#10 ; Start explosion. R11-car data, R9-player 1680 LDR R10,exbits 1690 LDMIA R11,{R5-R6} 1700 LDR R8,table2 1710.makebt BL rnd 1720 MOV R0,R0,ASR#2 1730 CMP R0,#35 1740 BGT makebt 1750 ADD R0,R8,R0,ASL#3 1760 LDMIA R0,{R3-R4} 1770 BL rnd 1780 AND R0,R0,#3 1790 ADD R0,R0,#1 1800 MUL R3,R0,R3 1810 MUL R4,R0,R4 1820.makesp BL rnd 1830 AND R2,R0,#7 1840 CMP R2,#4 1850 BGT makesp 1860 CMP R2,#0 1870 CMPNE R9,#1 1880 ADDNE R2,R2,#4 1890 STMIA R10!,{R2-R6} 1900 SUBS R12,R12,#1 1910 BPL makebt 1920 LDMIA R13!,{PC}^ 1930.table2 EQUD ta%+280 1940.exbits EQUD bt% 1950.bitspr EQUD btsp% 1960.spinc EQUD 0 1970.carex STMFD R13!,{R0-R12,R14} 1980 MOV R12,#10 ; Number of exploding bits 1990 LDR R11,exbits 2000 LDR R10,bitspr ; Base of picture table 2010 LDR R9,spinc 2020 ADD R9,R9,#1 2030 CMP R9,#9 2040 MOVEQ R9,#0 2050 STR R9,spinc 2060 LDR R0,splot2 2070 LDR R1,sarea2 2080 MOV R5,#8 2090.btloop LDR R6,[R11] 2100 CMP R6,#0 2110 TSTNE R9,#8 2120 BEQ nospin 2130 ADD R6,R6,#1 2140 CMP R6,#5 2150 CMPNE R6,#9 2160 SUBEQ R6,R6,#4 2170.nospin STR R6,[R11],#4 2180 LDMIA R11,{R7-R8} 2190 MOV R2,#63 2200 MUL R7,R2,R7 2210 MUL R8,R2,R8 2220 MOV R7,R7,ASR#6 2230 MOV R8,R8,ASR#6 2240 STMIA R11!,{R7-R8} 2250 LDMIA R11,{R3-R4} 2260 ADD R3,R3,R7,ASL#2 2270 ADD R4,R4,R8,ASL#2 2280 CMP R7,#0 2290 RSBMI R7,R7,#0 2300 CMP R8,#0 2310 RSBMI R8,R8,#0 2320 ADD R7,R7,R8 2330 CMP R7,#5<<(sh-2) 2340 MVNLT R3,#128<<sh 2350 STMIA R11!,{R3-R4} 2360 LDR R2,[R10,R6,ASL#2] 2370 MOV R3,R3,ASR#sh 2380 MOV R4,R4,ASR#sh 2390 SWI 46 2400 SUBS R12,R12,#1 2410 BPL btloop 2420 LDMIA R13!,{R0-R12,PC}^ 2430.dump2 EQUD 0 2440.wonms1 EQUS "Well done! You have completed Car Wars!":ALIGN 2450.woncon EQUD congrats% 2460.wongam MOV R1,#140 2470 BL wait 2480 MOV R0,#112 2490 MOV R1,#1 2500 SWI "OS_Byte" 2510 MOV R0,#113 2520 MOV R1,#1 2530 SWI "OS_Byte" 2540 SWI 256+12 2550 SWI 256+19:SWI 256:SWI 256+24:SWI 511:SWI 511:SWI 511 2560 MOV R10,#500 2570 MOV R5,#8 2580 MOV R6,#5 2590.coplot BL rnd 2600 MUL R3,R0,R6 2610 SUB R3,R3,#300 2620 BL rnd 2630 MOV R4,R0,ASL#2 2640 SUB R4,R4,#64 2650 LDR R0,splot2 2660 LDR R1,sarea2 2670 LDR R2,woncon 2680 SWI 46 2690 SUBS R10,R10,#1 2700 BPL coplot 2710 SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7 2720 SWI 256+8:SWI 256+0:SWI 256+16:SWI 256+0:SWI 256+0:SWI 256+0 2730 SWI 256+0:SWI 256+0 2740 SWI 256+18:SWI 256+0:SWI 256+0:SWI 256+5 2750 MOV R0,#4:MOV R1,#28:MOV R2,#700 2760 SWI "OS_Plot":BL wonms2 2770 MOV R1,#36:SWI "OS_Plot":BL wonms2 2780 MOV R1,#32:MOV R2,#696 2790 SWI "OS_Plot":BL wonms2 2800 MOV R2,#704:SWI "OS_Plot":BL wonms2 2810 SWI 256+18:SWI 256+0:SWI 256+8 2820 MOV R2,#700:SWI "OS_Plot":BL wonms2 2830 SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7 2840 SWI 256+8:SWI 256+0:SWI 256+8:SWI 256+0:SWI 256+0:SWI 256+0 2850 SWI 256+0:SWI 256+0 2860 SWI 256+4:MOV R1,#200 2870 BL wait 2880 B lost 2890.wonms2 ADR R0,wonms1 2900 SWI "OS_Write0" 2910 MOV R0,#4:MOV PC,R14 2920 2930.bacdri EQUD 148:EQUD -1 2940.bacdro EQUD 0:EQUD 0 2950.bacspr EQUD backsp% 2960.stactp EQUD 0 2970.clsbac STR R13,stactp 2980 STR R0,bacdro 2990 LDR R1,bacspr 3000 LDR R2,[R1,#32] 3010 ADD R1,R1,R2 3020 MOV R2,#141 3030.bacplo LDMIA R1!,{R3-R14} 3040 STMIA R0!,{R3-R14} 3050 LDMIA R1!,{R3-R14} 3060 STMIA R0!,{R3-R14} 3070 LDMIA R1!,{R3-R14} 3080 STMIA R0!,{R3-R14} 3090 LDMIA R1!,{R3-R14} 3100 STMIA R0!,{R3-R14} 3110 LDMIA R1!,{R3-R14} 3120 STMIA R0!,{R3-R14} 3130 LDMIA R1!,{R3-R14} 3140 STMIA R0!,{R3-R14} 3150 SUBS R2,R2,#1 3160 BPL bacplo 3170 LDMIA R1!,{R3-R14} 3180 STMIA R0!,{R3-R14} 3190 LDMIA R1!,{R3-R6} 3200 STMIA R0!,{R3-R6} 3210 LDR R13,stactp 3220 B drawb 3230.begspr EQUD blevt% 3240.behnds EQUD 0 3250.timesp EQUD time% 3260.timec EQUD 999<<5 3270.blrout LDR R2,begspr 3280 LDR R0,behnds 3290 CMP R0,#254 3300 BGT blrot2 3310 ADD R6,R0,#1 3320 STR R6,behnds 3330 LDR R1,bacdro 3340 LDR R3,[R2,#32] 3350 LDR R4,[R2,#36] 3360 ADD R3,R3,R2 3370 ADD R4,R4,R2 3380 MOV R5,#160 3390 MLA R0,R5,R6,R1 3400 ADD R0,R0,#34 3410 MOV R1,#22 3420 CMP R6,#233 3430 SUBGT R6,R6,#233 3440 SUBGT R1,R1,R6 3450.ybloop MOV R5,#10 3460.xbloop LDMIA R0,{R6-R7} 3470 LDMIA R3!,{R8-R9} 3480 LDMIA R4!,{R10-R11} 3490 BIC R6,R6,R10 3500 ORR R6,R6,R8 3510 BIC R7,R7,R11 3520 ORR R7,R7,R9 3530 STMIA R0!,{R6-R7} 3540 SUBS R5,R5,#1 3550 BPL xbloop 3560 ADD R0,R0,#160-(22<<2) 3570 SUBS R1,R1,#1 3580 BPL ybloop 3590.blrot2 LDR R0,splot2 3600 LDR R1,sarea2 3610 LDR R2,timesp 3620 MOV R3,#824 3630 MOV R4,#800 3640 MOV R5,#8 3650 SWI 46 3660 LDR R8,timec 3670 SUBS R8,R8,#1 3680 BMI won 3690 STR R8,timec 3700 MOV R8,R8,ASR#5 3710 MOV R3,#1000 3720 MOV R6,#100 3730 LDR R9,nums 3740.divl3 MVN R11,#0 3750 MOV R10,#0 3760.divl4 ADD R11,R11,#1 3770 ADD R10,R10,R6 3780 CMP R10,R8 3790 BLE divl4 3800 LDR R2,[R9,R11,ASL#2] 3810 SWI 46 3820 SUB R10,R10,R6 3830 SUB R8,R8,R10 3840 ADD R3,R3,#52 3850 CMP R6,#100 3860 MOVEQ R6,#10 3870 BEQ divl3 3880 CMP R6,#10 3890 MOVEQ R6,#1 3900 BEQ divl3 3910 MOV PC,R14 3920.fx EQUD sound% 3930.sound STMFD R13!,{R0-R3,R14} 3940 LDR R0,fx 3950 ADD R7,R7,R0 3960 LDMFD R7,{R0-R3} 3970 SWI "Sound_Control" 3980 LDMIA R13!,{R0-R3,PC}^ 3990.sound2 STMFD R13!,{R0-R3,R14} 4000 LDR R0,fx 4010 ADD R5,R5,R0 4020 LDMFD R5,{R0-R3} 4030 SWI "Sound_Control" 4040 LDMIA R13!,{R0-R3,PC}^ 4050.hipos EQUD 0 4060.acthi EQUD 0 4070.hientr EQUS "Congratulations! Enter your name!"+CHR$0:ALIGN 4080.lost LDR R0,splot2 4090 LDR R1,sarea2 4100 LDR R2,gover 4110 MOV R3,#272 4120 MOV R4,#468 4130 MOV R5,#8 4140 SWI 46 4150 MOV R1,#100 4160 BL wait 4170 LDR R10,palett 4180 MVN R9,#3 4190 BL fade 4200 BL grabsc 4210 LDR R1,highsc 4220 MOV R2,#10 ; Score placement 4230 LDR R3,[R1],#16 4240 CMP R3,R0 4250 BGE nhipos 4260.hiplac LDR R3,[R1] 4270 SUBS R2,R2,#1 4280 BMI nhipos 4290 CMP R3,R0 4300 BGE nhipos 4310 LDMIA R1,{R5-R8} 4320 SUB R1,R1,#16 4330 STMIA R1,{R5-R8} 4340 ADD R1,R1,#32 4350 B hiplac 4360.nhipos STR R2,acthi 4370 MOV R4,#2 4380 STR R4,showsc 4390 CMP R2,#10 4400 LDREQ R1,palett 4410 SWIEQ "Wimp_SetPalette" 4420 BEQ titles 4430 SUB R1,R1,#16 4440 STR R0,[R1],#4 4450 STR R1,hipos 4460 BL blackp 4470 SWI 256+17:SWI 256+135 4480 SWI 256+12:SWI 256+17:SWI 256+2:SWI 256+31:SWI 256+2:SWI 256+2 4490 ADR R0,hientr 4500 SWI "OS_Write0":SWI 256+17:SWI 256+9 4510 SWI "OS_NewLine":SWI "OS_NewLine" 4520 MOV R11,#23 4530 MOV R10,#9 4540 LDR R9,highsc 4550.p2loop SWI 256+31:SWI 256+9 4560 MOV R0,R11:SWI "OS_WriteC" 4570 LDR R0,[R9],#4 4580 LDR R1,wimpb2 4590 MOV R2,#10 4600 SWI "OS_ConvertInteger4" 4610 SWI "OS_Write0" 4620 SWI 256+31:SWI 256+16 4630 MOV R0,R11:SWI "OS_WriteC" 4640 MOV R0,R9 4650 SWI "OS_Write0" 4660 ADD R9,R9,#12 4670 SUB R11,R11,#2 4680 SUBS R10,R10,#1 4690 BPL p2loop 4700 LDR R0,splot2 4710 LDR R1,sarea2 4720 LDR R2,title 4730 MOV R3,#40 4740 MOV R4,#40 4750 MOV R5,#0 4760 SWI 46 4770 LDR R2,archiw 4780 MOV R3,#780 4790 MOV R4,#40 4800 SWI 46 4810 MOV R0,#21 4820 MOV R1,#0 4830 SWI "OS_Byte" 4840 LDR R0,acthi 4850 ADD R0,R0,R0 4860 ADD R0,R0,#5 4870 SWI 256+31:SWI 256+16:SWI "OS_WriteC" 4880 SWI 288:SWI 288:SWI 288:SWI 288:SWI 288:SWI 288 4890 SWI 288:SWI 288:SWI 288:SWI 288:SWI 288:SWI 288 4900 SWI 256+31:SWI 256+16:SWI "OS_WriteC" 4910 MOV R0,#4 4920 MOV R1,#2 4930 SWI "OS_Byte" 4940 MOV R9,#6 4950 BL fade3 4960 LDR R0,hipos 4970 MOV R1,#11 4980 MOV R2,#32 4990 MOV R3,#255 5000 SWI "OS_ReadLine" 5010 MOV R2,#0 5020 STRB R2,[R0,R1] 5030 B titles 5040.fadeb EQUD p3% 5050.fade STMFD R13!,{R0-R4,R14} 5060 LDR R0,fadeb 5070 MOV R1,#30 5080.fadel LDR R2,[R10],#4 5090 STR R2,[R0],#4 5100 SUBS R1,R1,#1 5110 BPL fadel 5120 MOV R4,#64 5130.fadel2 MOV R0,#19 5140 SWI "OS_Byte" 5150 LDR R1,fadeb 5160 SWI "Wimp_SetPalette" 5170 LDR R1,fadeb 5180 ADD R1,R1,#1 5190 MOV R3,#23 5200.fadel3 LDRB R0,[R1] 5210 ADDS R0,R0,R9 5220 MOVMI R0,#0 5230 CMP R0,#255 5240 MOVGT R0,#255 5250 STRB R0,[R1],#1 5260 LDRB R0,[R1] 5270 ADDS R0,R0,R9 5280 MOVMI R0,#0 5290 CMP R0,#255 5300 MOVGT R0,#255 5310 STRB R0,[R1],#1 5320 LDRB R0,[R1] 5330 ADDS R0,R0,R9 5340 MOVMI R0,#0 5350 CMP R0,#255 5360 MOVGT R0,#255 5370 STRB R0,[R1],#2 5380 SUBS R3,R3,#1 5390 BPL fadel3 5400 SUBS R4,R4,#1 5410 BPL fadel2 5420 LDMIA R13!,{R0-R4,PC}^ 5430.nums EQUD num% 5440.levfnt EQUD level% 5450.shlev MOV R9,#4 5460 BL fade2 5470 LDR R0,totpl 5480 CMP R0,#2 5490 BEQ switch 5500 LDR R0,blevel 5510 CMP R0,#0 5520 BEQ switch 5530 LDR R0,splot2 5540 LDR R1,sarea2 5550 LDR R2,levfnt 5560 MOV R3,#500 5570 MOV R4,#540 5580 MOV R5,#8 5590 SWI 46 5600 BL retlev 5610 LDR R6,nums 5620 ADD R6,R6,#4 5630 LDR R2,[R6,R0,ASL#2] 5640 LDR R0,splot2 5650 MOV R3,#768 5660 MOV R4,#536 5670 MOV R5,#8 5680 SWI 46 5690 LDR R2,livest 5700 MOV R3,#520 5710 MOV R4,#440 5720 MOV R5,#8 5730 SWI 46 5740 LDR R6,nums 5750 BL grabli 5760 ADD R0,R0,#1 5770 LDR R2,[R6,R0,ASL#2] 5780 LDR R0,splot2 5790 MOV R3,#712 5800 MOV R4,#444 5810 MOV R5,#8 5820 SWI 46 5830 MOV R1,#130 5840 BL wait 5850 B switch 5860.livest EQUD lives% 5870.block2 EQUD b 5880.sarea2 EQUD sp% 5890.splot2 EQUD 546 5900.opt1 EQUS "Select: 1. 1 player 2. 2 players"+CHR$0:ALIGN 5910.opt2 EQUS STRING$(39,CHR$32)+CHR$0 5920.opt3 EQUS " Difficulty Level? (0-7) "+CHR$0:ALIGN 5930.scrm EQUD scrme 5940.archiw EQUD archw% 5950.ststat EQUD stdat 5960.wimpb2 EQUD w% 5970.title EQUD title% 5980.gmode EQUD gamem% 5990.gpl EQUD gamem1%:EQUD gamem2% 6000.gpl2 EQUD gamepl% 6010.keyssp EQUD kleft%:EQUD kright%:EQUD kup%:EQUD kdown%:EQUD kfire% 6020.keydta EQUD asc% 6030.menusp EQUD optsel% 6040.showpl LDR R0,splot2 6050 LDR R1,sarea2 6060 ADR R2,gpl 6070 LDR R3,totpl 6080 SUB R3,R3,#1 6090 LDR R2,[R2,R3,ASL#2] 6100 MOV R3,#664 6110 MOV R4,#900 6120 MOV R5,#0 6130 SWI 46 6140 MOV PC,R14 6150.optpage MVN R9,#4 6160 LDR R10,palett 6170 BL fade 6180 SWI 256+12 6190 BL blackp 6200 MOV R12,#1 6210 LDR R0,splot2 6220 LDR R1,sarea2 6230 LDR R2,gmode 6240 MOV R3,#144 6250 MOV R4,#900 6260 MOV R5,#0 6270 SWI 46 6280 BL showpl 6290 LDR R2,gpl2 6300 MOV R3,#844 6310 SUB R4,R4,#12 6320 SWI 46 6330 LDR R2,menusp 6340 MOV R3,#202 6350 MOV R4,#53 6360 SWI 46 6370 MOV R6,#4 6380 ADR R7,keyssp 6390 MOV R3,#90 6400 MOV R4,#700 6410.knamel LDR R2,[R7],#4 6420 SWI 46 6430 SUB R4,R4,#100 6440 SUBS R6,R6,#1 6450 BPL knamel 6460.prkeyd LDR R6,keydta 6470 LDR R7,ststat 6480 ADD R7,R7,#24 6490 SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7:SWI 256+16 6500 SWI 256:SWI 256+16:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256 6510 SWI 256+5:SWI 256+18:SWI 256:SWI 256+11 6520 MOV R1,#0 6530 LDR R10,totpl 6540 SUB R10,R10,#1 6550.kydisl ADD R1,R1,#400 6560 MOV R2,#764 6570 MOV R9,#4 6580.prklop LDR R8,[R7],#4 6590 RSB R8,R8,#0 6600 SUB R8,R8,#17 6610 MOV R8,R8,ASL#1 6620 ADD R8,R8,R6 6630 MOV R0,#4 6640 SWI "OS_Plot" 6650 SUB R2,R2,#100 6660 LDRB R0,[R8],#1 6670 SWI "OS_WriteC" 6680 LDRB R0,[R8] 6690 CMP R0,#255 6700 SWINE "OS_WriteC" 6710 SUBS R9,R9,#1 6720 BPL prklop 6730 ADD R7,R7,#108 6740 SUBS R10,R10,#1 6750 BPL kydisl 6760 SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7:SWI 256+8 6770 SWI 256:SWI 256+8:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256 6780 SWI 256+4 6790 MOV R9,#5 6800 CMP R12,#1:BLEQ fade3 6810.getak MOV R0,#21:MOV R1,#0:MOV R2,#0:SWI 6:SWI "OS_ReadC" 6820 CMP R0,#50 6830 BEQ redef 6840 CMP R0,#51 6850 BEQ optcls 6860 CMP R0,#49 6870 BNE getak 6880 LDR R0,totpl 6890 RSB R0,R0,#3 6900 STR R0,totpl 6910 SWI 256+18:SWI 256:SWI 256+7 6920 MOV R0,#4 6930 MOV R1,#800 6940 MOV R2,#764 6950 SWI "OS_Plot" 6960 MOV R0,#101 6970 MOV R1,#928 6980 MOV R2,#300 6990 SWI "OS_Plot" 7000 BL showpl 7010 MOV R12,#0 7020 B prkeyd 7030.optcls LDR R10,palett 7040 MVN R9,#4 7050 BL fade 7060 SWI 256+12 7070 LDR R1,palett 7080 SWI "Wimp_SetPalette" 7090 B titles 7100.vollev EQUD 127 7110.writer EQUD writer% 7120.palett EQUD pal% 7130.scrbla SWI "XOS_Mouse" 7140 CMP R2,#7 7150 BEQ starto 7160 CMP R2,#0 7170 BNE scrbla 7180 MOV R0,#113 ; Return to desktop 7190 MOV R1,#1 7200 SWI 6 7210 MOV R0,#112 7220 MOV R1,#1 7230 SWI 6 7240 MOV R0,#21 7250 MOV R1,#0 7260 MOV R2,#0 7270 SWI 6 7280 B rettw 7290.specpl EQUD &234 7300.getkey MVN R5,#127 7310.keygl MOV R1,R5 7320 MOV R2,R5 7330 MOV R0,#129 7340 SWI 6 7350 CMP R1,#255 7360 BEQ getkey 7370 ADD R5,R5,#1 7380 CMN R5,#15 7390 BLT keygl 7400 MVN R5,#127 7410.keygl2 MOV R1,R5 7420 MOV R2,R5 7430 MOV R0,#129 7440 SWI 6 7450 CMP R1,#255 7460 SWIEQ 256+7 7470 MOVEQ PC,R14 7480 ADD R5,R5,#1 7490 CMN R5,#15 7500 MVNEQ R5,#127 7510 B keygl2 7520.questm EQUD questm% 7530.redef LDR R9,totpl 7540 SUB R9,R9,#1 7550 LDR R11,ststat 7560 ADD R11,R11,#24 7570 SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7:SWI 256+16:SWI 256 7580 SWI 256+16:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256+5 7590 MOV R7,#0 7600 LDR R12,totpl 7610 SUB R12,R12,#1 7620.keyl ADD R7,R7,#400 7630 MOV R10,#4 7640 MOV R8,#700 7650.kgetl LDR R0,splot2 7660 LDR R1,sarea2 7670 LDR R2,questm 7680 MOV R3,R7 7690 ADD R4,R8,#4 7700 MOV R5,#0 7710 SWI 46 7720 BL getkey 7730 STR R5,[R11],#4 7740 MOV R0,#4 7750 ADD R1,R7,#128 7760 MOV R2,R8 7770 SWI "OS_Plot" 7780 SWI 256+18:SWI 256:SWI 256+7 7790 MOV R0,#101 7800 SUB R1,R1,#128 7810 ADD R2,R2,#64 7820 SWI "OS_Plot" 7830 SWI 256+18:SWI 256:SWI 256+11 7840 LDR R6,keydta 7850 RSB R5,R5,#0 7860 SUB R5,R5,#17 7870 MOV R5,R5,ASL#1 7880 ADD R5,R5,R6 7890 LDRB R0,[R5],#1 7900 SWI "OS_WriteC" 7910 LDRB R0,[R5] 7920 CMP R0,#255 7930 SWINE "OS_WriteC" 7940 SUB R8,R8,#100 7950 SUBS R10,R10,#1 7960 BPL kgetl 7970 ADD R11,R11,#108 7980 SUBS R12,R12,#1 7990 BPL keyl 8000 SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7:SWI 256+8:SWI 256 8010 SWI 256+8:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256+4 8020 B getak 8030.lcomp EQUD comp% 8040.gover EQUD gover% 8050.enleft EQUS "Bonus: "+CHR$0:ALIGN 8060.losel LDR R0,totpl 8070 CMP R0,#2 8080 BEQ titles 8090 LDR R11,block2 ; Who won? 8100 LDR R8,[R11,#20] 8110 CMP R8,#0 8120 BGE won 8130 LDR R0,lives 8140 SUBS R0,R0,#1 8150 STR R0,lives 8160 BMI lost 8170 B fadeiv 8180.scstr2 EQUS "Score: "+CHR$0 8190.enbot EQUD enbo% 8200.won LDR R0,blevel 8210 CMP R0,#0 8220 BNE endolv 8230 MOV R0,#1 8240 STR R0,blevel 8250 MOV R0,#0 8260 STR R0,switon 8270 LDR R0,ststat 8280 LDR R1,block2 8290 ADD R0,R0,#128 8300 ADD R1,R1,#128 8310 MOV R2,#31 8320.brepdt LDR R3,[R0],#4 8330 STR R3,[R1],#4 8340 SUBS R2,R2,#1 8350 BPL brepdt 8360 LDR R11,block2 8370 ADD R11,R11,#128 8380 MOV R0,#1 8390 STR R0,[R11,#24] 8400 STR R0,[R11,#32] 8410 MOV R0,#0 8420 STR R0,[R11,#36] 8430 STR R0,[R11,#112] 8440 STR R0,[R11,#40] 8450 MOV R0,#9 8460 STR R0,[R11,#28] 8470 BL retlev 8480 MOV R0,R0,ASL#5 8490 ADD R0,R0,#200 8500 STR R0,[R11,#20] 8510 LDR R0,ststat 8520 LDMIA R0,{R1-R5} 8530 LDR R0,block2 8540 STMIA R0,{R1-R5} 8550 B fadetn 8560.bacare EQUD back% 8570.bacpsp EQUD backsp% 8580.endolv LDR R0,splot2 8590 LDR R1,sarea2 8600 LDR R2,lcomp 8610 MOV R3,#272 8620 MOV R4,#452 8630 MOV R5,#8 8640 SWI 46 8650 SWI 256+31:SWI 256+15:SWI 256+20 8660 LDR R0,splot2 8670 LDR R1,sarea2 8680 LDR R2,enbot 8690 MOV R3,#432 8700 MOV R4,#340 8710 MOV R5,#8 8720 SWI 46 8730.boaddl SWI 256+31:SWI 256+21:SWI 256+20 8740 MOV R0,#19:SWI "OS_Byte" 8750 LDR R9,nums 8760 LDR R1,sarea2 8770 MOV R6,#100 ; Units 8780 MOV R3,#660 8790 MOV R4,#340 8800 MOV R5,#8 8810 MOV R12,R8 8820.divl2 MVN R11,#0 8830 MOV R10,#0 8840.divlop ADD R11,R11,#1 8850 ADD R10,R10,R6 8860 CMP R10,R12 8870 BLE divlop 8880 LDR R2,[R9,R11,ASL#2] 8890 SWI 256+24 8900 AND R0,R3,#255:SWI "OS_WriteC" 8910 MOV R0,R3,LSR#8:SWI "OS_WriteC" 8920 AND R0,R4,#255:SWI "OS_WriteC" 8930 MOV R0,R4,LSR#8:SWI "OS_WriteC" 8940 ADD R7,R3,#52 8950 AND R0,R7,#255:SWI "OS_WriteC" 8960 MOV R0,R7,LSR#8:SWI "OS_WriteC" 8970 ADD R7,R4,#72 8980 AND R0,R7,#255:SWI "OS_WriteC" 8990 MOV R0,R7,LSR#8:SWI "OS_WriteC" 9000 LDR R0,splot2 9010 STMFD R13!,{R1-R5} 9020 LDR R1,bacare 9030 LDR R2,bacpsp 9040 MOV R3,#0 9050 MOV R4,#0 9060 MOV R5,#0 9070 SWI 46 9080 LDMIA R13!,{R1-R5} 9090 SWI 46 9100 SUB R10,R10,R6 9110 SUB R12,R12,R10 9120 ADD R3,R3,#52 9130 CMP R6,#100 9140 MOVEQ R6,#10 9150 BEQ divl2 9160 CMP R6,#10 9170 MOVEQ R6,#1 9180 BEQ divl2 9190 SUB R8,R8,#3 9200 LDR R7,score 9210 ADD R7,R7,#3 9220 STR R7,score 9230 SWI 256+31:SWI 256+1:SWI 256+1 9240 ADR R0,scstr2:SWI "OS_Write0" 9250 MOV R0,R7 9260 LDR R1,wimpb2 9270 MOV R2,#12 9280 SWI "OS_ConvertInteger4" 9290 SWI "OS_Write0" 9300 CMN R8,#3 9310 BGT boaddl 9320 SWI 256+26 9330 BL retlev 9340 ADD R0,R0,#1 9350 CMP R0,#8 9360 BGE wongam 9370 BL placer 9380 MOV R1,R0,ASR#1 9390 CMP R0,R1,ASL#1 9400 MOVNE R0,#0 9410 STRNE R0,blevel 9420 MOVNE R0,#51<<5 9430 STRNE R0,timec 9440 MOVNE R0,#0 9450 STRNE R0,behnds 9460 MOV R1,#100 9470 BL wait 9480.fadeiv BL invars 9490.fadetn LDR R10,palett 9500 MOV R9,#4 9510 BL fade 9520 SWI 256+17:SWI 256+128:SWI 256+17:SWI 256+7:SWI 256+12 9530 LDR R0,blevel 9540 CMP R0,#0 9550 BNE switch 9560 MOV R0,#5 9570 STR R0,maxbo 9580 LDR R11,block2 9590 MOV R0,#1536<<sh 9600 STR R0,[R11,#128] 9610 STR R0,[R11,#132] 9620 B switch 9630.doturn CMP R7,#3 9640 ADDEQ R8,R8,#8 9650 CMP R7,#2 9660 SUBEQ R8,R8,#8 9670 CMP R7,#10 9680 BNE nfb 9690 ADD R8,R8,#144 9700 LDR R7,[R11,#100] 9710 SUB R7,R7,#1 9720 STR R7,[R11,#100] 9730 MOV R7,#10 9740.nfb SUB R7,R7,#1 9750 STR R7,sbutp 9760 CMP R8,#288 9770 SUBGE R8,R8,#288 9780 CMP R8,#0 9790 ADDMI R8,R8,#288 9800 CMP R7,#8 9810 MOVEQ R7,#0 9820 STREQ R7,sbutp 9830 BEQ fintur 9840 CMP R7,#0 9850 BNE fintur 9860 LDR R7,[R11,#92] 9870 SUB R7,R7,#1 9880 STR R7,[R11,#92] 9890 B fintur 9900.dm3dat EQUD dm3% 9910.dm3tit EQUS "Bonusses available:"+CHR$0:ALIGN 9920.demo3 SWI 256+12:SWI 256+17:SWI 256+2:SWI 256+31:SWI 256+10:SWI 256+0 9930 ADR R0,dm3tit 9940 SWI "OS_Write0" 9950 SWI 256+17:SWI 256+0 9960 MOV R0,#3 9970 STR R0,showsc 9980 MOV R3,#50 9990 MOV R4,#900 10000 MOV R5,#0 10010 LDR R6,splot2 10020 LDR R7,sarea2 10030 MOV R9,#19 10040 LDR R10,dm3dat 10050 SWI 256+18:SWI 256+0:SWI 256+1:SWI 256+5 10060.readd3 LDR R2,[R10],#4 10070 MOV R0,R6 10080 MOV R1,R7 10090 SWI 46 10100 MOV R0,#4 10110 ADD R1,R3,#70 10120 ADD R2,R4,#50 10130 SWI "OS_Plot" 10140 MOV R0,R10 10150 SWI "OS_Write0" 10160 ADD R10,R10,#16 10170 SUB R4,R4,#80 10180 CMP R4,#120 10190 ADDLT R3,R3,#640 10200 MOVLT R4,#900 10210 SUBS R9,R9,#1 10220 BPL readd3 10230 SWI 256+4 10240 B textc 10250.totpl EQUD 1 10260.highsc EQUD hi% 10270.showsc EQUD 1 10280.showti EQUD 0 10290.highti EQUS "High Scores:"+CHR$0:ALIGN 10300.demo2 SWI 256+12:SWI 256+17:SWI 256+2:SWI 256+31:SWI 256+12:SWI 256+2 10310 ADR R0,highti 10320 SWI "OS_Write0":SWI 256+17:SWI 256+0 10330 SWI "OS_NewLine":SWI "OS_NewLine" 10340 MOV R11,#23 10350 MOV R10,#9 10360 LDR R9,highsc 10370.prloop SWI 256+31:SWI 256+9 10380 MOV R0,R11:SWI "OS_WriteC" 10390 LDR R0,[R9],#4 10400 LDR R1,wimpb2 10410 MOV R2,#10 10420 SWI "OS_ConvertInteger4" 10430 SWI "OS_Write0" 10440 SWI 256+31:SWI 256+16 10450 MOV R0,R11:SWI "OS_WriteC" 10460 MOV R0,R9 10470 SWI "OS_Write0" 10480 ADD R9,R9,#12 10490 SUB R11,R11,#2 10500 SUBS R10,R10,#1 10510 BPL prloop 10520 LDR R0,splot2 10530 LDR R1,sarea2 10540 LDR R2,title 10550 MOV R3,#40 10560 MOV R4,#40 10570 MOV R5,#0 10580 SWI 46 10590 LDR R2,archiw 10600 MOV R3,#780 10610 MOV R4,#40 10620 SWI 46 10630 B textc 10640.invars SWI "XOS_Mouse" 10650 CMP R2,#0:BNE invars 10660 STMFD R13!,{R14} 10670 BL placsw 10680 LDR R0,ststat 10690 LDR R1,block2 10700 MOV R2,#300 10710.config LDR R3,[R0],#4 10720 STR R3,[R1],#4 10730 SUBS R2,R2,#4 10740 BPL config 10750 LDR R3,bartab 10760 LDR R4,barr 10770 LDR R5,oabar 10780 MOV R7,#2 10790.barrpl BL rnd 10800 AND R0,R0,#15 10810 MOV R0,R0,ASL#5 10820 ADD R0,R0,#384 10830 MOV R0,R0,ASL#sh 10840 SUB R0,R0,#32*j 10850 STR R0,[R3],#4 10860.ysc BL rnd 10870 AND R0,R0,#15 10880 CMP R0,#10 10890 BGT ysc 10900 MOV R0,R0,ASL#5 10910 ADD R0,R0,#384 10920 CMP R0,#640 10930 BGT notinw 10940 CMP R0,#468 10950 BGT ysc 10960.notinw MOV R0,R0,ASL#sh 10970 SUB R0,R0,#32*j 10980 STR R0,[R3],#4 10990 BL rnd 11000 MOV R0,R0,ASR#6 11010 LDR R0,[R5,R0,ASL#2] 11020 STR R0,[R3],#4 11030 BL rnd 11040 BL rnd 11050 SUBS R4,R4,#1 11060 BPL barrpl 11070 LDR R0,bblock 11080 MOV R1,#5 11090 MOV R2,#2560 11100.bocler STR R2,[R0],#16 11110 SUBS R1,R1,#1 11120 BPL bocler 11130 MOV R0,#0 11140 STR R0,bonscr 11150 MOV R1,#2 11160 STR R1,maxbo 11170 LDR R0,exblo 11180 LDR R1,exmax 11190.excler STR R2,[R0],#12 11200 SUBS R1,R1,#1 11210 BPL excler 11220 MOV R8,#1 11230 MOV R0,#0 11240 STR R0,exonsc 11250 STR R0,switon 11260 STR R0,windx 11270 STR R0,windy 11280 STR R0,onscr 11290 LDR R0,maxbu 11300 LDR R1,a 11310 MOV R2,#2560 11320.fillbb STR R2,[R1],#40 11330 SUBS R0,R0,#1 11340 BPL fillbb 11350 LDR R0,totpl 11360 CMP R0,#2 11370 BEQ nisp 11380 LDR R11,block2 11390 ADD R11,R11,#128 11400 STR R0,[R11,#24] 11410 STR R0,[R11,#32] 11420 MOV R0,#0 11430 STR R0,[R11,#36] 11440 STR R0,[R11,#112] 11450 STR R0,[R11,#40] 11460 MOV R0,#9 11470 STR R0,[R11,#28] 11480 BL retlev 11490 MOV R0,R0,ASL#5 11500 ADD R0,R0,#200 11510 STR R0,[R11,#20] 11520.nisp LDMIA R13!,{PC}^ 11530.starto MOV R0,#112 11540 MOV R1,#1 11550 SWI "OS_Byte" 11560 MOV R0,#113 11570 MOV R1,#1 11580 SWI "OS_Byte" 11590 SWI 256+12 11600 LDR R1,palett 11610 SWI "Wimp_SetPalette" 11620.start MOV R0,R0 11630 MOV R0,R0 11640 MOV R0,#1 11650 STR R0,showsc 11660.titles BL invars 11670 SWI 256+17 11680 SWI 256+135 11690 SWI 256+17 11700 SWI 256+0 11710 LDR R1,palett 11720 SWI "Wimp_SetPalette" 11730 SWI 66 11740 ADD R0,R0,#800 11750 STR R0,showti 11760 LDR R0,showsc 11770 CMP R0,#1 11780 BEQ demo1 11790 CMP R0,#2 11800 BEQ demo2 11810 B demo3 11820.volstr EQUS CHR$31+CHR$12+CHR$26+"Volume Level:"+CHR$0:ALIGN 11830.titlsc EQUD 153:EQUD 153 11840.xdiv EQUD 1 11850.ydiv EQUD 1 11860.opt1s EQUD opt1%:EQUD opt2%:EQUD opt3% 11870.demo1 SWI 256+12:MOV R0,#1 11880 STR R0,showsc 11890 MOV R8,#1 11900.rep LDR R0,specpl 11910 LDR R1,sparea 11920 LDR R2,title 11930 MOV R3,#80 11940 ADD R3,R3,R8,ASL#1 11950 MOV R4,#44 11960 ADD R4,R4,R8,ASL#2 11970 MOV R5,#0 11980 ADR R6,titlsc 11990 MVN R7,#0 12000 STR R8,xdiv 12010 STR R8,ydiv 12020 SWI 46 12030 ADD R8,R8,#2 12040 CMP R8,#153 12050 BNE rep 12060 LDR R0,spplot 12070 LDR R1,sparea 12080 LDR R2,writer 12090 MOV R3,#580 12100 MOV R4,#50 12110 MOV R5,#0 12120 SWI 46 12130 LDR R2,archiw 12140 MOV R3,#100 12150 MOV R4,#20 12160 SWI 46 12170 LDR R2,opt1s 12180 MOV R3,#392 12190 MOV R4,#472 12200 SWI 46 12210 LDR R2,opt1s+4 12220 MOV R4,#388 12230 SWI 46 12240 LDR R2,opt1s+8 12250 MOV R4,#272 12260 SWI 46 12270 ADR R0,volstr 12280 SWI "OS_Write0" 12290 LDR R0,vollev 12300 LDR R1,energy 12310 MOV R2,#12 12320 SWI "OS_ConvertCardinal1" 12330 SWI 256+31:SWI 256+25:SWI 256+26:SWI "OS_Write0":SWI 256+32 12340.textc MOV R0,#129 12350 MVN R1,#48 12360 MVN R2,#48 12370 SWI "OS_Byte" 12380 CMP R1,#255 12390 BEQ firepr 12400 MOV R0,#129 12410 MVN R1,#49 12420 MVN R2,#49 12430 SWI "OS_Byte" 12440 CMP R1,#255 12450 BEQ optpage 12460 MOV R0,#129 12470 MVN R1,#17 12480 MVN R2,#17 12490 SWI "OS_Byte" 12500 CMP R1,#255 12510 ADREQ R14,start 12520 BEQ scrbla 12530 SWI 66 12540 LDR R1,showti 12550 CMP R0,R1 12560 BLT samep 12570 SWI 66 12580 ADD R0,R0,#800 12590 STR R0,showti 12600 LDR R0,showsc 12610 ADD R0,R0,#1 12620 CMP R0,#4 12630 MOVEQ R0,#1 12640 STR R0,showsc 12650 CMP R0,#1 12660 BEQ demo1 12670 CMP R0,#2 12680 BEQ demo2 12690 B demo3 12700.samep MOV R0,#129 12710 MVN R1,#113 12720 MVN R2,#113 12730 SWI 6 12740 CMP R1,#255 12750 ADREQ R14,start 12760 BEQ scrbla 12770 LDR R9,vollev 12780 MOV R0,#129 12790 MVN R1,#57 12800 MVN R2,#57 12810 SWI 6 12820 CMP R1,#255 12830 ADDEQ R9,R9,#1 12840 MOV R0,#129 12850 MVN R1,#41 12860 MVN R2,#41 12870 SWI 6 12880 CMP R1,#255 12890 SUBEQ R9,R9,#1 12900 CMP R9,#0 12910 MOVEQ R9,#1 12920 CMP R9,#128 12930 MOVEQ R9,#127 12940 LDR R8,vollev 12950 STR R9,vollev 12960 CMP R8,R9 12970 BEQ textc 12980 MOV R0,R9 12990 SWI "Sound_Volume" 13000 LDR R0,vollev 13010 LDR R1,energy 13020 MOV R2,#12 13030 SWI "OS_ConvertCardinal1" 13040 SWI 256+31:SWI 256+25:SWI 256+26:SWI "OS_Write0":SWI 256+32 13050 SWI 66 13060 ADD R0,R0,#1000 13070 STR R0,showti 13080 LDR R0,showsc 13090 CMP R0,#1 13100 BEQ textc 13110 B demo1 13120.firepr LDR R10,palett 13130 MOV R9,#4 13140 BL fade 13150 MOV R9,#32 13160 SWI 256+17:SWI 256+128:SWI 256+17:SWI 256+7:SWI 256+12 13170 BL invars 13180 LDR R1,totpl 13190 CMP R1,#1 13200 BNE switch 13210 STR R1,blevel 13220 BL retlev 13230 MOV R0,R0,ASL#5 13240 ADD R0,R0,#200 13250 LDR R11,block 13260 STR R0,[R11,#20+128] 13270 MOV R0,#2 ; Lives 13280 STR R0,lives 13290 MOV R0,#0 13300 STR R0,score 13310 MOV R0,#0 13320 BL placer 13330.nodams SWI "OS_Mouse":CMP R2,#0:BNE nodams 13340 B switch 13350.screen EQUD 1 13360.blevel EQUD 1 13370.switon EQUD 0 13380.thitl EQUD 0 13390.hitlas EQUD 0:EQUD 0 13400.placsw ADR R0,scrsw1 13410 ADR R1,scrsw 13420 SWI "OS_ReadVduVariables" 13430 MOV PC,R14 13440.scrsw1 EQUD 148:EQUD -1 13450.scrsw EQUD 0:EQUD 0 13460.switch SWI "XOS_Mouse" 13470 CMP R2,#0 13480 BLNE scrbla 13490 MOV R0,#19 13500 SWI "OS_Byte" 13510 MOV R0,#112 13520 LDR R1,screen 13530 SWI "OS_Byte" 13540 LDR R0,switon 13550 ADD R0,R0,#1 13560 STR R0,switon 13570 CMP R0,#3 13580 BEQ shlev 13590 LDR R1,screen 13600 RSB R1,R1,#3 13610 STR R1,screen 13620 MOV R0,#113 13630 SWI "OS_Byte" 13640 ADR R0,scrsw1 13650 ADR R1,scrsw 13660 SWI "OS_ReadVduVariables" 13670 LDR R0,scrsw 13680 B clsbac 13690.drawb LDR R11,bartab 13700 LDR R8,barr 13710.barloo LDMIA R11!,{R3-R4} 13720 LDR R2,[R11],#4 13730 CMP R3,#0 13740 BLT destbr 13750 LDR R0,scrsw 13760 MOV R3,R3,ASR#sh 13770 MOV R4,R4,ASR#sh 13780 SUB R3,R3,#64 13790 LDR R1,[R2,#32] 13800 ADD R1,R1,R2 13810 RSB R4,R4,#1024 13820 MOV R4,R4,ASR#2 13830 MOV R5,#160 13840 MLA R0,R4,R5,R0 13850 ADD R0,R0,R3,ASR#3 13860 MOV R5,#15 13870.ybarlp LDMIA R1!,{R3-R4} 13880 STMIA R0,{R3-R4} 13890 ADD R0,R0,#160 13900 SUBS R5,R5,#1 13910 BPL ybarlp 13920.destbr SUBS R8,R8,#1 13930 BPL barloo 13940.moveit LDR R11,block 13950 LDR R0,blevel 13960.cars STR R0,left 13970 LDR R12,block 13980 CMP R11,R12 13990 ADR R12,hitlas 14000 ADDNE R12,R12,#4 14010 STR R12,thitl 14020 LDR R12,[R12] 14030 LDR R2,[R11,#20] 14040 STR R2,olden 14050 MOV R2,#0 14060 LDR R5,[R11,#8] 14070 LDR R6,[R11,#12] 14080 LDR R3,windx 14090 ADD R5,R5,R3 14100 LDR R4,windy 14110 ADD R6,R6,R4 14120 LDMIA R11,{R3-R4} 14130 ADD R3,R3,R5 14140 CMP R3,#64*j 14150 MOVLT R3,#64*j 14160 RSBLT R5,R5,#0 14170 MOVLT R2,#1 14180 LDR R7,right 14190 CMP R3,R7 14200 MOVGT R3,R7 14210 RSBGT R5,R5,#0 14220 MOVGT R2,#1 14230 14240 STMFD R13!,{R0-R1,R3-R4,R7-R10} 14250 ADD R3,R3,#72*j 14260 ADD R4,R4,#72*j 14270 LDR R10,bartab 14280 LDR R8,barr 14290.barlp1 LDMIA R10!,{R0-R1}:ADD R10,R10,#4 14300 CMP R0,#0 14310 BLT nocra1 14320 SUBS R0,R3,R0 14330 RSBMI R0,R0,#0 14340 CMP R0,#68*j 14350 BLT cra1 14360.nocra1 SUBS R8,R8,#1 14370 BPL barlp1 14380 LDMIA R13!,{R0-R1,R3-R4,R7-R10} 14390 B ycolde 14400.cra1 SUBS R1,R4,R1 14410 RSBMI R1,R1,#0 14420 CMP R1,#64*j 14430 BGT nocra1 14440 RSBS R5,R5,#0 14450 CMP R5,#0 14460 ADD R5,R5,#1<<sh 14470 SUBMI R5,R5,#2<<sh 14480 MOV R2,#1 14490 LDMIA R13!,{R0-R1,R3-R4,R7-R10} 14500 LDMIA R11,{R3-R4} 14510 B newbr 14520 14530.ycolde ADD R4,R4,R6 14540 CMP R4,#200*j 14550 MOVLT R4,#200*j 14560 RSBLT R6,R6,#0 14570 MOVLT R2,#1 14580 LDR R7,top 14590 CMP R4,R7 14600 MOVGT R4,R7 14610 RSBGT R6,R6,#0 14620 MOVGT R2,#1 14630 14640 STMFD R13!,{R0-R1,R3-R4,R7-R10} 14650 ADD R3,R3,#72*j 14660 ADD R4,R4,#72*j 14670 LDR R10,bartab 14680 LDR R8,barr 14690.barlp2 LDMIA R10!,{R0-R1}:ADD R10,R10,#4 14700 CMP R0,#0 14710 BLT nocra2 14720 SUBS R0,R3,R0 14730 RSBMI R0,R0,#0 14740 CMP R0,#64*j 14750 BLT cra2 14760.nocra2 SUBS R8,R8,#1 14770 BPL barlp2 14780 LDMIA R13!,{R0-R1,R3-R4,R7-R10} 14790 B newbr 14800.cra2 SUBS R1,R4,R1 14810 RSBMI R1,R1,#0 14820 CMP R1,#64*j 14830 BGT nocra2 14840 RSBS R6,R6,#0 14850 MOV R2,#1 14860 LDMIA R13!,{R0-R1,R3-R4,R7-R10} 14870 LDMIA R11,{R3-R4} 14880 14890.newbr CMP R2,#1:BNE nowalc 14900 CMP R12,#1:BEQ nowald 14910 MOV R7,#0 14920 BL sound 14930 LDR R7,[R11,#20] 14940 SUB R7,R7,#1 14950 STR R7,[R11,#20] 14960 MOV R12,#1 14970 LDR R7,thitl 14980 STR R12,[R7] 14990 B nowald 15000.nowalc LDR R12,thitl 15010 MOV R7,#0 15020 STR R7,[R12] 15030 MOV R12,#1 15040.nowald LDR R2,block 15050.hitcar CMP R2,R11 15060 BEQ self 15070 LDR R14,[R2] 15080 SUBS R14,R14,R3 15090 RSBMI R14,R14,#0 15100 CMP R14,#78*j 15110 BGT self 15120 LDR R14,[R2,#4] 15130 SUBS R14,R14,R4 15140 RSBMI R14,R14,#0 15150 CMP R14,#78*j 15160 BGT self 15170 MVN R5,R5 15180 MVN R6,R6 15190 ADD R3,R3,R5 15200 ADD R4,R4,R6 15210 LDR R1,[R2,#8] 15220 LDR R14,[R2,#12] 15230 SUB R1,R1,R5,ASR#1 15240 SUB R14,R14,R6,ASR#1 15250 STR R1,[R2,#8] 15260 STR R14,[R2,#12] 15270 LDR R1,[R11,#20] 15280 SUB R1,R1,#2 15290 STR R1,[R11,#20] 15300.norefl MOV R1,#2 15310 STR R1,[R11,#116] 15320 MOV R1,R5 15330 MOV R5,#80 15340 BL sound2 15350 MOV R5,R1 15360.self ADD R2,R2,#128 15370 SUBS R12,R12,#1 15380 BPL hitcar 15390 STR R3,[R11] 15400 STR R4,[R11,#4] 15410 MOV R8,#62 15420 MUL R5,R8,R5 15430 MUL R6,R8,R6 15440 MOV R5,R5,ASR #6 15450 MOV R6,R6,ASR #6 15460 CMN R5,#31 15470 MOVEQ R5,#0 15480 CMN R6,#31 15490 MOVEQ R6,#0 15500 LDR R14,[R11,#16] 15510 LDR R7,[R11,#80] 15520 LDR R12,[R11,#20] 15530 CMP R12,#1024 15540 MOVLO R12,#129 15550 MOVHI R12,#118 15560 MOV R0,R12 15570 LDR R1,[R11,#24] 15580 CMP R1,#1 15590 BEQ compd ; Computer controlled car. 15600 MOV R2,R1 15610 SWI 6 15620 CMP R1,#255 15630 ADDEQ R14,R14,R7 15640 MOV R0,R12 15650 LDR R1,[R11,#28] 15660 MOV R2,R1 15670 SWI 6 15680 CMP R1,#255 15690 SUBEQ R14,R14,R7 15700 CMP R14,#288 15710 SUBGE R14,R14,#288 15720 CMP R14,#0 15730 ADDLT R14,R14,#288 15740 STR R14,[R11,#16] 15750 MOV R14,R14,ASR#3 15760 MOV R8,R14,ASL#2 15770 LDR R7,[R11,#48] 15780 LDR R14,[R7,R8] 15790 STR R14,rft 15800 LDR R7,table 15810 ADD R8,R7,R8,ASL#1 15820 LDMIA R8,{R9-R10} 15830 MOV R0,R12 15840 LDR R1,[R11,#32] 15850 MOV R2,R1 15860 SWI 6 15870 CMP R1,#255 15880 BNE noacc 15890 ADD R5,R5,R9 15900 ADD R6,R6,R10 15910 LDR R1,[R11,#56] 15920 SUBS R1,R1,#1 15930 STRPL R1,[R11,#56] 15940 ADDPL R5,R5,R9 15950 ADDPL R6,R6,R10 15960.noacc STR R2,[R11,#84] 15970 MOV R0,R12 15980 LDR R1,[R11,#36] 15990 MOV R2,R1 16000 SWI 6 16010 CMP R1,#255 16020 MOVEQ R1,#30 16030 MULEQ R5,R1,R5 16040 MULEQ R6,R1,R6 16050 MOVEQ R5,R5,ASR#5 16060 MOVEQ R6,R6,ASR#5 16070 MOV R0,R12 16080 LDR R1,[R11,#40] 16090 MOV R2,R1 16100 SWI 6 16110 CMP R1,#255 16120 MOVNE R1,#0 16130 STRNE R1,[R11,#44] 16140 LDREQ R1,[R11,#44] 16150 CMPEQ R1,#0 16160 BEQ pfire 16170.bfire STR R5,[R11,#8] 16180 STR R6,[R11,#12] 16190.plot LDR R0,spplot 16200 LDR R1,sparea 16210 LDR R2,[R11,#72] 16220 CMP R2,#1 16230 BLT noarm 16240 SUB R2,R2,#1 16250 STR R2,[R11,#72] 16260 LDR R2,olden 16270 STR R2,[R11,#20] 16280.noarm LDR R2,rft 16290 MOV R3,R3,ASR#sh 16300 MOV R4,R4,ASR#sh 16310 MOV R5,#8 16320 MOV R6,R3 16330 MOV R7,R4 16340 SWI 46 16350 LDR R2,[R11,#96] 16360 CMP R2,#0 16370 BNE spth 16380.endspt LDR R2,[R11,#76] 16390 CMP R2,#0 16400 BEQ noshil 16410 SUB R2,R2,#1 16420 STR R2,[R11,#76] 16430 SUB R3,R3,#12 16440 SUB R4,R4,#8 16450 LDR R2,shield 16460 SWI 46 16470.noshil LDR R2,[R11,#20] 16480 CMP R2,#0 16490 BPL bodraw 16500 BL rnd 16510 MOV R8,R0 16520.explan LDR R5,[R11,#64] 16530 ADD R5,R5,#4 16540 CMP R5,#64 16550 MOVEQ R5,#0 16560 STR R5,[R11,#64] 16570 LDR R2,exspr 16580 LDR R2,[R2,R5] 16590 LDR R0,spplot 16600 LDR R1,sparea 16610 MOV R5,#8 16620 ADD R3,R3,#8 16630 ADD R4,R4,#8 16640 SWI 46 16650 CMP R8,#4 16660 MOVLT R5,#112 16670 BLLT sound2 16680 LDR R5,[R11,#68] 16690 SUBS R5,R5,#1 16700 STR R5,[R11,#68] 16710 BMI endgam 16720 LDR R0,bitflg 16730 SUBS R0,R0,#1 16740 LDRMI R9,left 16750 MOVMI R0,#100 16760 STR R0,bitflg 16770 BLMI crbits 16780 ADR R14,bodraw 16790 B carex 16800.bitflg EQUD 0 16810.bodraw LDR R10,bonscr 16820 CMP R10,#0 16830 BEQ noexbo 16840 LDR R10,maxbo 16850 LDR R9,bblock 16860 LDR R8,left 16870.boloop LDR R3,[R9] 16880 CMP R3,#2560 16890 BEQ endbo 16900 BL rnd 16910 CMP R0,#64 16920 BGT novani 16930 BL rnd 16940 CMP R0,#0 16950 BEQ rembo 16960.novani LDR R4,[R9,#4] 16970 LDR R2,[R9,#8] 16980 CMP R8,#0 16990 BEQ bonpl 17000.bonret SUBS R5,R3,R6 17010 RSBMI R5,R5,#0 17020 CMP R5,#68 17030 BLT posbo 17040.endbo ADD R9,R9,#16 17050 SUBS R10,R10,#1 17060 BPL boloop 17070.noexbo LDR R6,[R11,#20] 17080 CMP R6,#1024 17090 BHI nextpl 17100 LDR R0,left 17110 RSB R0,R0,#1 17120 MOV R7,#128 17130 ADD R7,R7,R0,ASL#9 17140 SWI 256+24 17150 AND R0,R7,#255 17160 SWI "OS_WriteC" 17170 MOV R0,R7,LSR#8 17180 SWI "OS_WriteC" 17190 SWI 256+228:SWI 256+3 17200 ADD R8,R7,R6,ASL#1 17210 AND R0,R8,#255 17220 SWI "OS_WriteC" 17230 MOV R0,R8,LSR#8 17240 SWI "OS_WriteC" 17250 SWI 256+255:SWI 256+3 17260 LDR R0,spplot 17270 LDR R1,sparea 17280 LDR R2,enerbr 17290 MOV R3,R7 17300 MOV R4,#996 17310 MOV R5,#0 17320 SWI 46 17330 SWI 256+26 17340.nextpl LDR R0,left 17350 ADD R11,R11,#128 17360 SUBS R0,R0,#1 17370 BPL cars 17380 B bullet 17390.enerbr EQUD enbar% 17400.bullet LDR R0,onscr 17410 CMP R0,#0 17420 BEQ escape 17430 LDR R11,a 17440 LDR R0,maxbu 17450.bloop STR R0,left 17460 LDR R1,[R11] 17470 CMP R1,#2560 17480 BNE actual 17490.nextb ADD R11,R11,#40 17500 SUBS R0,R0,#1 17510 BPL bloop 17520 B escape 17530.lives EQUD 0 17540.slowd MOV R10,#14 17550 MOV R9,R5:MOV R14,R6 17560 MUL R9,R10,R9 17570 MUL R14,R10,R14 17580 MOV R9,R9,ASR#4 17590 MOV R14,R14,ASR#4 17600 STR R9,[R11,#28] 17610 STR R14,[R11,#32] 17620 CMP R9,#0 17630 RSBMI R9,R9,#0 17640 CMP R14,#0 17650 RSBMI R14,R14,#0 17660 CMP R9,#1<<(sh-3) 17670 CMPLT R14,#1<<(sh-3) 17680 BGE missr 17690 MOV R5,#10 17700 MOV R3,R3,ASR#sh 17710 MOV R4,R4,ASR#sh 17720 BL addex 17730 B offscr 17740.actual LDMIA R11,{R3-R4} 17750 LDR R5,[R11,#28] 17760 LDR R6,[R11,#32] 17770 LDR R14,[R11,#36] 17780 CMP R14,#6 17790 BEQ accel 17800 CMP R14,#8 17810 BEQ slowd 17820.missr ADD R3,R3,R5 17830 CMP R3,#64*j 17840 BLT offle 17850 CMP R3,#1216*j 17860 BGT offle 17870.bri ADD R4,R4,R6 17880 CMP R4,#200*j 17890 BLT offbo 17900 CMP R4,#856*j 17910 BGT offbo 17920.bto STMIA R11,{R3-R4} 17930 MOV R10,#pl ; Collision detection 17940 LDR R9,block 17950.cloop LDR R5,[R9] 17960 ADD R5,R5,#48*j 17970 SUBS R5,R5,R3 17980 RSBMI R5,R5,#0 17990 CMP R5,#48*j 18000 BLT hit 18010.miss ADD R9,R9,#128 18020 SUBS R10,R10,#1 18030 BPL cloop 18040 LDR R10,barr ; Collision detection; Objects 18050 LDR R9,bartab 18060.bulbar LDR R5,[R9] 18070 SUB R5,R5,#44*j 18080 SUBS R5,R5,R3 18090 RSBMI R5,R5,#0 18100 CMP R5,#36*j 18110 BLT hitbar 18120.misbar ADD R9,R9,#12 18130 SUBS R10,R10,#1 18140 BPL bulbar 18150 LDR R0,spplot 18160 LDR R1,sparea 18170 LDR R2,[R11,#8] 18180 MOV R3,R3,ASR#sh 18190 MOV R4,R4,ASR#sh 18200 MOV R5,#0 18210 SWI 46 18220 LDR R0,left 18230 B nextb 18240.offscr MOV R0,#2560 18250 STR R0,[R11] 18260 LDR R1,onscr 18270 SUB R1,R1,#1 18280 STR R1,onscr 18290 LDR R0,left 18300 B nextb 18310.hit LDR R5,[R9,#4] 18320 ADD R5,R5,#32*j 18330 SUBS R5,R5,R4 18340 RSBMI R5,R5,#0 18350 CMP R5,#38*j 18360 BGT miss 18370 MOV R7,#96 18380 BL sound 18390 LDR R7,[R9,#8] 18400 LDR R8,[R9,#12] 18410 LDR R5,[R11,#28] 18420 LDR R6,[R11,#32] 18430 ADD R7,R7,R5,ASR#2 18440 ADD R8,R8,R6,ASR#2 18450 STR R7,[R9,#8] 18460 STR R8,[R9,#12] 18470 LDR R7,[R9,#20] 18480 LDR R8,[R11,#36] 18490 LDR R5,[R9,#76] 18500 CMP R5,#0 18510 BLE dontb 18520 LDR R5,[R11,#28] 18530 RSB R5,R5,#0 18540 STR R5,[R11,#28] 18550 LDR R5,[R11,#32] 18560 RSB R5,R5,#0 18570 STR R5,[R11,#32] 18580 B miss 18590.grabsc LDR R0,score 18600 MOV PC,R14 18610.grabli LDR R0,lives 18620 MOV PC,R14 18630.score EQUD 0 18640.dontb LDR R5,damage 18650 LDR R5,[R5,R8,ASL#3] 18660 SUB R7,R7,R5 18670 STR R7,[R9,#20] 18680 LDR R7,block 18690 CMP R7,R9 18700 BEQ noes 18710 LDR R7,score 18720 ADD R7,R5,R7 18730 STR R7,score 18740.noes MOV R3,R3,ASR#sh 18750 MOV R4,R4,ASR#sh 18760 CMP R8,#6 18770 CMPNE R8,#8 18780 MOVEQ R5,#10 18790 BLEQ addex 18800 CMP R8,#1 18810 BNE offscr 18820 LDR R7,[R9,#16] 18830 ADD R7,R7,#16 18840 CMP R7,#288 18850 SUBGE R7,R7,#288 18860 STR R7,[R9,#16] 18870 B offscr 18880.pfire MOV R8,#0 18890 LDR R7,[R11,#100] 18900 CMP R7,#0 18910 MOVGT R8,#10 18920 LDR R7,[R11,#92] 18930 CMP R7,#0 18940 MOVGT R8,#3 18950 STR R8,sbutp 18960 MOV R7,#1 18970 STR R7,[R11,#44] 18980.preptf LDR R7,onscr 18990 LDR R8,maxbu 19000 CMP R7,R8 19010 BEQ bfire 19020 ADD R7,R7,#1 19030 STR R7,onscr 19040 LDR R10,a 19050.finds LDR R8,[R10] 19060 CMP R8,#2560 19070 BEQ founds 19080 ADD R10,R10,#40 19090 B finds 19100.maxbo EQUD 2 19110.bonscr EQUD 0 19120.sbutp EQUD 0 19130.founds LDR R7,[R11,#60] 19140 SUBS R7,R7,#1 19150 STRPL R7,[R11,#60] 19160 MOVPL R7,#0 19170 STRPL R7,[R11,#44] 19180 ADD R8,R3,#34*j 19190 ADD R9,R4,#34*j 19200 STR R8,[R10] 19210 STR R9,[R10,#4] 19220 LDR R8,[R11,#88] 19230 CMP R8,#0 19240 BEQ ammol 19250 LDR R7,[R11,#52] 19260 SUBS R7,R7,#1 19270 STR R7,[R11,#52] 19280 MOVEQ R8,#0 19290 STREQ R8,[R11,#88] 19300.ammol STR R8,[R10,#36] 19310 LDR R7,damage 19320 ADD R7,R7,#4 19330 LDR R7,[R7,R8,ASL#3] 19340 BL sound 19350 LDR R7,bspr 19360 LDR R8,[R7,R8,ASL#2] 19370 STR R8,[R10,#8] 19380 LDR R8,[R11,#16] 19390 LDR R7,sbutp 19400 CMP R7,#0 19410 BNE doturn 19420.fintur MOV R8,R8,ASR#3 19430 MOV R8,R8,ASL#3 19440 LDR R7,table 19450 ADD R8,R8,R7 19460 LDMIA R8,{R7,R9} 19470 MOV R7,R7,ASL#4 19480 MOV R9,R9,ASL#4 19490 LDR R8,[R10] 19500 ADD R8,R8,R7,ASL#2 19510 STR R8,[R10] 19520 LDR R8,[R10,#4] 19530 ADD R8,R8,R9,ASL#2 19540 STR R8,[R10,#4] 19550 LDR R8,[R11,#88] 19560 CMP R8,#2 19570 CMPNE R8,#5 19580 CMPNE R8,#8 19590 MOVEQ R7,R7,ASL#1 19600 MOVEQ R9,R9,ASL#1 19610 CMP R8,#3 19620 CMPNE R8,#6 19630 MOVEQ R7,R7,ASR#1 19640 MOVEQ R9,R9,ASR#1 19650 STR R7,[R10,#28] 19660 STR R9,[R10,#32] 19670 LDR R7,sbutp 19680 CMP R7,#0 19690 BNE preptf 19700 B bfire 19710.oabar EQUD oa% 19720.bartab EQUD sob% 19730.barr EQUD 4 19740.bblock EQUD bo% 19750.escape LDR R0,totpl 19760 CMP R0,#1 19770 BNE twopl 19780 SWI 256+31:SWI 256+1:SWI 256+1:ADR R0,scstr:SWI "OS_Write0" 19790 LDR R1,wimpb 19800 LDR R0,score 19810 MOV R2,#5 19820 SWI "OS_ConvertInteger4" 19830 SWI "OS_Write0" 19840 LDR R0,blevel 19850 CMP R0,#0 19860 BNE twopl 19870 BL blrout 19880 BL rnd 19890 CMP R0,#2 19900 BLE winst 19910.twopl BL rnd 19920 CMP R0,#4 19930 BLT exbo 19940 BL rnd 19950 CMP R0,#0 19960 BEQ winst 19970.nowst LDR R0,exonsc 19980 CMP R0,#0 19990 BNE exanim 20000.getesc B switch 20010.scstr EQUS "Score: "+CHR$0 20020.winst BL rnd 20030 CMP R0,#20 20040 BGT nowst 20050 MOV R0,#0 20060 STR R0,windx 20070 STR R0,windy 20080 B nowst 20090.hitbar LDR R5,[R9,#4] 20100 SUB R5,R5,#44*j 20110 SUBS R5,R5,R4 20120 RSBMI R5,R5,#0 20130 CMP R5,#56*j 20140 BGT misbar 20150 LDR R5,[R11,#36] 20160 CMP R5,#6 20170 BNE barst 20180 STMFD R13!,{R3-R5} 20190 LDMIA R9,{R3-R4} 20200 MOV R3,R3,ASR#sh 20210 MOV R4,R4,ASR#sh 20220 SUB R3,R3,#32 20230 SUB R4,R4,#32 20240 MOV R5,#80 20250 BL addex 20260 MVN R5,#0 20270 STR R5,[R9] 20280 LDMIA R13!,{R3-R5} 20290.barst MOV R5,#96 20300 CMP R14,#5 20310 BL sound2 20320 BEQ offob 20330 B offscr 20340.spinne EQUD spinner% 20350.olden EQUD 0 20360.table EQUD ta%+280 20370.rndst EQUD RND(1000000000) 20380.onscr EQUD 0 20390.maxbu EQUD max% 20400.sparea EQUD sp% 20410.block EQUD b 20420.rft EQUD 0 20430.shield EQUD shield% 20440.spplot EQUD 546 20450.top EQUD 800*j 20460.right EQUD 1128*j 20470.left EQUD 0 20480.left2 EQUD 0 20490.bspr EQUD bbb% 20500.damage EQUD dam% 20510.a EQUD bu% 20520.windx EQUD 0 20530.windy EQUD 0 20540.store EQUD 0 20550.stor2 EQUD 0 20560.energy EQUD spare% 20570.exspr EQUD expl% 20580.bospr EQUD bonus% 20590.exblo EQUD exblock% 20600.exmax EQUD exmax% 20610.exonsc EQUD 0 20620.wimpb EQUD w% 20630.rnd SWI 66 20640 LDR R1,rndst 20650 ADD R0,R0,R1,ROR R1 20660 STR R0,rndst 20670 AND R0,R0,#255 20680 MOV PC,R14 20690.rembo MOV R5,#2560 20700 STR R5,[R9] 20710 LDR R5,bonscr 20720 SUB R5,R5,#1 20730 STR R5,bonscr 20740 B endbo 20750.exbo LDR R9,bonscr 20760 LDR R10,maxbo 20770 CMP R9,R10 20780 BEQ getesc 20790 ADD R9,R9,#1 20800 STR R9,bonscr 20810 LDR R9,bblock 20820 SUB R9,R9,#16 20830.seabo LDR R8,[R9,#16]! 20840 CMP R8,#2560 20850 BNE seabo 20860.boxran BL rnd 20870 AND R0,R0,#31 20880 CMP R0,#23 20890 BGT boxran 20900 MOV R0,R0,ASL#5 20910 ADD R8,R0,#256 20920 STR R8,[R9] 20930 BL rnd 20940 AND R0,R0,#15 20950 ADD R0,R0,R0,ASL#5 20960 ADD R8,R0,#256 20970 STR R8,[R9,#4] 20980 LDR R8,bospr 20990.getbon BL rnd 21000 AND R0,R0,#31 21010 CMP R0,#19 21020 BGT getbon 21030 LDR R8,[R8,R0,ASL#2] 21040 STR R8,[R9,#8] 21050 ADD R0,R0,#1 21060 STR R0,[R9,#12] 21070 B getesc 21080.posbo SUBS R5,R4,R7 21090 RSBMI R5,R5,#0 21100 CMP R5,#72 21110 BGT endbo 21120 LDR R5,block 21130 LDR R3,score 21140 CMP R11,R5 21150 ADDEQ R3,R3,#10 21160 STREQ R3,score 21170 MOV R5,#128 21180 BL sound2 21190 LDR R5,[R9,#12] 21200.effect LDR R3,bomapp 21210 LDR PC,[R3,R5,ASL#2] 21220.bomapp EQUD bomap% 21230.weapon LDR R3,[R11,#88] 21240 LDR R4,[R11,#52] 21250 CMP R3,R5 21260 MOVNE R4,#0 21270 ADD R4,R4,#32 21280 STR R4,[R11,#52] 21290 STR R5,[R11,#88] 21300 B rembo 21310.q20 MOV R5,#8 21320 B tensho 21330.q4 LDR R3,[R11,#20] 21340 ADD R3,R3,#20 21350 STR R3,[R11,#20] 21360 B rembo 21370.q5 LDR R3,[R11,#72] 21380 ADD R3,R3,#600 21390 STR R3,[R11,#72] 21400 B rembo 21410.q6 LDR R3,[R11,#56] 21420 ADD R3,R3,#200 21430 STR R3,[R11,#56] 21440 B rembo 21450.q8 LDR R3,[R11,#60] 21460 ADD R3,R3,#100 21470 STR R3,[R11,#60] 21480 B rembo 21490.q13 LDR R3,[R11,#76] 21500 ADD R3,R3,#300 21510 STR R3,[R11,#76] 21520 B rembo 21530.q9 LDR R3,[R11,#80] 21540 ADD R3,R3,#1 21550 STR R3,[R11,#80] 21560 B rembo 21570.q15 MOV R5,#4 21580.tensho LDR R3,[R11,#88] 21590 LDR R4,[R11,#52] 21600 CMP R3,R5 21610 MOVNE R4,#0 21620 ADD R4,R4,#18 21630 STR R4,[R11,#52] 21640 STR R5,[R11,#88] 21650 B rembo 21660.q12 MOV R5,#6 21670 B tensho 21680.q14 BL rnd 21690 SUB R0,R0,#128 21700 MOV R0,R0,ASR#2 21710 STR R0,windx 21720 BL rnd 21730 SUB R0,R0,#128 21740 MOV R0,R0,ASR#2 21750 STR R0,windy 21760 B rembo 21770.q16 MOV R5,#5 21780 B weapon 21790.q7 BL rnd 21800 SUB R0,R0,#128 21810 LDR R4,[R11,#8] 21820 ADD R4,R4,R0 21830 STR R4,[R11,#8] 21840 BL rnd 21850 SUB R0,R0,#128 21860 LDR R4,[R11,#12] 21870 ADD R4,R4,R0 21880 STR R4,[R11,#12] 21890 LDMIA R9,{R3-R4} 21900 MOV R5,#60 21910 BL addex 21920 MOV R5,#112 21930 BL sound2 21940 B rembo 21950.q10 LDR R5,[R11,#92] 21960 ADD R5,R5,#60 21970 STR R5,[R11,#92] 21980 B rembo 21990.q17 LDR R5,[R11,#100] 22000 ADD R5,R5,#60 22010 STR R5,[R11,#100] 22020 B rembo 22030.q11 STR R5,[R11,#96] 22040 B rembo 22050.q18 STMFD R13!,{R0-R1} 22060.q18r BL rnd 22070 AND R5,R0,#31 22080 CMP R5,#20 22090 BGT q18r 22100 LDMIA R13!,{R0-R1} 22110 B effect 22120.q19 LDR R3,score 22130 ADD R3,R3,#90 22140 STR R3,score 22150 B rembo 22160.newr BL rnd 22170 MOV R0,R0,ASR#3 22180 CMP R0,#17 22190 BHI newr 22200 MOV R5,R0 22210 LDMIA R13!,{R0-R1} 22220 B effect 22230.addex STMFD R13!,{R0-R1,R14} 22240 LDR R0,exonsc 22250 LDR R1,exmax 22260 CMP R1,R0 22270 LDMEQFD R13!,{R0-R1,PC}^ 22280 ADD R0,R0,#1 22290 STR R0,exonsc 22300 LDR R0,exblo 22310 SUB R0,R0,#12 22320.exsear LDR R1,[R0,#12]! 22330 CMP R1,#2560 22340 BNE exsear 22350 STMIA R0,{R3-R5} 22360 LDMIA R13!,{R0-R1,PC}^ 22370.exend SUBS R10,R10,#1 22380 BPL exloop 22390 B getesc 22400.exgo MOV R6,#2560 22410 STR R6,[R11,#-12] 22420 LDR R6,exonsc 22430 SUB R6,R6,#1 22440 STR R6,exonsc 22450.exanim LDR R11,exblo 22460 LDR R10,exmax 22470 LDR R2,exspr 22480 BL rnd 22490 MOV R0,R0,ASR#6 22500 LDR R2,[R2,R0,ASL#2] 22510 MOV R5,#8 22520.exloop LDMIA R11!,{R3,R4,R6} 22530 CMP R3,#2560 22540 BEQ exend 22550 SUBS R6,R6,#1 22560 STR R6,[R11,#-4] 22570 BMI exgo 22580 BL rnd 22590 SUB R0,R0,#128 22600 ADD R3,R3,R0,ASR#2 22610 BL rnd 22620 SUB R0,R0,#128 22630 ADD R4,R4,R0,ASR#2 22640 BL plex 22650 BL rnd 22660 SUB R0,R0,#128 22670 ADD R3,R3,R0,ASR#2 22680 BL rnd 22690 SUB R0,R0,#128 22700 ADD R4,R4,R0,ASR#2 22710 BL plex 22720 B exend 22730.endgam MOV R0,#0 22740 STR R0,bitflg 22750 MOV R0,#112 22760 MOV R1,#1 22770 SWI 6 22780 MOV R0,#113 22790 MOV R1,#1 22800 SWI 6 22810 MOV R1,#80 22820 BL wait 22830 B losel 22840.offle CMP R14,#5 22850 BNE offscr 22860 STMFD R13!,{R0-R1} 22870 BL rnd 22880 CMP R0,#10 22890 LDMIA R13!,{R0-R1} 22900 BLT offscr 22910 RSB R5,R5,#0 22920 STR R5,[R11,#28] 22930 B bri 22940.offbo CMP R14,#5 22950 BNE offscr 22960 STMFD R13!,{R0-R1} 22970 BL rnd 22980 CMP R0,#10 22990 LDMIA R13!,{R0-R1} 23000 BLT offscr 23010 RSB R6,R6,#0 23020 STR R6,[R11,#32] 23030 B bto 23040.offob STMFD R13!,{R0-R1} 23050 BL rnd 23060 CMP R0,#10 23070 LDMIA R13!,{R0-R1} 23080 BLT offscr 23090 LDR R5,[R11,#28] 23100 LDR R6,[R11,#32] 23110 RSB R5,R5,#0 23120 RSB R6,R6,#0 23130 STR R5,[R11,#28] 23140 STR R6,[R11,#32] 23150 B misbar 23160.accel MOV R14,#68 23170 MUL R5,R14,R5 23180 MUL R6,R14,R6 23190 MOV R5,R5,ASR#6 23200 MOV R6,R6,ASR#6 23210 STR R5,[R11,#28] 23220 STR R6,[R11,#32] 23230 B missr 23240.spth STMFD R13!,{R0-R7} 23250 LDR R6,table 23260 MOV R7,R2 23270 LDR R2,spinne 23280 ADD R7,R7,#10 23290 CMP R7,#288 23300 MOVGE R7,#1 23310 STR R7,[R11,#96] 23320 MOV R7,R7,ASR#3 23330 ADD R7,R6,R7,ASL#3 23340 LDMIA R7,{R6-R7} 23350 ADD R3,R3,R6 23360 ADD R4,R4,R7 23370 SWI 46 23380 MOV R3,R3,ASL#sh 23390 MOV R4,R4,ASL#sh 23400 MOV R2,#pl 23410 LDR R5,block 23420.quickh LDR R6,left 23430 CMP R2,R6 23440 BEQ notoop 23450 LDR R6,[R5] 23460 SUBS R6,R6,R3 23470 RSBMI R6,R6,#0 23480 CMP R6,#80*j 23490 BGT notoop 23500 LDR R6,[R5,#4] 23510 SUBS R6,R6,R4 23520 RSBMI R6,R6,#0 23530 CMP R6,#80*j 23540 BGT notoop 23550 LDR R6,[R5,#20] 23560 SUB R6,R6,#1 23570 STR R6,[R5,#20] 23580 MOV R5,#8 23590 MOV R3,R3,ASR#sh 23600 MOV R4,R4,ASR#sh 23610 STMFD R13!,{R2} 23620 LDR R0,spplot 23630 LDR R1,sparea 23640 LDR R2,exspr 23650 LDR R2,[R2,#4] 23660 SWI 46 23670 LDMIA R13!,{R2} 23680 MOV R5,#0 23690 BL sound2 23700 BL rnd 23710 CMP R0,#3 23720 MOVLT R0,#0 23730 STRLT R0,[R11,#96] 23740.notoop ADD R5,R5,#128 23750 SUBS R2,R2,#1 23760 BPL quickh 23770 LDMIA R13!,{R0-R7} 23780 B endspt 23790.retlev LDR R0,dlevel 23800 MOV PC,R14 23810.placer STR R0,dlevel 23820 MOV PC,R14 23830.dlevel EQUD 0 23840.task EQUD &4B534154 23850.temp EQUD temp% 23860.name EQUS "Cars"+CHR$0:ALIGN 23870.icond EQUD -1:EQUD 0:EQUD 0:EQUD 74:EQUD 68:EQUD &3002:EQUS "!Cars"+CHR$0 23880 EQUB 0:EQUD 0 23890.templ EQUS "<Obey$Dir>.Templates"+CHR$0:ALIGN 23900.tempw EQUS "Info"+CHR$0:ALIGN 23910.tempw2 EQUS "Bonus"+CHR$0:ALIGN 23920.oldst EQUD 0 23930.taskh EQUD 0 23940.deskt MOV R0,#200 23950 LDR R1,task 23960 ADR R2,name 23970 SWI "Wimp_Initialise" 23980 STR R1,taskh 23990 ADR R1,templ 24000 SWI "Wimp_OpenTemplate" 24010 LDR R1,wimpb 24020 LDR R2,temp 24030 ADD R3,R2,#2048 24040 MOV R8,R3 24050 MVN R4,#0 24060 ADR R5,tempw2 24070 MOV R6,#0 24080 SWI "Wimp_LoadTemplate" 24090 MOV R9,R2 24100 LDR R1,wimpb 24110 LDR R0,sparea 24120 STR R0,[R1,#64] 24130 SWI "Wimp_CreateWindow" 24140 STR R0,bonw% 24150 LDR R1,wimpb 24160 LDR R1,wimpb 24170 MOV R2,R9 24180 MOV R3,R8 24190 MVN R4,#0 24200 ADR R5,tempw 24210 MOV R6,#0 24220 SWI "Wimp_LoadTemplate" 24230 LDR R1,wimpb 24240 LDR R0,sparea 24250 STR R0,[R1,#64] 24260 SWI "Wimp_CreateWindow" 24270 STR R0,infow% 24280 LDR R1,wimpb 24290 STR R0,[R1] 24300.ctempl SWI "Wimp_CloseTemplate" 24310 ADR R1,icond 24320 SWI "Wimp_CreateIcon" 24330 LDR R1,deskpl 24340 SWI "Wimp_ReadPalette" 24350.polll MOV R0,#1 24360 LDR R1,wimpb 24370 SWI "Wimp_Poll" 24380 CMP R0,#2:SWIEQ "Wimp_OpenWindow" 24390 CMP R0,#3:SWIEQ "Wimp_CloseWindow" 24400 CMP R0,#17:CMPNE R0,#18:BEQ receiv 24410 CMP R0,#9:BEQ menus 24420 CMP R0,#6:BNE polll 24430 LDR R2,[R1,#12] 24440 CMN R2,#2 24450 BNE polll 24460 LDR R2,[R1,#8] 24470 CMP R2,#2 24480 BEQ menu 24490.icbnc SWI "XOS_Mouse" 24500 CMP R2,#0:BNE icbnc 24510 MVN R0,#0 24520 MVN R1,#0 24530 SWI "Wimp_SetCaretPosition" 24540 MOV R0,#135 24550 SWI 6 24560 STR R2,deskmd 24570 SWI 256+22:SWI 256+9 24580 LDR R1,deskpl 24590 SWI "Wimp_ReadPalette" 24600 LDR R1,palete 24610 SWI "Wimp_SetPalette" 24620 SWI 256+18:SWI 256+0:SWI 256+11 24630 SWI "OS_RemoveCursors" 24640 STR R13,oldst 24650 LDR R13,stack 24660 LDR R14,getbtg 24670 MOV PC,R14 ; Retrieve game PC 24680.rettw STR R13,stack 24690 LDR R13,oldst 24700 STR R14,getbtg 24710 MOV R0,#21 24720 MOV R1,#0 24730 SWI 6 24740 LDR R0,deskmd 24750 SWI "Wimp_SetMode" 24760 LDR R1,deskpl 24770 SWI "Wimp_SetPalette" 24780 B polll 24790.deskmd EQUD 12 24800.stack EQUD st%+1000 24810.getbtg EQUD start 24820.receiv LDR R2,[R1,#16] 24830 CMP R2,#0 24840 BEQ shutdown 24850 B polll 24860.menu LDR R2,[R1] 24870 SUB R2,R2,#64 24880 MOV R3,#96+(44*3) 24890 ADR R1,menuc 24900 SWI "Wimp_CreateMenu" 24910 B polll 24920.menus LDR R2,[R1] 24930 CMP R2,#2 24940 BEQ shutdown 24950 CMP R2,#1 24960 BNE polll 24970 LDR R0,bonw% 24980 STR R0,[R1] 24990 SWI "Wimp_GetWindowState" 25000 MVN R0,#0 25010 STR R0,[R1,#28] 25020 SWI "Wimp_OpenWindow" 25030 B polll 25040.menuc EQUS "Car Wars":EQUD 0:EQUD &70207:EQUD 160:EQUD 44:EQUD 0:EQUD 0 25050.infow% EQUD -1:EQUD &7000021:EQUS "Info":EQUD 0:EQUD 0:EQUD 0 25060.bonw% EQUD -1:EQUD &7000021:EQUS "Bonuses"+CHR$0:EQUD 0 25070 EQUD &80:EQUD -1:EQUD &7000021:EQUS "Quit":EQUD 0:EQUD 0 25080.pwind EQUD 0 25090.palete EQUD pal% 25100.deskpl EQUD p2% 25110.failsave 25120 MOV R1,#1 25130 ADR R2,menuc 25140 SWI "Wimp_ReportError" 25150 ADR R0,hitabe 25160 MOV R1,#19 25170 ADR R2,menuc 25180 SWI "Wimp_ReportError" 25190 CMP R1,#2 25200 BEQ remmod 25210.shutdown 25220 SWI "XWimp_CloseDown" 25230 MOV R0,#10 25240 ADR R1,hitabp 25250 MOV R2,#&1000:SUB R2,R2,#1 25260 MOV R3,#0 25270 LDR R4,hitabs 25280 ADD R5,R4,#160 25290 SWI "XOS_File" 25300.remmod BVS failsave 25310 ADR R0,mod1 25320 SWI "OS_CLI" 25330 ADR R0,mod2 25340 SWI "OS_CLI" 25350 ADR R0,mod3 25360 SWI "OS_CLI" 25370 ADR R0,mod4 25380 SWI "OS_CLI" 25390 ADR R0,mod5 25400 SWI "OS_CLI" 25410 B polll 25420.hitabs EQUD hi% 25430.hitabp EQUS "<Car$Dir>.HiScores"+CHR$0:ALIGN 25440.hitabe EQUS " Could not save hiscore table. Try again?"+CHR$0:ALIGN 25450.mod1 EQUS "RMKill Explosion"+CHR$0:ALIGN 25460.mod2 EQUS "RMKill Layer"+CHR$0:ALIGN 25470.mod3 EQUS "RMKill Rotate"+CHR$0:ALIGN 25480.mod4 EQUS "RMKill Sides"+CHR$0:ALIGN 25490.mod5 EQUS "ChannelVoice 1 1"+CHR$0:ALIGN 25500.compd LDR R2,table ; Returned in R12 - each bit 25510 MOV R14,R14,ASR#3 ; 0 - left 1 - right 2 - accel 25520 MOV R8,R14,ASL#2 ; 3 - brake 4 - fire 25530 LDR R0,[R11,#48] 25540 LDR R1,[R0,R8] 25550 STR R1,rft 25560 ADD R8,R2,R8,ASL#1 25570 STR R8,orpos 25580 LDMIA R8,{R9-R10} 25590 STMFD R13!,{R5-R6} 25600 CMP R5,#0 25610 RSBMI R5,R5,#0 25620 CMP R6,#0 25630 RSBMI R6,R6,#0 25640 CMP R5,R6 25650 MOVGT R2,R5 25660 MOVLE R2,R6 25670 MOV R2,R2,ASR#8 25680 CMP R2,#7 25690 MOVLT R2,#7 25700 LDMIA R13!,{R5-R6} 25710 LDR R0,[R11,#20] 25720 CMP R0,#0 25730 BMI bfire 25740 B detect ; Returns 0-nothing 9-left 10-right 25750.compc TST R12,#%10000 25760 BNE noaccc 25770 LDR R0,[R11,#124] 25780 CMP R0,#0 25790 BNE noaccc 25800 TST R12,#%100 25810 ADDNE R5,R5,R9 25820 ADDNE R6,R6,R10 25830.noaccc TST R12,#%1000 25840 MOVNE R1,#30 25850 MULNE R5,R1,R5 25860 MULNE R6,R1,R6 25870 MOVNE R5,R5,ASR#5 25880 MOVNE R6,R6,ASR#5 25890 LDR R0,dlevel 25900 ADD R0,R0,#3 25910 CMP R0,#6 25920 MOVGT R0,#6 25930 LDR R14,[R11,#16] 25940 TST R12,#%1 25950 SUBNE R14,R14,R0 25960 TST R12,#%10 25970 ADDNE R14,R14,R0 25980 CMP R14,#288 25990 SUBGE R14,R14,#288 26000 CMP R14,#0 26010 ADDLT R14,R14,#288 26020 STR R14,[R11,#16] 26030 BL rnd 26040 CMP R0,#192 26050 BGT noach 26060 BL rnd 26070 CMP R0,#1 26080 BNE noach 26090 BL rnd 26100 MOV R1,#1 26110 CMP R0,#160 ; Decide next target 1-car 2-bonus 26120 BGT decidb 26130 STR R1,[R11,#32] 26140.noach LDR R0,dlevel 26150 CMP R0,#5 26160 BEQ regen 26170 LDR R1,[R11,#88] 26180 CMP R1,#0 26190 STREQ R0,[R11,#88] 26200.tstrfr MOV R0,#0 26210 STR R0,[R11,#124] 26220 TST R12,#%10000 26230 BEQ bfire 26240 MOV R0,#1 26250 STR R0,[R11,#124] 26260 B pfire 26270.regen BL rnd 26280 CMP R0,#12 26290 BGT tstrfr 26300 LDR R0,[R11,#20] 26310 ADD R0,R0,#1 26320 STR R0,[R11,#20] 26330 B tstrfr 26340.decidb MOV R1,#2 26350 LDR R0,bonscr 26360 CMP R0,#0 26370 MOVEQ R1,#3 26380 STR R1,[R11,#32] 26390 BEQ compc ; Don't search if no bonusses 26400 STMFD R13!,{R5-R7} 26410 MOV R5,#0 ; Chosen bonus 26420 MVN R6,#0 ; Bonus distance 26430 LDR R2,bblock 26440 LDR R1,maxbo 26450.choosb LDMIA R2,{R0,R7} 26460 MOV R0,R0,ASL#sh 26470 MOV R7,R7,ASL#sh 26480 SUBS R0,R3,R0 26490 RSBMI R0,R0,#0 26500 SUBS R7,R4,R0 26510 RSBMI R7,R7,#0 26520 CMP R7,R0 26530 MOVGT R0,R7 ; R0 - Biggest distance. 26540 CMP R6,R0 26550 MOVHI R0,R6 26560 MOVHI R5,R2 26570 ADD R2,R2,#16 26580 SUBS R1,R1,#1 26590 BPL choosb 26600 CMP R5,#0 26610 BNE finebo 26620 LDMIA R13!,{R5-R7} 26630 MOV R1,#1 26640 STR R1,[R11,#32] 26650 B noach 26660.finebo STR R5,[R11,#120] 26670 LDMIA R13!,{R5-R7} 26680 B noach 26690.runawy LDR R0,block 26700 LDMIA R0,{R1-R2} 26710 RSB R1,R1,#1280*j 26720 RSB R2,R2,#1024*j 26730 B fdway 26740.fnuma EQUD 0 26750.fnumr EQUD 0 26760.enshid EQUD 0 26770.follow LDR R0,block ; R0 contains other player's stats 26780 LDR R2,[R0,#20] 26790 CMP R2,#0 26800 BLT runawy ; Don't chase if dead! 26810 LDR R2,[R0,#76] 26820 STR R2,enshid 26830 LDR R1,[R11,#32] ; What to go for? 26840 CMP R1,#3 26850 BEQ runawy 26860 CMP R1,#2 26870 BEQ sightb 26880 CMP R2,#0 26890 BEQ headcr 26900 B decidb ; If shield, choose a bonus 26910.sightb LDR R0,bblock 26920 LDMIA R0,{R1-R2} 26930 CMP R1,#2560 26940 MOVEQ R1,#1 26950 STREQ R1,[R11,#32] 26960 BEQ follow 26970 MOV R1,R1,ASL#sh 26980 MOV R2,R2,ASL#sh 26990 B fdway 27000 27010.ahed SUBS R6,R4,R2 27020 RSBMI R6,R6,#0 27030 CMP R6,#28*j 27040 BGT ntahed 27050 MOV R12,#%1000 27060 BL rnd 27070 LDR R1,dlevel 27080 ADD R1,R1,#3 27090 CMP R0,R1,ASL#3 27100 ORRLT R12,R12,#%10000 27110 LDMIA R13!,{R0-R9,R14} 27120 B compc 27130 27140.isahed STMFD R13!,{R0-R9,R14} 27150 ADD R3,R3,#40*j 27160 ADD R4,R4,#40*j 27170 ADD R0,R0,#30*j 27180 ADD R1,R1,#30*j 27190 LDR R7,orpos 27200 LDMIA R7,{R8-R9} 27210 MOV R5,#20 27220.ahedlp ADD R3,R3,R8,ASL#5 27230 ADD R4,R4,R9,ASL#5 27240 SUBS R6,R3,R1 27250 RSBMI R6,R6,#0 27260 CMP R6,#28*j 27270 BLT ahed 27280.ntahed SUBS R5,R5,#1 27290 BPL ahedlp 27300 LDMIA R13!,{R0-R9,PC}^ 27310 27320.headcr LDMIA R0,{R1-R2} ; To reach other person, turn where? 27330 BL isahed 27340.fdway STMFD R13!,{R3-R4,R7-R11} 27350 ADD R3,R3,#40*j 27360 ADD R4,R4,#40*j 27370 LDR R7,orpos 27380 LDMIA R7,{R8-R9} ; Get facing info 27390 ADD R8,R3,R8,ASL#ttt 27400 ADD R9,R4,R9,ASL#ttt ; R8 & R9 contain point ahead. 27410 SUBS R10,R8,R1 27420 RSBMI R10,R10,#0 27430 SUBS R11,R9,R2 27440 RSBMI R11,R11,#0 27450 CMP R10,R11 27460 MOVLT R10,R11 27470 STR R10,fnuma ; Store ahead range 27480 LDR R8,[R7,#trr] 27490 LDR R9,[R7,#trr+4] ; Now try right 27500 ADD R8,R3,R8,ASL#ttt 27510 ADD R9,R4,R9,ASL#ttt 27520 SUBS R10,R8,R1 27530 RSBMI R10,R10,#0 27540 SUBS R11,R9,R2 27550 RSBMI R11,R11,#0 27560 CMP R10,R11 27570 MOVLT R10,R11 27580 STR R10,fnumr 27590 LDR R8,[R7,#-trr] 27600 LDR R9,[R7,#-(trr-4)] ; Now try left 27610 ADD R8,R3,R8,ASL#ttt 27620 ADD R9,R4,R9,ASL#ttt 27630 SUBS R10,R8,R1 27640 RSBMI R10,R10,#0 27650 SUBS R11,R9,R2 27660 RSBMI R11,R11,#0 27670 CMP R10,R11 27680 MOVLT R10,R11 27690 LDR R8,fnuma 27700 LDR R9,fnumr 27710 CMP R10,R8 27720 CMPGT R9,R8 27730 BGT stra 27740 CMP R9,R10 27750 ORRGT R12,R12,#%1 27760 ORRLT R12,R12,#%10 27770 B nturna 27780.stra BL rnd 27790 LDR R1,dlevel 27800 MOV R1,R1,ASL#2 27810 ADD R1,R1,#15 27820 CMP R0,R1 27830 ORRLT R12,R12,#%10000 27840 ORR R12,R12,#%100 27850.nturna BL rnd ; Accelerate? 27860 CMP R0,#110 27870 ORRLT R12,R12,#%100 27880.ntm BL rnd 27890 LDMIA R13!,{R3-R4,R7-R11} 27900 LDR R1,[R11,#32] 27910 CMP R0,#5 27920 ORRLT R12,R12,#%10000 27930 LDR R0,enshid 27940 CMP R0,#1 27950 ANDGE R12,R12,#%01111 27960 AND R1,R12,#%11 27970 LDR R0,[R11,#40] ; Caution dir 27980 CMP R0,R1 27990 BNE compc 28000 EOR R12,R12,#%11 28010 AND R12,R12,#%10111 ; Don't turn same dir twice 28020 ORR R12,R12,#%100 28030 LDR R0,[R11,#112] 28040 SUB R0,R0,#1 28050 STR R0,[R11,#112] 28060 CMP R0,#0 28070 STREQ R0,[R11,#40] 28080 B compc 28090.detect STMFD R13!,{R3-R11} 28100 ADD R3,R3,#36*j 28110 ADD R4,R4,#36*j 28120 ADD R3,R3,R9,ASL R2 ; Number is the search range 28130 ADD R4,R4,R10,ASL R2 ; Number is the search range 28140 CMP R3,#1216*j:BGT quickt 28150 CMP R3,#64*j:BLT quickt 28160 CMP R4,#800*j:BGT quickt 28170 CMP R4,#200*j:BLT quickt 28180 LDR R11,bartab 28190 LDR R0,barr 28200.blocka LDR R6,[R11],#12 28210 CMN R6,#0 28220 BEQ nocrac 28230.crashc SUBS R6,R6,R3 28240 RSBMI R6,R6,#0 28250 CMP R6,#112*j 28260 BLT crac 28270.nocrac SUBS R0,R0,#1 28280 BPL blocka 28290 MOV R12,#0 28300 LDMIA R13!,{R3-R11} 28310 B follow ; Clear ahead - loop to target 28320.crac LDR R7,[R11,#-8] 28330 SUBS R7,R7,R4 28340 RSBMI R7,R7,#0 28350 CMP R7,#112*j 28360 BGT nocrac 28370.quickt SUB R11,R3,R9,ASL R2 ; Start point 28380 SUB R12,R4,R10,ASL R2 28390 MOV R0,#0 ; Count left turns 28400 LDR R8,orpos 28410.trylef ADD R0,R0,#1:SUB R8,R8,#8 28420 CMP R1,#35 28430 BGE finlef 28440 LDMIA R8,{R9-R10} 28450 ADD R9,R11,R9,ASL R2 28460 ADD R10,R12,R10,ASL R2 ; Is this away? 28470 CMP R9,#1216*j:BGT trylef 28480 CMP R9,#64*j:BLT trylef 28490 CMP R10,#800*j:BGT trylef 28500 CMP R10,#200*j:BLT trylef 28510 LDR R3,barr 28520 LDR R4,bartab 28530.quiblo LDR R5,[R4],#12 28540 SUBS R5,R9,R5 28550 RSBMI R5,R9,#0 28560 CMP R5,#128*j 28570 BGT notqbl 28580 LDR R5,[R4,#-8] 28590 SUBS R5,R10,R5 28600 RSBMI R5,R10,#0 28610 CMP R5,#128*j 28620 BLT trylef ; Hit, so turn more. 28630.notqbl SUBS R3,R3,#1 28640 BPL quiblo ; Any more left? 28650.finlef LDR R8,orpos 28660 MOV R1,#0 28670.tryrig ADD R1,R1,#1 28680 CMP R1,#35 28690 BGE finrig 28700 ADD R8,R8,#8 28710 LDMIA R8,{R9-R10} 28720 ADD R9,R11,R9,ASL R2 28730 ADD R10,R12,R10,ASL R2 ; Is this away? (right) 28740 CMP R9,#1216*j:BGT tryrig 28750 CMP R9,#64*j:BLT tryrig 28760 CMP R10,#800*j:BGT tryrig 28770 CMP R10,#200*j:BLT tryrig 28780 LDR R3,barr 28790 LDR R4,bartab 28800.quiblr LDR R5,[R4],#12 28810 SUBS R5,R9,R5 28820 RSBMI R5,R9,#0 28830 CMP R5,#128*j 28840 BGT notqbr 28850 LDR R5,[R4,#-8] 28860 SUBS R5,R10,R5 28870 RSBMI R5,R10,#0 28880 CMP R5,#128*j 28890 BLT tryrig ; Hit, so turn more. 28900.notqbr SUBS R3,R3,#1 28910 BPL quiblr ; Any more left? 28920.finrig LDMIA R13!,{R3-R11} 28930 SUBS R12,R0,R1 28940 RSBMI R12,R12,#0 28950 CMP R12,#4 ; Is little difference? 28960 BLT ignorb 28970.avoido CMP R0,R1 ; Which is quicker? 28980 MOV R12,#10 28990 MOVLT R12,#9 29000 LDREQ R12,[R11,#28] 29010 STR R12,[R11,#28] 29020 MOV R0,#11 29030 SUB R0,R0,R12 29040 STR R0,[R11,#40] ; Store direction (no turn) 29050 MOV R0,#7 29060 STR R0,[R11,#112] ; Count 29070 B compc 29080.wait SWI 66 29090 ADD R1,R0,R1 29100.waitl SWI 66 29110 CMP R0,R1 29120 BLT waitl 29130 MOV PC,R14 29140.orpos EQUD 0 29150.ignorb LDR R0,[R11,#32] 29160 CMP R0,#1 29170 BNE avoido 29180 B follow 29190]:NEXT:P%=expl%:[ OPT 2 29200 EQUD ex%(0):EQUD ex%(0):EQUD ex%(1):EQUD ex%(1):EQUD ex%(2) 29210 EQUD ex%(2):EQUD ex%(3):EQUD ex%(3):EQUD ex%(4):EQUD ex%(4) 29220 EQUD ex%(5):EQUD ex%(5):EQUD ex%(6):EQUD ex%(6):EQUD ex%(7) 29230 EQUD ex%(7) 29240]:P%=bonus%:[ OPT 2 29250 EQUD ba%(1):EQUD ba%(2):EQUD ba%(3):EQUD ba%(4):EQUD ba%(5) 29260 EQUD ba%(6):EQUD ba%(7):EQUD ba%(8):EQUD ba%(9):EQUD ba%(10) 29270 EQUD ba%(11):EQUD ba%(12):EQUD ba%(13):EQUD ba%(14):EQUD ba%(15) 29280 EQUD ba%(16):EQUD ba%(17):EQUD ba%(18):EQUD ba%(19):EQUD ba%(20) 29290]:P%=bbb%:[ OPT 2 29300 EQUD b%(1):EQUD b%(2):EQUD b%(3):EQUD b%(4) 29310 EQUD b%(5):EQUD b%(6):EQUD b%(7):EQUD b%(8):EQUD b%(9) 29320]:P%=bomap%:[ OPT 2 29330 EQUD weapon:EQUD weapon:EQUD weapon:EQUD weapon:EQUD q4:EQUD q5 29340 EQUD q6:EQUD q7:EQUD q8:EQUD q9:EQUD q10:EQUD q11:EQUD q12:EQUD q13 29350 EQUD q14:EQUD q15:EQUD q16:EQUD q17:EQUD q18:EQUD q19:EQUD q20 29360]:P%=sound%:[ OPT 2 29370EQUD 4:EQUD -15:EQUD 10:EQUD 0 ;bounce 0 29380EQUD 2:EQUD -12:EQUD 3500:EQUD 0 ;fire 0 16 29390EQUD 2:EQUD -12:EQUD 4000:EQUD 0 ;fire 1 32 29400EQUD 2:EQUD -12:EQUD 4500:EQUD 0 ;fire 2 48 29410EQUD 2:EQUD -12:EQUD 2500:EQUD 0 ;fire 3 64 29420EQUD 4:EQUD -15:EQUD 1:EQUD 0 ;collide 80 29430EQUD 4:EQUD -13:EQUD 5:EQUD 0 ;hit by bullet 96 29440EQUD 1:EQUD -15:EQUD 2000:EQUD 0 ;collect explosives 112 29450EQUD 3:EQUD -15:EQUD 1500:EQUD 0 ;collect bonus 128 29460EQUD 2:EQUD -12:EQUD 5000:EQUD 0 ;fire 4 144 29470EQUD 2:EQUD -12:EQUD 7000:EQUD 0 ;fire 5 160 29480]:P%=dam%:[ OPT 2 29490EQUD 1:EQUD 16:EQUD 2:EQUD 32:EQUD 3:EQUD 48:EQUD 4:EQUD 64 29500EQUD 6:EQUD 144:EQUD 3:EQUD 160:EQUD 7:EQUD 144:EQUD 10:EQUD 16 29510EQUD 8:EQUD 32 29520]:P%=btsp%:[ OPT 2 29530EQUD tyre%:EQUD bitad%(0):EQUD bitad%(1):EQUD bitad%(2):EQUD bitad%(3) 29540EQUD bitad%(4):EQUD bitad%(5):EQUD bitad%(6):EQUD bitad%(7) 29550]:P%=dm3%:[ OPT 2 29560EQUD ba%(1):EQUS "Spinner "+CHR$0:EQUD ba%(2):EQUS "Fast Bullets "+CHR$0 29570EQUD ba%(3):EQUS "Mines "+CHR$0:EQUD ba%(12):EQUS "Rockets "+CHR$0 29580EQUD ba%(15):EQUS "Large Mines "+CHR$0:EQUD ba%(16):EQUS "Bounce Bombs "+CHR$0 29590EQUD ba%(7):EQUS "Booby Trap "+CHR$0:EQUD ba%(8):EQUS "Rapid Fire "+CHR$0 29600EQUD ba%(9):EQUS "Quick Turning "+CHR$0:EQUD ba%(10):EQUS "Three Way Fire "+CHR$0 29610EQUD ba%(11):EQUS "Spinning Thing "+CHR$0:EQUD ba%(4):EQUS "Extra Energy "+CHR$0 29620EQUD ba%(13):EQUS "Bullet Shield "+CHR$0:EQUD ba%(14):EQUS "Storm "+CHR$0 29630EQUD ba%(5):EQUS "Armour "+CHR$0:EQUD ba%(6):EQUS "Speed Up "+CHR$0 29640EQUD ba%(17):EQUS "Back Fire "+CHR$0:EQUD ba%(18):EQUS "Random Bonus "+CHR$0 29650EQUD ba%(19):EQUS "100 Points "+CHR$0:EQUD ba%(20):EQUS "Massive Bombs "+CHR$0:] 29660DATA 400*j,480*j,0,0,216,200,-66,-82,-52,-51,-36,0,st1,0,0,0,0 29670DATA 200,0,0,3,0,0,0,0,0,0,0,0 29680DATA 848*j,480*j,0,0,216,200,-108,-125,-27,-109,-59,0,st2,0,0,0,0 29690DATA 200,0,0,3,0,0,0,0,0,0,0,0 29700ttt%=ta%:FOR i=-350 TO 700 STEP 10 29710ta%!0=COSRAD(i)*j:ta%!4=SINRAD(i)*j 29720ta%+=8:NEXT:!ttt%=2048:ttt%!4=2048:!ta%=2048:ta%!4=2048 29730st1=sp1%:st2=sp2%:FORi=0TO35 29740SYS46,280,sp%,"n"+STR$i TO ,,!sp1% 29750SYS46,280,sp%,"m"+STR$i TO ,,!sp2% 29760sp1%+=4:sp2%+=4:NEXT 29770FORk=0TO1:FORi=0TO112STEP4:READ stdat!(i+k*128):NEXT:NEXT 29780FORi=0TO!maxbu:bu%!(i*40)=2560:NEXT 29790FORi=0TO!maxbo:bo%!(i*16)=2560:NEXT 29800FORi=0TO!exmax:exblock%!(i*12)=2560:NEXT 29810SYS8,255,"<Obey$Dir>.HiScores",hi% 29820hi%!160=&3FFFFFFF:ON ERROR PROCerror 29830CALL deskt:END 29840 29850DEF PROCerror 29860ON ERROR PRINTREPORT$;" at line "ERL:END 29870SYS"Wimp_SetPalette",,p2%:SYS6,112,1:SYS6,113,1 29880SYS&400DF," "+REPORT$+" at line "+STR$ERL,1,"Car Wars" 29890j=INSTR(REPORT$,"&"):IF j=0 END 29900X=OPENUP("<Car$Dir>.ErrorFile"):r$=REPORT$+" Code start &"+(STR$~m%)+CHR$10 29910PTR#X=EXT#X:FORi=1TOLEN r$:BPUT#X,ASC(MID$(r$,i,1)):NEXT:CLOSE #X 29920SYS"Wimp_SetMode",12:VDU4:SYS6,229,0:SYS6,200,0 29930a$="":j+=1:WHILE MID$(r$,j,1)<>" " a$+=MID$(r$,j,1):j+=1:ENDWHILE 29940a=EVAL ("&"+a$)-128:PROCshow:END 29950 29960DEF PROCshow 29970COLOUR132:COLOUR7:REPEAT 29980PRINTREPORT$'':*ShowRegs 29990PRINT:SYS5,"MemoryI "+STR$~a+" "+STR$~(a+256):PRINT'~!dump'~!dump2:UNTIL 0 30000ENDPROC
� >!RunImage #� Written By Ben Mansell ��1993 8� � È™&400DF," "+�$+" at line "+Þ,1,"Car Wars":� (;È 4:A=�(-�):max%=20:exmax%=3:pl=1:scanr=7:ttt=4:trr=24 2*È™8,5,"<Obey$Dir>.NewCars" � ,,,,slen% <N� m% 14800,sp% slen%+1024,ta% 1000,b 512,sp1% 192,sp2% 192,bu% (max%+1)*40 FM� ob% 1024,oa% 32,ex%(7),bo% 1024,ba%(20),expl% 128,bonus% 128,spare% 100 PM� sound% 1024,dam% 128,stdat 512,exblock% 512,bbb% 128,w% 2048,temp% 2048 ZJ� st% 1024,pal% 128,scrme 4096,p2% 128,p3% 128,hi% 200,num% 50,bt% 512 dA� bomap% 128,dm3% 400,back% 45000,btsp% 64,bitad%(7),asc% 256 n=sob%=ob%:!sp%=slen%+1024:j=128:sh=7:� b%(10):!back%=45000 x&È™8,255,"<Obey$Dir>.NewCars",sp%+4 �&È™8,255,"<Obey$Dir>.!Palette",pal% �)È™8,255,"<Obey$Dir>.Backdrop",back%+4 �(È™8,255,"<Obey$Dir>.ASCIItable",asc% �2�i%=1�9:È™46,280,sp%,"bullet"+�i% � ,,b%(i%):� �4�i%=0�7:È™46,280,sp%,"explode"+�i% � ,,ex%(i%):� �3�i%=1�20:È™46,280,sp%,"bonus"+�i% � ,,ba%(i%):� �7�i%=0�3:È™46,280,sp%,"barrier"+�i% � ,,oa%!(i%*4):� �.�i%=0�9:È™46,280,sp%,�i% � ,,num%!(i%*4):� �2�i%=0�3:È™46,280,sp%,"bitm"+�i% � ,,bitad%(i%) �.È™46,280,sp%,"bitn"+�i% � ,,bitad%(i%+4):� �#È™46,280,sp%,"title" � ,,title% �%È™46,280,sp%,"shield" � ,,shield% �'È™46,280,sp%,"spinner" � ,,spinner% %È™46,280,sp%,"writer" � ,,writer% 'È™46,280,sp%,"archworld" � ,,archw% %È™46,280,sp%,"complete" � ,,comp% "&È™46,280,sp%,"gameover" � ,,gover% ,#È™46,280,sp%,"level" � ,,level% 6#È™46,280,sp%,"lives" � ,,lives% @'È™46,280,sp%,"energybar" � ,,enbar% J"È™46,280,sp%,"bonus" � ,,enbo% T!È™46,280,sp%,"time" � ,,time% ^#È™46,280,sp%,"blevt" � ,,blevt% h)È™46,280,sp%,"congrats" � ,,congrats% r!È™46,280,sp%,"tyre" � ,,tyre% |!È™46,280,sp%,"opt1" � ,,opt1% �!È™46,280,sp%,"opt2" � ,,opt2% �!È™46,280,sp%,"opt3" � ,,opt3% �%È™46,280,sp%,"keyleft" � ,,kleft% �'È™46,280,sp%,"keyright" � ,,kright% �!È™46,280,sp%,"keyup" � ,,kup% �%È™46,280,sp%,"keydown" � ,,kdown% �%È™46,280,sp%,"keyfire" � ,,kfire% �&È™46,280,sp%,"gamemode" � ,,gamem% �&È™46,280,sp%,"twogame" � ,,gamem2% �&È™46,280,sp%,"onegame" � ,,gamem1% �)È™46,280,sp%,"gameplayer" � ,,gamepl% �(È™46,280,sp%,"optselect" � ,,optsel% �+È™46,280,sp%,"questionmark" � ,,questm% )È™46,280,back%,"backdrop" � ,,backsp% � pass%=0 � 2 � 2 P%=m%:[ OPT pass% &.blackp MOV R0,#19 0 LDR R1,fadeb2 : MOV R2,#0 D.fillbp STR R2,[R1],#4 N SUBS R0,R0,#1 X BPL fillbp b LDR R1,fadeb2 l! SWI "Wimp_SetPalette" v MOV PC,R14 �.fadeb2 EQUD p3% �.fadep2 EQUD pal% �".fade2 STMFD R13!,{R0-R6,R14} � MOV R5,#255 �.fadem3 MOV R6,#19 � LDR R3,fadeb2 � LDR R4,fadep2 �.fadem MOV R0,#0 � STRB R0,[R3],#1 � ADD R4,R4,#1 � MOV R1,#2 �.fadem2 LDRB R0,[R4],#1 � ADD R0,R0,R5 CMP R0,#255 MOVGT R0,#255 STRB R0,[R3],#1 SUBS R1,R1,#1 * BPL fadem2 4 SUBS R6,R6,#1 > BPL fadem H LDR R1,fadeb2 R! SWI "Wimp_SetPalette" \ MOV R0,#19 f SWI "OS_Byte" p SUBS R5,R5,R9 z BPL fadem3 � LDR R1,fadep2 �! SWI "Wimp_SetPalette" �" LDMIA R13!,{R0-R6,PC}^ � �".fade3 STMFD R13!,{R0-R6,R14} � MOV R5,#255 �.faden3 MOV R6,#19 � LDR R3,fadeb2 � LDR R4,fadep2 �.faden MOV R0,#0 � STRB R0,[R3],#1 � ADD R4,R4,#1 � MOV R1,#2 .faden2 LDRB R0,[R4],#1 SUBS R0,R0,R5 MOVMI R0,#0 $ STRB R0,[R3],#1 . SUBS R1,R1,#1 8 BPL faden2 B SUBS R6,R6,#1 L BPL faden V LDR R1,fadeb2 `! SWI "Wimp_SetPalette" j MOV R0,#19 t SWI "OS_Byte" ~ SUBS R5,R5,R9 � BPL faden3 � LDR R1,fadep2 �! SWI "Wimp_SetPalette" �" LDMIA R13!,{R0-R6,PC}^ � �".plex STMFD R13!,{R2-R4,R14} � RSB R4,R4,#960 � MOV R4,R4,ASR#2 � LDR R0,[R2,#32] � LDR R5,[R2,#36] � ADD R0,R0,R2 � ADD R5,R5,R2 LDR R1,bacdro MOV R2,#160 MLA R1,R4,R2,R1 ADD R1,R1,R3,ASR#3 ( MOV R2,#15 2.exylp LDMIA R1,{R3-R4} < LDMIA R0!,{R6-R7} F LDMIA R5!,{R8-R9} P BIC R3,R3,R8 Z BIC R4,R4,R9 d �R R3,R3,R6 n �R R4,R4,R7 x STMIA R1,{R3-R4} � ADD R1,R1,#160 � SUBS R2,R2,#1 � BPL exylp �" LDMIA R13!,{R2-R4,PC}^ �.dump EQUD 0 �.bonpl STMFD R13!,{R3-R4} � LDR R0,[R2,#32] � ADD R0,R0,R2 � LDR R1,bacdro � MOV R2,#160 � RSB R4,R4,#960 � MOV R4,R4,ASR#2 � MLA R1,R4,R2,R1 ADD R1,R1,R3,ASR#3 MOV R5,#15 .ybolp LDMIA R0!,{R3-R4} " STMIA R1,{R3-R4} , ADD R1,R1,#160 6 SUBS R5,R5,#1 @ BPL ybolp J LDMIA R13!,{R3-R4} T B bonret ^ h.crbits STMFD R13!,{R14} r MOV R7,#112 | BL sound �H MOV R12,#10 ; Start explosion. R11-car data, R9-player � LDR R10,exbits � LDMIA R11,{R5-R6} � LDR R8,table2 �.makebt BL rnd � MOV R0,R0,ASR#2 � CMP R0,#35 � BGT makebt � ADD R0,R8,R0,ASL#3 � LDMIA R0,{R3-R4} � BL rnd � � R0,R0,#3 � ADD R0,R0,#1 MUL R3,R0,R3 MUL R4,R0,R4 .makesp BL rnd & � R2,R0,#7 0 CMP R2,#4 : BGT makesp D CMP R2,#0 N CMPNE R9,#1 X ADDNE R2,R2,#4 b STMIA R10!,{R2-R6} l SUBS R12,R12,#1 v BPL makebt � LDMIA R13!,{PC}^ �.table2 EQUD ta%+280 �.exbits EQUD bt% �.bitspr EQUD btsp% �.spinc EQUD 0 �#.carex STMFD R13!,{R0-R12,R14} �D MOV R12,#10 ; Number of exploding bits � LDR R11,exbits �@ LDR R10,bitspr ; Base of picture table � LDR R9,spinc � ADD R9,R9,#1 � CMP R9,#9 � �Q R9,#0 STR R9,spinc LDR R0,splot2 LDR R1,sarea2 MOV R5,#8 *.btloop LDR R6,[R11] 4 CMP R6,#0 > TSTNE R9,#8 H BEQ nospin R ADD R6,R6,#1 \ CMP R6,#5 f CMPNE R6,#9 p SUBEQ R6,R6,#4 z.nospin STR R6,[R11],#4 � LDMIA R11,{R7-R8} � MOV R2,#63 � MUL R7,R2,R7 � MUL R8,R2,R8 � MOV R7,R7,ASR#6 � MOV R8,R8,ASR#6 � STMIA R11!,{R7-R8} � LDMIA R11,{R3-R4} � ADD R3,R3,R7,ASL#2 � ADD R4,R4,R8,ASL#2 � CMP R7,#0 � RSBMI R7,R7,#0 � CMP R8,#0 RSBMI R8,R8,#0 ADD R7,R7,R8 CMP R7,#5<<(sh-2) $ MVNLT R3,#128<<sh . STMIA R11!,{R3-R4} 8! LDR R2,[R10,R6,ASL#2] B MOV R3,R3,ASR#sh L MOV R4,R4,ASR#sh V SWI 46 ` SUBS R12,R12,#1 j BPL btloop t# LDMIA R13!,{R0-R12,PC}^ ~.dump2 EQUD 0 �@.wonms1 EQUS "Well done! You have completed Car Wars!":ALIGN �.woncon EQUD congrats% �.wongam MOV R1,#140 � BL wait � MOV R0,#112 � MOV R1,#1 � SWI "OS_Byte" � MOV R0,#113 � MOV R1,#1 � SWI "OS_Byte" � SWI 256+12 �A SWI 256+19:SWI 256:SWI 256+24:SWI 511:SWI 511:SWI 511 MOV R10,#500 MOV R5,#8 MOV R6,#5 .coplot BL rnd ( MUL R3,R0,R6 2 SUB R3,R3,#300 < BL rnd F MOV R4,R0,ASL#2 P SUB R4,R4,#64 Z LDR R0,splot2 d LDR R1,sarea2 n LDR R2,woncon x SWI 46 � SUBS R10,R10,#1 � BPL coplot �5 SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7 �H SWI 256+8:SWI 256+0:SWI 256+16:SWI 256+0:SWI 256+0:SWI 256+0 � SWI 256+0:SWI 256+0 �4 SWI 256+18:SWI 256+0:SWI 256+0:SWI 256+5 �, MOV R0,#4:MOV R1,#28:MOV R2,#700 �# SWI "OS_Plot":BL wonms2 �. MOV R1,#36:SWI "OS_Plot":BL wonms2 �" MOV R1,#32:MOV R2,#696 �# SWI "OS_Plot":BL wonms2 �/ MOV R2,#704:SWI "OS_Plot":BL wonms2 �* SWI 256+18:SWI 256+0:SWI 256+8 / MOV R2,#700:SWI "OS_Plot":BL wonms2 5 SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7 G SWI 256+8:SWI 256+0:SWI 256+8:SWI 256+0:SWI 256+0:SWI 256+0 " SWI 256+0:SWI 256+0 ,! SWI 256+4:MOV R1,#200 6 BL wait @ B lost J.wonms2 ADR R0,wonms1 T SWI "OS_Write0" ^ MOV R0,#4:MOV PC,R14 h r.bacdri EQUD 148:EQUD -1 |.bacdro EQUD 0:EQUD 0 �.bacspr EQUD backsp% �.stactp EQUD 0 �.clsbac STR R13,stactp � STR R0,bacdro � LDR R1,bacspr � LDR R2,[R1,#32] � ADD R1,R1,R2 � MOV R2,#141 �.bacplo LDMIA R1!,{R3-R14} � STMIA R0!,{R3-R14} � LDMIA R1!,{R3-R14} � STMIA R0!,{R3-R14} � LDMIA R1!,{R3-R14} STMIA R0!,{R3-R14} LDMIA R1!,{R3-R14} STMIA R0!,{R3-R14} & LDMIA R1!,{R3-R14} 0 STMIA R0!,{R3-R14} : LDMIA R1!,{R3-R14} D STMIA R0!,{R3-R14} N SUBS R2,R2,#1 X BPL bacplo b LDMIA R1!,{R3-R14} l STMIA R0!,{R3-R14} v LDMIA R1!,{R3-R6} � STMIA R0!,{R3-R6} � LDR R13,stactp � B drawb �.begspr EQUD blevt% �.behnds EQUD 0 �.timesp EQUD time% �.timec EQUD 999<<5 �.blrout LDR R2,begspr � LDR R0,behnds � CMP R0,#254 � BGT blrot2 � ADD R6,R0,#1 � STR R6,behnds LDR R1,bacdro LDR R3,[R2,#32] LDR R4,[R2,#36] ADD R3,R3,R2 * ADD R4,R4,R2 4 MOV R5,#160 > MLA R0,R5,R6,R1 H ADD R0,R0,#34 R MOV R1,#22 \ CMP R6,#233 f SUBGT R6,R6,#233 p SUBGT R1,R1,R6 z.ybloop MOV R5,#10 �.xbloop LDMIA R0,{R6-R7} � LDMIA R3!,{R8-R9} � LDMIA R4!,{R10-R11} � BIC R6,R6,R10 � �R R6,R6,R8 � BIC R7,R7,R11 � �R R7,R7,R9 � STMIA R0!,{R6-R7} � SUBS R5,R5,#1 � BPL xbloop �" ADD R0,R0,#160-(22<<2) � SUBS R1,R1,#1 � BPL ybloop .blrot2 LDR R0,splot2 LDR R1,sarea2 LDR R2,timesp $ MOV R3,#824 . MOV R4,#800 8 MOV R5,#8 B SWI 46 L LDR R8,timec V SUBS R8,R8,#1 ` BMI won j STR R8,timec t MOV R8,R8,ASR#5 ~ MOV R3,#1000 � MOV R6,#100 � LDR R9,nums �.divl3 MVN R11,#0 � MOV R10,#0 �.divl4 ADD R11,R11,#1 � ADD R10,R10,R6 � CMP R10,R8 � BLE divl4 �! LDR R2,[R9,R11,ASL#2] � SWI 46 � SUB R10,R10,R6 � SUB R8,R8,R10 ADD R3,R3,#52 CMP R6,#100 �Q R6,#10 BEQ divl3 ( CMP R6,#10 2 �Q R6,#1 < BEQ divl3 F MOV PC,R14 P.fx EQUD sound% Z".sound STMFD R13!,{R0-R3,R14} d LDR R0,fx n ADD R7,R7,R0 x LDMFD R7,{R0-R3} � SWI "Sound_Control" �" LDMIA R13!,{R0-R3,PC}^ �".sound2 STMFD R13!,{R0-R3,R14} � LDR R0,fx � ADD R5,R5,R0 � LDMFD R5,{R0-R3} � SWI "Sound_Control" �" LDMIA R13!,{R0-R3,PC}^ �.hipos EQUD 0 �.acthi EQUD 0 �=.hientr EQUS "Congratulations! Enter your name!"+�0:ALIGN �.lost LDR R0,splot2 � LDR R1,sarea2 LDR R2,gover MOV R3,#272 MOV R4,#468 " MOV R5,#8 , SWI 46 6 MOV R1,#100 @ BL wait J LDR R10,palett T MVN R9,#3 ^ BL fade h BL grabsc r LDR R1,highsc |; MOV R2,#10 ; Score placement � LDR R3,[R1],#16 � CMP R3,R0 � BGE nhipos �.hiplac LDR R3,[R1] � SUBS R2,R2,#1 � BMI nhipos � CMP R3,R0 � BGE nhipos � LDMIA R1,{R5-R8} � SUB R1,R1,#16 � STMIA R1,{R5-R8} � ADD R1,R1,#32 � B hiplac .nhipos STR R2,acthi MOV R4,#2 STR R4,showsc & CMP R2,#10 0 LDREQ R1,palett :# SWIEQ "Wimp_SetPalette" D BEQ titles N SUB R1,R1,#16 X STR R0,[R1],#4 b STR R1,hipos l BL blackp v" SWI 256+17:SWI 256+135 �J SWI 256+12:SWI 256+17:SWI 256+2:SWI 256+31:SWI 256+2:SWI 256+2 � ADR R0,hientr �0 SWI "OS_Write0":SWI 256+17:SWI 256+9 �- SWI "OS_NewLine":SWI "OS_NewLine" � MOV R11,#23 � MOV R10,#9 � LDR R9,highsc � .p2loop SWI 256+31:SWI 256+9 �& MOV R0,R11:SWI "OS_WriteC" � LDR R0,[R9],#4 � LDR R1,wimpb2 � MOV R2,#10 �$ SWI "OS_ConvertInteger4" SWI "OS_Write0" ! SWI 256+31:SWI 256+16 & MOV R0,R11:SWI "OS_WriteC" MOV R0,R9 * SWI "OS_Write0" 4 ADD R9,R9,#12 > SUB R11,R11,#2 H SUBS R10,R10,#1 R BPL p2loop \ LDR R0,splot2 f LDR R1,sarea2 p LDR R2,title z MOV R3,#40 � MOV R4,#40 � MOV R5,#0 � SWI 46 � LDR R2,archiw � MOV R3,#780 � MOV R4,#40 � SWI 46 � MOV R0,#21 � MOV R1,#0 � SWI "OS_Byte" � LDR R0,acthi � ADD R0,R0,R0 � ADD R0,R0,#5 1 SWI 256+31:SWI 256+16:SWI "OS_WriteC" ; SWI 288:SWI 288:SWI 288:SWI 288:SWI 288:SWI 288 ; SWI 288:SWI 288:SWI 288:SWI 288:SWI 288:SWI 288 $1 SWI 256+31:SWI 256+16:SWI "OS_WriteC" . MOV R0,#4 8 MOV R1,#2 B SWI "OS_Byte" L MOV R9,#6 V BL fade3 ` LDR R0,hipos j MOV R1,#11 t MOV R2,#32 ~ MOV R3,#255 � SWI "OS_ReadLine" � MOV R2,#0 � STRB R2,[R0,R1] � B titles �.fadeb EQUD p3% �".fade STMFD R13!,{R0-R4,R14} � LDR R0,fadeb � MOV R1,#30 �.fadel LDR R2,[R10],#4 � STR R2,[R0],#4 � SUBS R1,R1,#1 � BPL fadel MOV R4,#64 .fadel2 MOV R0,#19 SWI "OS_Byte" LDR R1,fadeb (! SWI "Wimp_SetPalette" 2 LDR R1,fadeb < ADD R1,R1,#1 F MOV R3,#23 P.fadel3 LDRB R0,[R1] Z ADDS R0,R0,R9 d MOVMI R0,#0 n CMP R0,#255 x MOVGT R0,#255 � STRB R0,[R1],#1 � LDRB R0,[R1] � ADDS R0,R0,R9 � MOVMI R0,#0 � CMP R0,#255 � MOVGT R0,#255 � STRB R0,[R1],#1 � LDRB R0,[R1] � ADDS R0,R0,R9 � MOVMI R0,#0 � CMP R0,#255 � MOVGT R0,#255 � STRB R0,[R1],#2 SUBS R3,R3,#1 BPL fadel3 SUBS R4,R4,#1 " BPL fadel2 ," LDMIA R13!,{R0-R4,PC}^ 6.nums EQUD num% @.levfnt EQUD level% J.shlev MOV R9,#4 T BL fade2 ^ LDR R0,totpl h CMP R0,#2 r BEQ switch | LDR R0,blevel � CMP R0,#0 � BEQ switch � LDR R0,splot2 � LDR R1,sarea2 � LDR R2,levfnt � MOV R3,#500 � MOV R4,#540 � MOV R5,#8 � SWI 46 � BL retlev � LDR R6,nums � ADD R6,R6,#4 � LDR R2,[R6,R0,ASL#2] LDR R0,splot2 MOV R3,#768 MOV R4,#536 & MOV R5,#8 0 SWI 46 : LDR R2,livest D MOV R3,#520 N MOV R4,#440 X MOV R5,#8 b SWI 46 l LDR R6,nums v BL grabli � ADD R0,R0,#1 � LDR R2,[R6,R0,ASL#2] � LDR R0,splot2 � MOV R3,#712 � MOV R4,#444 � MOV R5,#8 � SWI 46 � MOV R1,#130 � BL wait � B switch �.livest EQUD lives% �.block2 EQUD b �.sarea2 EQUD sp% .splot2 EQUD 546 A.opt1 EQUS "Select: 1. 1 player 2. 2 players"+�0:ALIGN .opt2 EQUS �39,�32)+�0 E.opt3 EQUS " Difficulty Level? (0-7) "+�0:ALIGN *.scrm EQUD scrme 4.archiw EQUD archw% >.ststat EQUD stdat H.wimpb2 EQUD w% R.title EQUD title% \.gmode EQUD gamem% f%.gpl EQUD gamem1%:EQUD gamem2% p.gpl2 EQUD gamepl% zF.keyssp EQUD kleft%:EQUD kright%:EQUD kup%:EQUD kdown%:EQUD kfire% �.keydta EQUD asc% �.menusp EQUD optsel% �.showpl LDR R0,splot2 � LDR R1,sarea2 � ADR R2,gpl � LDR R3,totpl � SUB R3,R3,#1 � LDR R2,[R2,R3,ASL#2] � MOV R3,#664 � MOV R4,#900 � MOV R5,#0 � SWI 46 � MOV PC,R14 .optpage MVN R9,#4 LDR R10,palett BL fade $ SWI 256+12 . BL blackp 8 MOV R12,#1 B LDR R0,splot2 L LDR R1,sarea2 V LDR R2,gmode ` MOV R3,#144 j MOV R4,#900 t MOV R5,#0 ~ SWI 46 � BL showpl � LDR R2,gpl2 � MOV R3,#844 � SUB R4,R4,#12 � SWI 46 � LDR R2,menusp � MOV R3,#202 � MOV R4,#53 � SWI 46 � MOV R6,#4 � ADR R7,keyssp � MOV R3,#90 MOV R4,#700 .knamel LDR R2,[R7],#4 SWI 46 SUB R4,R4,#100 ( SUBS R6,R6,#1 2 BPL knamel <.prkeyd LDR R6,keydta F LDR R7,ststat P ADD R7,R7,#24 Z@ SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7:SWI 256+16 dF SWI 256:SWI 256+16:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256 n3 SWI 256+5:SWI 256+18:SWI 256:SWI 256+11 x MOV R1,#0 � LDR R10,totpl � SUB R10,R10,#1 �.kydisl ADD R1,R1,#400 � MOV R2,#764 � MOV R9,#4 �.prklop LDR R8,[R7],#4 � RSB R8,R8,#0 � SUB R8,R8,#17 � MOV R8,R8,ASL#1 � ADD R8,R8,R6 � MOV R0,#4 � SWI "OS_Plot" � SUB R2,R2,#100 LDRB R0,[R8],#1 SWI "OS_WriteC" LDRB R0,[R8] " CMP R0,#255 , SWINE "OS_WriteC" 6 SUBS R9,R9,#1 @ BPL prklop J ADD R7,R7,#108 T SUBS R10,R10,#1 ^ BPL kydisl h? SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7:SWI 256+8 rE SWI 256:SWI 256+8:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256 | SWI 256+4 � MOV R9,#5 �! CMP R12,#1:BLEQ fade3 �?.getak MOV R0,#21:MOV R1,#0:MOV R2,#0:SWI 6:SWI "OS_ReadC" � CMP R0,#50 � BEQ redef � CMP R0,#51 � BEQ optcls � CMP R0,#49 � BNE getak � LDR R0,totpl � RSB R0,R0,#3 � STR R0,totpl �( SWI 256+18:SWI 256:SWI 256+7 MOV R0,#4 MOV R1,#800 MOV R2,#764 & SWI "OS_Plot" 0 MOV R0,#101 : MOV R1,#928 D MOV R2,#300 N SWI "OS_Plot" X BL showpl b MOV R12,#0 l B prkeyd v.optcls LDR R10,palett � MVN R9,#4 � BL fade � SWI 256+12 � LDR R1,palett �! SWI "Wimp_SetPalette" � B titles �.vollev EQUD 127 �.writer EQUD writer% �.palett EQUD pal% �.scrbla SWI "XOS_Mouse" � CMP R2,#7 � BEQ starto � CMP R2,#0 BNE scrbla : MOV R0,#113 ; Return to desktop MOV R1,#1 SWI 6 * MOV R0,#112 4 MOV R1,#1 > SWI 6 H MOV R0,#21 R MOV R1,#0 \ MOV R2,#0 f SWI 6 p B rettw z.specpl EQUD &234 �.getkey MVN R5,#127 �.keygl MOV R1,R5 � MOV R2,R5 � MOV R0,#129 � SWI 6 � CMP R1,#255 � BEQ getkey � ADD R5,R5,#1 � CMN R5,#15 � BLT keygl � MVN R5,#127 �.keygl2 MOV R1,R5 � MOV R2,R5 MOV R0,#129 SWI 6 CMP R1,#255 $ SWIEQ 256+7 . �Q PC,R14 8 ADD R5,R5,#1 B CMN R5,#15 L MVNEQ R5,#127 V B keygl2 `.questm EQUD questm% j.redef LDR R9,totpl t SUB R9,R9,#1 ~ LDR R11,ststat � ADD R11,R11,#24 �H SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7:SWI 256+16:SWI 256 �H SWI 256+16:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256+5 � MOV R7,#0 � LDR R12,totpl � SUB R12,R12,#1 �.keyl ADD R7,R7,#400 � MOV R10,#4 � MOV R8,#700 �.kgetl LDR R0,splot2 � LDR R1,sarea2 � LDR R2,questm MOV R3,R7 ADD R4,R8,#4 MOV R5,#0 SWI 46 ( BL getkey 2 STR R5,[R11],#4 < MOV R0,#4 F ADD R1,R7,#128 P MOV R2,R8 Z SWI "OS_Plot" d( SWI 256+18:SWI 256:SWI 256+7 n MOV R0,#101 x SUB R1,R1,#128 � ADD R2,R2,#64 � SWI "OS_Plot" �) SWI 256+18:SWI 256:SWI 256+11 � LDR R6,keydta � RSB R5,R5,#0 � SUB R5,R5,#17 � MOV R5,R5,ASL#1 � ADD R5,R5,R6 � LDRB R0,[R5],#1 � SWI "OS_WriteC" � LDRB R0,[R5] � CMP R0,#255 � SWINE "OS_WriteC" SUB R8,R8,#100 SUBS R10,R10,#1 BPL kgetl " ADD R11,R11,#108 , SUBS R12,R12,#1 6 BPL keyl @G SWI 256+23:SWI 256+17:SWI 256+7:SWI 256+7:SWI 256+8:SWI 256 JG SWI 256+8:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256:SWI 256+4 T B getak ^.lcomp EQUD comp% h.gover EQUD gover% r#.enleft EQUS "Bonus: "+�0:ALIGN |.losel LDR R0,totpl � CMP R0,#2 � BEQ titles �3 LDR R11,block2 ; Who won? � LDR R8,[R11,#20] � CMP R8,#0 � BGE won � LDR R0,lives � SUBS R0,R0,#1 � STR R0,lives � BMI lost � B fadeiv �.scstr2 EQUS "Score: "+�0 �.enbot EQUD enbo% .won LDR R0,blevel CMP R0,#0 BNE endolv & MOV R0,#1 0 STR R0,blevel : MOV R0,#0 D STR R0,switon N LDR R0,ststat X LDR R1,block2 b ADD R0,R0,#128 l ADD R1,R1,#128 v MOV R2,#31 �.brepdt LDR R3,[R0],#4 � STR R3,[R1],#4 � SUBS R2,R2,#1 � BPL brepdt � LDR R11,block2 � ADD R11,R11,#128 � MOV R0,#1 � STR R0,[R11,#24] � STR R0,[R11,#32] � MOV R0,#0 � STR R0,[R11,#36] � STR R0,[R11,#112] � STR R0,[R11,#40] ! MOV R0,#9 ! STR R0,[R11,#28] ! BL retlev ! MOV R0,R0,ASL#5 !* ADD R0,R0,#200 !4 STR R0,[R11,#20] !> LDR R0,ststat !H LDMIA R0,{R1-R5} !R LDR R0,block2 !\ STMIA R0,{R1-R5} !f B fadetn !p.bacare EQUD back% !z.bacpsp EQUD backsp% !�.endolv LDR R0,splot2 !� LDR R1,sarea2 !� LDR R2,lcomp !� MOV R3,#272 !� MOV R4,#452 !� MOV R5,#8 !� SWI 46 !�, SWI 256+31:SWI 256+15:SWI 256+20 !� LDR R0,splot2 !� LDR R1,sarea2 !� LDR R2,enbot !� MOV R3,#432 !� MOV R4,#340 " MOV R5,#8 " SWI 46 ",.boaddl SWI 256+31:SWI 256+21:SWI 256+20 "$$ MOV R0,#19:SWI "OS_Byte" ". LDR R9,nums "8 LDR R1,sarea2 "B/ MOV R6,#100 ; Units "L MOV R3,#660 "V MOV R4,#340 "` MOV R5,#8 "j MOV R12,R8 "t.divl2 MVN R11,#0 "~ MOV R10,#0 "�.divlop ADD R11,R11,#1 "� ADD R10,R10,R6 "� CMP R10,R12 "� BLE divlop "�! LDR R2,[R9,R11,ASL#2] "� SWI 256+24 "�( � R0,R3,#255:SWI "OS_WriteC" "�+ MOV R0,R3,LSR#8:SWI "OS_WriteC" "�( � R0,R4,#255:SWI "OS_WriteC" "�+ MOV R0,R4,LSR#8:SWI "OS_WriteC" "� ADD R7,R3,#52 "�( � R0,R7,#255:SWI "OS_WriteC" # + MOV R0,R7,LSR#8:SWI "OS_WriteC" # ADD R7,R4,#72 #( � R0,R7,#255:SWI "OS_WriteC" #+ MOV R0,R7,LSR#8:SWI "OS_WriteC" #( LDR R0,splot2 #2 STMFD R13!,{R1-R5} #< LDR R1,bacare #F LDR R2,bacpsp #P MOV R3,#0 #Z MOV R4,#0 #d MOV R5,#0 #n SWI 46 #x LDMIA R13!,{R1-R5} #� SWI 46 #� SUB R10,R10,R6 #� SUB R12,R12,R10 #� ADD R3,R3,#52 #� CMP R6,#100 #� �Q R6,#10 #� BEQ divl2 #� CMP R6,#10 #� �Q R6,#1 #� BEQ divl2 #� SUB R8,R8,#3 #� LDR R7,score #� ADD R7,R7,#3 $ STR R7,score $* SWI 256+31:SWI 256+1:SWI 256+1 $) ADR R0,scstr2:SWI "OS_Write0" $" MOV R0,R7 $, LDR R1,wimpb2 $6 MOV R2,#12 $@$ SWI "OS_ConvertInteger4" $J SWI "OS_Write0" $T CMN R8,#3 $^ BGT boaddl $h SWI 256+26 $r BL retlev $| ADD R0,R0,#1 $� CMP R0,#8 $� BGE wongam $� BL placer $� MOV R1,R0,ASR#1 $� CMP R0,R1,ASL#1 $� MOVNE R0,#0 $� STRNE R0,blevel $� MOVNE R0,#51<<5 $� STRNE R0,timec $� MOVNE R0,#0 $� STRNE R0,behnds $� MOV R1,#100 $� BL wait %.fadeiv BL invars %.fadetn LDR R10,palett % MOV R9,#4 %& BL fade %0B SWI 256+17:SWI 256+128:SWI 256+17:SWI 256+7:SWI 256+12 %: LDR R0,blevel %D CMP R0,#0 %N BNE switch %X MOV R0,#5 %b STR R0,maxbo %l LDR R11,block2 %v MOV R0,#1536<<sh %� STR R0,[R11,#128] %� STR R0,[R11,#132] %� B switch %�.doturn CMP R7,#3 %� ADDEQ R8,R8,#8 %� CMP R7,#2 %� SUBEQ R8,R8,#8 %� CMP R7,#10 %� BNE nfb %� ADD R8,R8,#144 %� LDR R7,[R11,#100] %� SUB R7,R7,#1 %� STR R7,[R11,#100] & MOV R7,#10 &.nfb SUB R7,R7,#1 & STR R7,sbutp & CMP R8,#288 &* SUBGE R8,R8,#288 &4 CMP R8,#0 &> ADDMI R8,R8,#288 &H CMP R7,#8 &R �Q R7,#0 &\ STREQ R7,sbutp &f BEQ fintur &p CMP R7,#0 &z BNE fintur &� LDR R7,[R11,#92] &� SUB R7,R7,#1 &� STR R7,[R11,#92] &� B fintur &�.dm3dat EQUD dm3% &�/.dm3tit EQUS "Bonusses available:"+�0:ALIGN &�K.demo3 SWI 256+12:SWI 256+17:SWI 256+2:SWI 256+31:SWI 256+10:SWI 256+0 &� ADR R0,dm3tit &� SWI "OS_Write0" &� SWI 256+17:SWI 256+0 &� MOV R0,#3 &� STR R0,showsc &� MOV R3,#50 ' MOV R4,#900 ' MOV R5,#0 ' LDR R6,splot2 '$ LDR R7,sarea2 '. MOV R9,#19 '8 LDR R10,dm3dat 'B4 SWI 256+18:SWI 256+0:SWI 256+1:SWI 256+5 'L.readd3 LDR R2,[R10],#4 'V MOV R0,R6 '` MOV R1,R7 'j SWI 46 't MOV R0,#4 '~ ADD R1,R3,#70 '� ADD R2,R4,#50 '� SWI "OS_Plot" '� MOV R0,R10 '� SWI "OS_Write0" '� ADD R10,R10,#16 '� SUB R4,R4,#80 '� CMP R4,#120 '� ADDLT R3,R3,#640 '� MOVLT R4,#900 '� SUBS R9,R9,#1 '� BPL readd3 '� SWI 256+4 ( B textc ( .totpl EQUD 1 (.highsc EQUD hi% (.showsc EQUD 1 ((.showti EQUD 0 (2(.highti EQUS "High Scores:"+�0:ALIGN (<K.demo2 SWI 256+12:SWI 256+17:SWI 256+2:SWI 256+31:SWI 256+12:SWI 256+2 (F ADR R0,highti (P0 SWI "OS_Write0":SWI 256+17:SWI 256+0 (Z- SWI "OS_NewLine":SWI "OS_NewLine" (d MOV R11,#23 (n MOV R10,#9 (x LDR R9,highsc (� .prloop SWI 256+31:SWI 256+9 (�& MOV R0,R11:SWI "OS_WriteC" (� LDR R0,[R9],#4 (� LDR R1,wimpb2 (� MOV R2,#10 (�$ SWI "OS_ConvertInteger4" (� SWI "OS_Write0" (�! SWI 256+31:SWI 256+16 (�& MOV R0,R11:SWI "OS_WriteC" (� MOV R0,R9 (� SWI "OS_Write0" (� ADD R9,R9,#12 (� SUB R11,R11,#2 ) SUBS R10,R10,#1 ) BPL prloop ) LDR R0,splot2 )" LDR R1,sarea2 ), LDR R2,title )6 MOV R3,#40 )@ MOV R4,#40 )J MOV R5,#0 )T SWI 46 )^ LDR R2,archiw )h MOV R3,#780 )r MOV R4,#40 )| SWI 46 )� B textc )�.invars SWI "XOS_Mouse" )� CMP R2,#0:BNE invars )� STMFD R13!,{R14} )� BL placsw )� LDR R0,ststat )� LDR R1,block2 )� MOV R2,#300 )�.config LDR R3,[R0],#4 )� STR R3,[R1],#4 )� SUBS R2,R2,#4 )� BPL config )� LDR R3,bartab * LDR R4,barr * LDR R5,oabar * MOV R7,#2 *&.barrpl BL rnd *0 � R0,R0,#15 *: MOV R0,R0,ASL#5 *D ADD R0,R0,#384 *N MOV R0,R0,ASL#sh *X SUB R0,R0,#32*j *b STR R0,[R3],#4 *l.ysc BL rnd *v � R0,R0,#15 *� CMP R0,#10 *� BGT ysc *� MOV R0,R0,ASL#5 *� ADD R0,R0,#384 *� CMP R0,#640 *� BGT notinw *� CMP R0,#468 *� BGT ysc *�.notinw MOV R0,R0,ASL#sh *� SUB R0,R0,#32*j *� STR R0,[R3],#4 *� BL rnd *� MOV R0,R0,ASR#6 + LDR R0,[R5,R0,ASL#2] + STR R0,[R3],#4 + BL rnd + BL rnd +* SUBS R4,R4,#1 +4 BPL barrpl +> LDR R0,bblock +H MOV R1,#5 +R MOV R2,#2560 +\.bocler STR R2,[R0],#16 +f SUBS R1,R1,#1 +p BPL bocler +z MOV R0,#0 +� STR R0,bonscr +� MOV R1,#2 +� STR R1,maxbo +� LDR R0,exblo +� LDR R1,exmax +�.excler STR R2,[R0],#12 +� SUBS R1,R1,#1 +� BPL excler +� MOV R8,#1 +� MOV R0,#0 +� STR R0,exonsc +� STR R0,switon +� STR R0,windx , STR R0,windy , STR R0,onscr , LDR R0,maxbu ,$ LDR R1,a ,. MOV R2,#2560 ,8.fillbb STR R2,[R1],#40 ,B SUBS R0,R0,#1 ,L BPL fillbb ,V LDR R0,totpl ,` CMP R0,#2 ,j BEQ nisp ,t LDR R11,block2 ,~ ADD R11,R11,#128 ,� STR R0,[R11,#24] ,� STR R0,[R11,#32] ,� MOV R0,#0 ,� STR R0,[R11,#36] ,� STR R0,[R11,#112] ,� STR R0,[R11,#40] ,� MOV R0,#9 ,� STR R0,[R11,#28] ,� BL retlev ,� MOV R0,R0,ASL#5 ,� ADD R0,R0,#200 ,� STR R0,[R11,#20] - .nisp LDMIA R13!,{PC}^ - .starto MOV R0,#112 - MOV R1,#1 - SWI "OS_Byte" -( MOV R0,#113 -2 MOV R1,#1 -< SWI "OS_Byte" -F SWI 256+12 -P LDR R1,palett -Z! SWI "Wimp_SetPalette" -d.start MOV R0,R0 -n MOV R0,R0 -x MOV R0,#1 -� STR R0,showsc -�.titles BL invars -� SWI 256+17 -� SWI 256+135 -� SWI 256+17 -� SWI 256+0 -� LDR R1,palett -�! SWI "Wimp_SetPalette" -� SWI 66 -� ADD R0,R0,#800 -� STR R0,showti -� LDR R0,showsc -� CMP R0,#1 . BEQ demo1 . CMP R0,#2 . BEQ demo2 ." B demo3 .,5.volstr EQUS �31+�12+�26+"Volume Level:"+�0:ALIGN .6.titlsc EQUD 153:EQUD 153 .@.xdiv EQUD 1 .J.ydiv EQUD 1 .T,.opt1s EQUD opt1%:EQUD opt2%:EQUD opt3% .^ .demo1 SWI 256+12:MOV R0,#1 .h STR R0,showsc .r MOV R8,#1 .|.rep LDR R0,specpl .� LDR R1,sparea .� LDR R2,title .� MOV R3,#80 .� ADD R3,R3,R8,ASL#1 .� MOV R4,#44 .� ADD R4,R4,R8,ASL#2 .� MOV R5,#0 .� ADR R6,titlsc .� MVN R7,#0 .� STR R8,xdiv .� STR R8,ydiv .� SWI 46 .� ADD R8,R8,#2 / CMP R8,#153 / BNE rep / LDR R0,spplot /& LDR R1,sparea /0 LDR R2,writer /: MOV R3,#580 /D MOV R4,#50 /N MOV R5,#0 /X SWI 46 /b LDR R2,archiw /l MOV R3,#100 /v MOV R4,#20 /� SWI 46 /� LDR R2,opt1s /� MOV R3,#392 /� MOV R4,#472 /� SWI 46 /� LDR R2,opt1s+4 /� MOV R4,#388 /� SWI 46 /� LDR R2,opt1s+8 /� MOV R4,#272 /� SWI 46 /� ADR R0,volstr /� SWI "OS_Write0" 0 LDR R0,vollev 0 LDR R1,energy 0 MOV R2,#12 0 % SWI "OS_ConvertCardinal1" 0*G SWI 256+31:SWI 256+25:SWI 256+26:SWI "OS_Write0":SWI 256+32 04.textc MOV R0,#129 0> MVN R1,#48 0H MVN R2,#48 0R SWI "OS_Byte" 0\ CMP R1,#255 0f BEQ firepr 0p MOV R0,#129 0z MVN R1,#49 0� MVN R2,#49 0� SWI "OS_Byte" 0� CMP R1,#255 0� BEQ optpage 0� MOV R0,#129 0� MVN R1,#17 0� MVN R2,#17 0� SWI "OS_Byte" 0� CMP R1,#255 0� ADREQ R14,start 0� BEQ scrbla 0� SWI 66 0� LDR R1,showti 1 CMP R0,R1 1 BLT samep 1 SWI 66 1$ ADD R0,R0,#800 1. STR R0,showti 18 LDR R0,showsc 1B ADD R0,R0,#1 1L CMP R0,#4 1V �Q R0,#1 1` STR R0,showsc 1j CMP R0,#1 1t BEQ demo1 1~ CMP R0,#2 1� BEQ demo2 1� B demo3 1�.samep MOV R0,#129 1� MVN R1,#113 1� MVN R2,#113 1� SWI 6 1� CMP R1,#255 1� ADREQ R14,start 1� BEQ scrbla 1� LDR R9,vollev 1� MOV R0,#129 1� MVN R1,#57 2 MVN R2,#57 2 SWI 6 2 CMP R1,#255 2 ADDEQ R9,R9,#1 2( MOV R0,#129 22 MVN R1,#41 2< MVN R2,#41 2F SWI 6 2P CMP R1,#255 2Z SUBEQ R9,R9,#1 2d CMP R9,#0 2n �Q R9,#1 2x CMP R9,#128 2� �Q R9,#127 2� LDR R8,vollev 2� STR R9,vollev 2� CMP R8,R9 2� BEQ textc 2� MOV R0,R9 2� SWI "Sound_Volume" 2� LDR R0,vollev 2� LDR R1,energy 2� MOV R2,#12 2�% SWI "OS_ConvertCardinal1" 2�G SWI 256+31:SWI 256+25:SWI 256+26:SWI "OS_Write0":SWI 256+32 2� SWI 66 3 ADD R0,R0,#1000 3 STR R0,showti 3 LDR R0,showsc 3" CMP R0,#1 3, BEQ textc 36 B demo1 3@.firepr LDR R10,palett 3J MOV R9,#4 3T BL fade 3^ MOV R9,#32 3hB SWI 256+17:SWI 256+128:SWI 256+17:SWI 256+7:SWI 256+12 3r BL invars 3| LDR R1,totpl 3� CMP R1,#1 3� BNE switch 3� STR R1,blevel 3� BL retlev 3� MOV R0,R0,ASL#5 3� ADD R0,R0,#200 3� LDR R11,block 3� STR R0,[R11,#20+128] 3�3 MOV R0,#2 ; Lives 3� STR R0,lives 3� MOV R0,#0 3� STR R0,score 3� MOV R0,#0 4 BL placer 4/.nodams SWI "OS_Mouse":CMP R2,#0:BNE nodams 4 B switch 4&.screen EQUD 1 40.blevel EQUD 1 4:.switon EQUD 0 4D.thitl EQUD 0 4N.hitlas EQUD 0:EQUD 0 4X.placsw ADR R0,scrsw1 4b ADR R1,scrsw 4l% SWI "OS_ReadVduVariables" 4v MOV PC,R14 4�.scrsw1 EQUD 148:EQUD -1 4�.scrsw EQUD 0:EQUD 0 4�.switch SWI "XOS_Mouse" 4� CMP R2,#0 4� BLNE scrbla 4� MOV R0,#19 4� SWI "OS_Byte" 4� MOV R0,#112 4� LDR R1,screen 4� SWI "OS_Byte" 4� LDR R0,switon 4� ADD R0,R0,#1 4� STR R0,switon 5 CMP R0,#3 5 BEQ shlev 5 LDR R1,screen 5 RSB R1,R1,#3 5* STR R1,screen 54 MOV R0,#113 5> SWI "OS_Byte" 5H ADR R0,scrsw1 5R ADR R1,scrsw 5\% SWI "OS_ReadVduVariables" 5f LDR R0,scrsw 5p B clsbac 5z.drawb LDR R11,bartab 5� LDR R8,barr 5�.barloo LDMIA R11!,{R3-R4} 5� LDR R2,[R11],#4 5� CMP R3,#0 5� BLT destbr 5� LDR R0,scrsw 5� MOV R3,R3,ASR#sh 5� MOV R4,R4,ASR#sh 5� SUB R3,R3,#64 5� LDR R1,[R2,#32] 5� ADD R1,R1,R2 5� RSB R4,R4,#1024 5� MOV R4,R4,ASR#2 6 MOV R5,#160 6 MLA R0,R4,R5,R0 6 ADD R0,R0,R3,ASR#3 6$ MOV R5,#15 6..ybarlp LDMIA R1!,{R3-R4} 68 STMIA R0,{R3-R4} 6B ADD R0,R0,#160 6L SUBS R5,R5,#1 6V BPL ybarlp 6`.destbr SUBS R8,R8,#1 6j BPL barloo 6t.moveit LDR R11,block 6~ LDR R0,blevel 6�.cars STR R0,left 6� LDR R12,block 6� CMP R11,R12 6� ADR R12,hitlas 6� ADDNE R12,R12,#4 6� STR R12,thitl 6� LDR R12,[R12] 6� LDR R2,[R11,#20] 6� STR R2,olden 6� MOV R2,#0 6� LDR R5,[R11,#8] 6� LDR R6,[R11,#12] 7 LDR R3,windx 7 ADD R5,R5,R3 7 LDR R4,windy 7 ADD R6,R6,R4 7( LDMIA R11,{R3-R4} 72 ADD R3,R3,R5 7< CMP R3,#64*j 7F MOVLT R3,#64*j 7P RSBLT R5,R5,#0 7Z MOVLT R2,#1 7d LDR R7,right 7n CMP R3,R7 7x MOVGT R3,R7 7� RSBGT R5,R5,#0 7� MOVGT R2,#1 7� 7�+ STMFD R13!,{R0-R1,R3-R4,R7-R10} 7� ADD R3,R3,#72*j 7� ADD R4,R4,#72*j 7� LDR R10,bartab 7� LDR R8,barr 7�-.barlp1 LDMIA R10!,{R0-R1}:ADD R10,R10,#4 7� CMP R0,#0 7� BLT nocra1 7� SUBS R0,R3,R0 7� RSBMI R0,R0,#0 8 CMP R0,#68*j 8 BLT cra1 8.nocra1 SUBS R8,R8,#1 8" BPL barlp1 8,+ LDMIA R13!,{R0-R1,R3-R4,R7-R10} 86 B ycolde 8@.cra1 SUBS R1,R4,R1 8J RSBMI R1,R1,#0 8T CMP R1,#64*j 8^ BGT nocra1 8h RSBS R5,R5,#0 8r CMP R5,#0 8| ADD R5,R5,#1<<sh 8� SUBMI R5,R5,#2<<sh 8� MOV R2,#1 8�+ LDMIA R13!,{R0-R1,R3-R4,R7-R10} 8� LDMIA R11,{R3-R4} 8� B newbr 8� 8�.ycolde ADD R4,R4,R6 8� CMP R4,#200*j 8� MOVLT R4,#200*j 8� RSBLT R6,R6,#0 8� MOVLT R2,#1 8� LDR R7,top 8� CMP R4,R7 9 MOVGT R4,R7 9 RSBGT R6,R6,#0 9 MOVGT R2,#1 9& 90+ STMFD R13!,{R0-R1,R3-R4,R7-R10} 9: ADD R3,R3,#72*j 9D ADD R4,R4,#72*j 9N LDR R10,bartab 9X LDR R8,barr 9b-.barlp2 LDMIA R10!,{R0-R1}:ADD R10,R10,#4 9l CMP R0,#0 9v BLT nocra2 9� SUBS R0,R3,R0 9� RSBMI R0,R0,#0 9� CMP R0,#64*j 9� BLT cra2 9�.nocra2 SUBS R8,R8,#1 9� BPL barlp2 9�+ LDMIA R13!,{R0-R1,R3-R4,R7-R10} 9� B newbr 9�.cra2 SUBS R1,R4,R1 9� RSBMI R1,R1,#0 9� CMP R1,#64*j 9� BGT nocra2 9� RSBS R6,R6,#0 : MOV R2,#1 :+ LDMIA R13!,{R0-R1,R3-R4,R7-R10} : LDMIA R11,{R3-R4} : :* .newbr CMP R2,#1:BNE nowalc :4! CMP R12,#1:BEQ nowald :> MOV R7,#0 :H BL sound :R LDR R7,[R11,#20] :\ SUB R7,R7,#1 :f STR R7,[R11,#20] :p MOV R12,#1 :z LDR R7,thitl :� STR R12,[R7] :� B nowald :�.nowalc LDR R12,thitl :� MOV R7,#0 :� STR R7,[R12] :� MOV R12,#1 :�.nowald LDR R2,block :�.hitcar CMP R2,R11 :� BEQ self :� LDR R14,[R2] :� SUBS R14,R14,R3 :� RSBMI R14,R14,#0 :� CMP R14,#78*j ; BGT self ; LDR R14,[R2,#4] ; SUBS R14,R14,R4 ;$ RSBMI R14,R14,#0 ;. CMP R14,#78*j ;8 BGT self ;B MVN R5,R5 ;L MVN R6,R6 ;V ADD R3,R3,R5 ;` ADD R4,R4,R6 ;j LDR R1,[R2,#8] ;t LDR R14,[R2,#12] ;~ SUB R1,R1,R5,ASR#1 ;� SUB R14,R14,R6,ASR#1 ;� STR R1,[R2,#8] ;� STR R14,[R2,#12] ;� LDR R1,[R11,#20] ;� SUB R1,R1,#2 ;� STR R1,[R11,#20] ;�.norefl MOV R1,#2 ;� STR R1,[R11,#116] ;� MOV R1,R5 ;� MOV R5,#80 ;� BL sound2 ;� MOV R5,R1 <