Home » Personal collection » Acorn hard disk » games » !3D-Tanks » The_Game

The_Game

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 » !3D-Tanks
Filename: The_Game
Read OK:
File size: 9FAE bytes
Load address: 0000
Exec address: 0000
File contents
   10REM >The_Game
   20 REM ********************************************************************
   30 REM ************************** A I W I D *******************************
   40 REM ********************************************************************
   50 REM ************** By Stuart Cupit  and  Simon Cruse *******************
   60 REM ********************************************************************
   70 REM ************************* (c) 1/11/89 ******************************
   80 REM ********************************************************************
   90
  100ON ERROR OSCLI"FX15":MODE12:REPORT:PRINT" at line ";ERL:END
  110 MODE 12
  120 OFF
  130 @%=0
  140 VOICES 2
  150 *CHANNELVOICE 1 Launch
  160 *CHANNELVOICE 2 Splash
  170
  180 SC=2^8
  190 F=5
  200 lives%=99
  210INPUT "Start level% : "Slevel%
  220level%=Slevel%
  230 screen%=1
  240 object_length%=256          :REM SIZE OF EACH OBJECT BUFFER
  250 max_objects%=256            :REM MAXIMUM NUMBER OF OBJECTS POSSIBLE = 256
  260 object_lengthlog%=LOG(object_length%)/LOG(2)
  270 DIM code 100000            :REM SIZE OF GAME CODING = 100000
  280 DIM object_buffer object_length%*max_objects%
  290 DIM sin 5120*4
  300 DIM perspective 4096*4*4
  310 DIM cord 10000
  320 DIM facet 10000
  330 DIM temp_cord 10000
  340 DIM rnd_angle 4096*4
  350 DIM dots 512*4*2
  360 cos=sin+4096
  370
  380 PROC_ass
  390
  400 PRINT TAB(26,12)"Setting up.      Please wait...";
  410 PROC_table_set_up
  420
  430 !(info)=object_buffer
  440 !(info+4)=sin
  450 !(info+8)=cos
  460 !(info+12)=perspective
  470 !(info+16)=cord
  480 !(info+20)=facet
  490 !(info+24)=temp_cord
  500 !(info+28)=64                       :REM SPIN SPEED
  510 !(info+32)=64*SC                    :REM DRIVING SPEED
  520 !(info+36)=0
  530 !(info+40)=rnd_angle
  540 !(info+44)=0
  550 !(info+48)=dots
  560 !(info+52)=4000*SC
  570 !(info+56)=0
  580 !(info+60)=0
  590 !(info+64)=level%
  600 !(info+68)=0
  610 !(info+72)=0
  620 !(info+76)=0
  630 !(info+80)=lives%
  640 !(info+84)=0
  650
  660 val=0
  670 FOR loop=0 TO 11
  680 val+=21
  690 VDU 19,loop,16,0,val,0
  700 NEXT loop
  710 VDU 19,12,16,255,0,0
  720 VDU 19,13,16,0,255,255
  730 VDU 19,14,16,255,0,255
  740 VDU 19,15,16,255,255,0
  750
  760 level%=Slevel%
  770 !(info+64)=Slevel%
  780 !(info+68)=0
  790 !(info+80)=lives%
  800 end_flag%=1
  810 !(info+72)=0
  820 !(info+76)=-68
  830 sign=-1
  840 PROC_object_set_up
  850 OSCLI("FX112,"+STR$(screen% EOR3)):OSCLI("FX113,"+STR$(screen%)):screen%=screen% EOR3:CLS
  860 !(object_buffer+8)=((!(info+76)^2)*SC*sign)+(40*SC)
  870
  880 IF !(info+76)<0 CALL paused:GOTO 940
  890 IF end_flag%=2 CALL paused
  900 col=!(info+76)/2
  910 IF col>11 col=11
  920 IF end_flag%=2 AND !(info+80)<=0 COLOUR col:PRINT TAB(32,10) "G A M E  O V E R":PRINT TAB(18,12) "O n  l e v e l  ",level%
  930 IF end_flag%=1 CALL game
  940 COLOUR 12
  950 PRINT TAB(0,1) "Level ";:COLOUR15:PRINT;level%:COLOUR12
  960 PRINT TAB(30,1) "Lives ";:COLOUR15:PRINT;!(info+80):COLOUR12
  970 PRINT TAB(60,1) "Remaining Tanks ";:COLOUR15:PRINT;!(info+64)-!(info+68):COLOUR12
  980IF INKEY(-99) REPEAT UNTIL INKEY(-1)
  990IF INKEY(-2) !(info+80)+=1
 1000!(info+36)=0
 1010 IF !(object_buffer)=0 AND end_flag%=1 !(info+80)-=1:!(object_buffer)=3:!(info+84)=1
 1020 IF !(info+84)=2:VDU 30:VDU 11:VDU 11:!(info+84)=0
 1030 IF !(info+84)=1:VDU 30:VDU 11:!(info+84)=2
 1040 IF !(info+80)<=0 AND end_flag%=1 end_flag%=2:!(info+72)=-2000*SC:CALL game_over:SOUND 2,-15,0,255
 1050 IF !(info+64)=!(info+68) THEN !(info+64)+=1:level%=!(info+64):!(info+68)=0:end_flag%=2
 1060 IF end_flag%=2 !(info+76)+=1
 1070 IF !(info+76)>=68 AND !(info+80)<=0 GOTO 760
 1080 IF !(info+76)>=68 GOTO 800
 1090 IF !(info+76)<0 !(info+76)+=1
 1100 IF !(info+76)<0 sign=-1 ELSE sign=1
 1110 IF !(info+80)>0 !(object_buffer+8)=((!(info+76)^2)*SC*sign)+(40*SC)
 1120 OSCLI("FX112,"+STR$(screen% EOR3)):OSCLI("FX113,"+STR$(screen%)):screen%=screen% EOR3:WAIT:CLS
 1130 GOTO 870
 1140
 1150
 1160 END
 1170
 1180
 1190 DEF PROC_ass
 1200 FOR pass%=0 TO 2 STEP 2
 1210 P%=code
 1220 [ OPT pass%
 1230 .game                          ;start of game
 1240 STMFD R13!,{R14}
 1250 BL load_info                  ;puts address of start of info table in r12
 1260
 1270 LDR R0,[R12,#36]
 1280 CMP R0,#0:BEQ no_shell
 1290 ADD R0,R0,#1
 1300 STR R0,[R12,#36]
 1310 CMP R0,#20
 1320 BNE no_shell
 1330 MOV R0,#0:STR R0,[R12,#36]
 1340 .no_shell
 1350
 1360 ;**************************** bonus ship *******************************
 1370
 1380 LDR R11,[R12]
 1390 BL random_number
 1400 CMP R0,#4:BGT no_ship
 1410 MOV R10,#0
 1420 .loop_find_free4
 1430 ADD R10,R10,#1
 1440 LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
 1450 CMP R10,#max_objects%:BGE no_ship
 1460 CMP R0,#0:BNE loop_find_free4          ;CHECK IF OBJECT IS DEAD
 1470 ADD R11,R11,R10,ASL #object_lengthlog%  ;R9 POINTS TO BEGINING OF OBJECT
 1480
 1490 MOV R0,#7:STR R0,[R11]
 1500 BL random_number:MOV R0,R0,ASL #9:SUB R0,R0,#4096*SC:STR R0,[R11,#4]
 1510 MOV R0,#4000*SC:STR R0,[R11,#8]
 1520 BL random_number:MOV R0,R0,ASL #9:SUB R0,R0,#4096*SC:STR R0,[R11,#12]
 1530 MOV R0,#4096/2:STR R0,[R11,#16]
 1540 BL random_number:STR R0,[R11,#20]
 1550 MOV R0,#0:STR R0,[R11,#24]
 1560 MOV R0,#0:STR R0,[R11,#52]
 1570 MVN R0,#50*SC:STR R0,[R11,#56]
 1580 MOV R0,#0:STR R0,[R11,#60]
 1590 MOV R0,#0:STR R0,[R11,#64]
 1600 MOV R0,#0:STR R0,[R11,#68]
 1610 MOV R0,#32:STR R0,[R11,#72]
 1620 MOV R0,#0:STR R0,[R11,#76]
 1630 MOV R0,#(8*F)^2:STR R0,[R11,#84]
 1640
 1650 .no_ship
 1660
 1670 ;**************************** key detect for movement etc **************
 1680
 1690 LDR R11,[R12]                  ;loads start address of object data in r11
 1700
 1710 LDR R10,[R12,#28]              ;movement speed
 1720
 1730 MOV R9,R11
 1740 BL hit_tank
 1750
 1760 MOV R0,#129                    ;os byte
 1770 MVN R1,#73                     ;return key
 1780 MOV R2,#&FF
 1790 SWI "OS_Byte"
 1800 CMP R1,#&FF
 1810 BLEQ shell                     ;shell instaling routine
 1820
 1830 MOV R0,#129
 1840 MVN R1,#66                     ; Z = fast spin left
 1850 MOV R2,#&FF
 1860 SWI "OS_Byte"
 1870 CMP R1,#&FF
 1880 LDREQ R9,[R11,#20]:ADDEQ R9,R9,R10:STREQ R9,[R11,#20]
 1890
 1900 MOV R0,#129
 1910 MVN R1,#81                     ; S slow spin left
 1920 MOV R2,#&FF
 1930 SWI "OS_Byte"
 1940 CMP R1,#&FF
 1950 LDREQ R9,[R11,#20]:SUBEQ R9,R9,#20:STREQ R9,[R11,#20]
 1960
 1970
 1980 MOV R0,#129
 1990 MVN R1,#97                     ;  X = fast spin right
 2000 MOV R2,#&FF
 2010 SWI "OS_Byte"
 2020 CMP R1,#&FF
 2030 LDREQ R9,[R11,#20]:SUBEQ R9,R9,R10:STREQ R9,[R11,#20]
 2040
 2050 MOV R0,#129
 2060 MVN R1,#50                     ;  D = slow spin right
 2070 MOV R2,#&FF
 2080 SWI "OS_Byte"
 2090 CMP R1,#&FF
 2100 LDREQ R9,[R11,#20]:ADDEQ R9,R9,#20:STREQ R9,[R11,#20]
 2110
 2120
 2130 MOV R0,#129
 2140 MVN R1,#79                     ;  " = forwards"
 2150 MOV R2,#&FF
 2160 SWI "OS_Byte"
 2170 CMP R1,#&FF
 2180 BNE skip_drive1
 2190 LDR R7,[R11,#20]
 2200 MOV R1,#0:LDR R3,[R12,#32]     ;speed of travel vector
 2210MOV R0,R3:MOV R3,#2:MUL R3,R0,R3
 2220 MOV R0,#16
 2230 BL rotate_y_axis               ;rotates
 2240 LDR R4,[R11,#4]
 2250 LDR R5,[R11,#12]
 2260 ADD R4,R4,R1
 2270 ADD R5,R5,R3
 2280 STR R4,[R11,#4]
 2290 STR R5,[R11,#12]
 2300 STR R1,[R11,#52]
 2310 STR R3,[R11,#60]
 2320 .skip_drive1
 2330
 2340 MOV R0,#129
 2350 MVN R1,#104                    ;  ? = backwards
 2360 MOV R2,#&FF
 2370 SWI "OS_Byte"
 2380 CMP R1,#&FF
 2390 BNE skip_drive2
 2400 LDR R7,[R11,#20]
 2410 MOV R1,#0:LDR R3,[R12,#32]     ;speed of travel vector
 2420MOV R0,R3:MOV R3,#2:MUL R3,R0,R3
 2430 MOV R0,#16
 2440 BL rotate_y_axis               ;rotates
 2450 LDR R4,[R11,#4]
 2460 LDR R5,[R11,#12]
 2470 SUB R4,R4,R1
 2480 SUB R5,R5,R3
 2490 STR R4,[R11,#4]
 2500 STR R5,[R11,#12]
 2510 MVN R1,R1
 2520 MVN R3,R3
 2530 STR R1,[R11,#52]
 2540 STR R3,[R11,#60]
 2550 .skip_drive2
 2560
 2570
 2580 MOV R10,#4096                 ;range check your rotation angle
 2590 SUB R10,R10,#1
 2600 LDR R9,[R11,#20]:AND R9,R9,R10:STR R9,[R11,#20]
 2610
 2620 B skip_paused
 2630 .paused
 2640 STMFD R13!,{R14}
 2650 BL load_info                  ;puts address of start of info table in r12
 2660 .skip_paused
 2670
 2680 ;************************** dots **************************************
 2690
 2700 MOV R0,#18:SWI 0:MOV R0,#0:SWI 0:MOV R0,#11:SWI 0
 2710 MOV R0,#69:MOV R1,#256:MOV R2,#1024-256:SWI &45:MOV R1,#254:SWI &45
 2720 LDR R11,[R12]
 2730 LDR R7,[R11,#20]
 2740 LDR R4,[R11,#4]:MOV R4,R4,ASR #8
 2750 LDR R5,[R11,#8]:MOV R5,R5,ASR #8
 2760 LDR R6,[R11,#12]:MOV R6,R6,ASR #8
 2770 LDR R11,[R12,#48]
 2780 LDR R9,[R12,#12]
 2790 MOV R10,#0
 2800 .loop_dots
 2810 LDR R1,[R11],#4
 2820 MOV R2,#0
 2830 LDR R3,[R11],#4
 2840 SUB R1,R1,R4
 2850 SUB R2,R2,R5
 2860 SUB R3,R3,R6
 2870 MOV R0,#15
 2880 BL rotate_y_axis
 2890 CMP R3,#1:BLE dot_range
 2900 CMP R3,#2048+1024:BGE dot_range
 2910 LDR R0,[R9,R3,ASL #2]
 2920 MUL R1,R0,R1
 2930 MUL R2,R0,R2
 2940 MOV R1,R1,ASR #12
 2950 MOV R2,R2,ASR #12
 2960 ADD R1,R1,#640
 2970 CMP R1,#0:BLT dot_range
 2980 CMP R1,#1280:BGE dot_range
 2990 ADD R2,R2,#512
 3000 MOV R0,#69
 3010 SWI &45
 3020 .dot_range
 3030 ADD R10,R10,#1
 3040 CMP R10,#256*2
 3050 BLT loop_dots
 3060
 3070                                        ;data
 3080 ;***************************detect hits*********************************
 3090
 3100 LDR R11,[R12]
 3110 MOV R10,#1                    ;r10 is used as counter (1 to max_objects%)
 3120 .loop_buff2
 3130 LDR R0,[R11,R10,ASL #object_lengthlog%];r0 contains object ref code
 3140 CMP R0,#0:BEQ dead_obj2                 ;check if object is dead
 3150 ADD R9,R11,R10,ASL #object_lengthlog%  ;r9 points to begining of object
 3160
 3170 CMP R0,#2
 3180 BLEQ hit_shell
 3190
 3200 CMP R0,#3                             ;if object is a tank, it follows
 3210 BLEQ hit_tank                         ;tests if tank has collided
 3220 BLEQ tank_drive                       ;driving pattern
 3230
 3240 CMP R0,#4
 3250 BEQ explo_pannel
 3260 CMP R0,#6
 3270 BEQ explo_pannel
 3280 B not_explo
 3290 .explo_pannel
 3300 LDR R1,[R9,#56]
 3310 SUB R1,R1,#.8*SC
 3320 LDR R2,[R9,#8]
 3330 LDR R3,[R12,#72]
 3340 CMP R2,R3:MVNLE R1,R1,ASR #1
 3350 STR R1,[R9,#56]
 3360 LDR R1,[R9,#64]
 3370 SUB R1,R1,#1
 3380 STR R1,[R9,#64]
 3390 CMP R1,#0
 3400 MOVLE R1,#0:STRLE R1,[R9]
 3410 .not_explo
 3420
 3430 CMP R0,#7:BNE not_bonus
 3440 BL hit_bonus
 3450 LDR R1,[R9,#8]
 3460 CMP R1,#4096*SC:MOVGE R0,#0:STRGE R0,[R9]:BGE not_bonus
 3470 CMP R1,#60
 3480 BGT not_bonus
 3490 MOV R2,#0:STR R2,[R9,#56]
 3500 LDR R1,[R9,#64]
 3510 CMP R1,#0
 3520 MOVEQ R0,#1
 3530 STREQ R0,[R9,#64]
 3540 ADD R1,R1,#1
 3550 STR R1,[R9,#64]
 3560 CMP R1,#128:MOVGE R2,#50*SC:STRGE R2,[R9,#56]:STRGE R2,[R9,#8]
 3570 AND R2,R1,#7:CMP R2,#0:BLEQ enemy_shell
 3580 .not_bonus
 3590
 3600 .dead_obj2
 3610 ADD R10,R10,#1                 ;increment count on r10
 3620 CMP R10,#max_objects%          ;check for end of count reached
 3630 BLT loop_buff2
 3640
 3650 ;********************* loop to rotate and offset objects ****************
 3660
 3670 LDR R11,[R12]
 3680 MOV R10,#1                    ;r10 is used as counter (1 to max_objects%)
 3690
 3700 LDR R4,[R11,#4]                ;r4 holds your x coord
 3710 LDR R5,[R11,#8]                ;r5 holds your y coord
 3720 LDR R6,[R11,#12]               ;r6 holds your z coord
 3730 LDR R7,[R11,#20]               ;r7 holds your facing angle (y axis)
 3740
 3750 .loop_buff
 3760 LDR R0,[R11,R10,ASL #object_lengthlog%];r0 contains object ref code
 3770 CMP R0,#0:BEQ dead_obj                 ;check if object is dead
 3780 ADD R9,R11,R10,ASL #object_lengthlog%  ;r9 points to begining of object
 3790 MOV R8,R0
 3800
 3810 MOV R2,#4096
 3820 SUB R2,R2,#1                           ;set r2=4095
 3830
 3840 LDR R1,[R9,#16]                        ;inc x ang by ang velocity
 3850 LDR R3,[R9,#68]
 3860 ADD R1,R1,R3
 3870 AND R1,R1,R2                           ;range cheek
 3880 STR R1,[R9,#16]
 3890
 3900 LDR R1,[R9,#20]                        ;repeat above for y,x angles
 3910 LDR R3,[R9,#72]
 3920 ADD R1,R1,R3
 3930 AND R1,R1,R2
 3940 STR R1,[R9,#20]
 3950
 3960 LDR R1,[R9,#24]
 3970 LDR R3,[R9,#76]
 3980 ADD R1,R1,R3
 3990 AND R1,R1,R2
 4000 STR R1,[R9,#24]
 4010
 4020 LDR R1,[R9,#16]                        ;copy x ang into temp x ang store
 4030 AND R1,R1,R2
 4040 STR R1,[R9,#40]
 4050
 4060 LDR R1,[R9,#20]                        ;copy y ang into temp y ang store
 4070 ADD R1,R1,R7                   ;exception offset ang by your y axis ang
 4080 AND R1,R1,R2
 4090 STR R1,[R9,#44]
 4100
 4110 LDR R1,[R9,#24]                        ;copy z ang into temp z ang store
 4120 AND R1,R1,R2
 4130 STR R1,[R9,#48]
 4140
 4150 LDR R1,[R9,#4]                 ;loads r1 with original x coord
 4160 LDR R2,[R9,#8]                 ;loads r2 with original y coord
 4170 LDR R3,[R9,#12]                ;loads r3 with original z coord
 4180
 4190 LDR R0,[R9,#52]                ;offset pos by velocity
 4200 ADD R1,R1,R0                   ;x
 4210 LDR R0,[R9,#56]
 4220 ADD R2,R2,R0                   ;y
 4230 LDR R0,[R9,#60]
 4240 ADD R3,R3,R0                   ;z
 4250
 4260 STR R1,[R9,#4]                 ;stores r1 with original x coord
 4270 STR R2,[R9,#8]                 ;stores r2 with original y coord
 4280 STR R3,[R9,#12]                ;stores r3 with original z coord
 4290
 4300 SUB R1,R1,R4                   ;places objects coords relative to you
 4310 SUB R2,R2,R5
 4320 SUB R3,R3,R6
 4330
 4340 MOV R1,R1,ASR #8
 4350 MOV R2,R2,ASR #8
 4360 MOV R3,R3,ASR #8
 4370
 4380 MOV R0,#17                     ;scale of input registor
 4390 BL rotate_y_axis               ;rotates object around you
 4400
 4410 STR R1,[R9,#28]                ;stores x,y,x in temp rotated locations
 4420 STR R2,[R9,#32]
 4430 STR R3,[R9,#36]
 4440
 4450
 4460 MOV R1,R1,ASR #5
 4470 MOV R3,R3,ASR #5
 4480 ADD R1,R1,#256
 4490 ADD R2,R3,#1024-256
 4500 CMP R8,#1:MOVEQ R0,#18:SWIEQ 0:MOVEQ R0,#0:SWIEQ 0:MOVEQ R0,#13:SWIEQ 0
 4510 CMP R8,#2:MOVEQ R0,#18:SWIEQ 0:MOVEQ R0,#0:SWIEQ 0:MOVEQ R0,#14:SWIEQ 0
 4520 CMP R8,#3:MOVEQ R0,#18:SWIEQ 0:MOVEQ R0,#0:SWIEQ 0:MOVEQ R0,#12:SWIEQ 0
 4530 CMP R8,#4:MOVEQ R0,#18:SWIEQ 0:MOVEQ R0,#0:SWIEQ 0:MOVEQ R0,#15:SWIEQ 0
 4540 CMP R8,#5:MOVEQ R0,#18:SWIEQ 0:MOVEQ R0,#0:SWIEQ 0:MOVEQ R0,#13:SWIEQ 0
 4550 CMP R8,#6:MOVEQ R0,#18:SWIEQ 0:MOVEQ R0,#0:SWIEQ 0:MOVEQ R0,#15:SWIEQ 0
 4560 CMP R8,#7:MOVEQ R0,#18:SWIEQ 0:MOVEQ R0,#0:SWIEQ 0:BLEQ random_number:ANDEQ R0,R0,#3:ADDEQ R0,R0,#12:SWIEQ 0
 4570 MOV R0,#69
 4580 SWI &45
 4590
 4600 .dead_obj
 4610\??????????
 4620 ADD R10,R10,#1                 ;increment count on r10
 4630 CMP R10,#max_objects%          ;check for end of count reached
 4640 BLT loop_buff
 4650
 4660 ;****************** sort out +z objects and call draw routines **********
 4670
 4680 MOV R10,#1
 4690 MOV R0,#0
 4700 STR R0,[R12,#60]
 4710 .loop_draw
 4720 LDR R0,[R11,R10,ASL #object_lengthlog%];r0 contains object ref code
 4730 CMP R0,#0:BEQ dead_obj1                ;check if object is dead
 4740 ADD R9,R11,R10,ASL #object_lengthlog%  ;r9 points to begining of object
 4750                                        ;data
 4760 LDR R4,[R9,#28]                 ;loads r4 with rotated x coord
 4770 LDR R5,[R9,#32]                 ;loads r5 with rotated y coord
 4780 LDR R6,[R9,#36]                 ;loads r6 with rotated z coord
 4790
 4800 CMP R6,#((4096*4)-512)
 4810 BGT dead_obj1
 4820 CMP R6,#45*F
 4830 BLT dead_obj1
 4840
 4850 BL vertex                      ;spins the verticies by x,y,z angles
 4860 BL draw_facets                 ;draws visable facets to screen
 4870
 4880 CMP R0,#3:BEQ detect
 4890 CMP R0,#7:BEQ detect
 4900 B dead_obj1
 4910 .detect
 4920 MOV R0,#1
 4930 CMP R4,#0
 4940 MVNLT R7,R4
 4950 MOVGE R7,R4
 4960 CMP R7,#50
 4970 STRLE R0,[R12,#60]
 4980
 4990 .dead_obj1
 5000 ADD R10,R10,#1                 ;increment count on r10
 5010 CMP R10,#max_objects%          ;check for end of count reached
 5020 BLT loop_draw
 5030
 5040 MOV R0,#18:SWI 0:MOV R0,#0:SWI 0:MOV R0,#12:SWI 0
 5050
 5060 LDR R0,[R12,#60]
 5070 CMP R0,#0
 5080 \REM BGT on_target
 5090 MOV R0,#4
 5100 MOV R1,#600
 5110 MOV R2,#492
 5120 SWI &45
 5130 MOV R0,#5
 5140 MOV R2,#472
 5150 SWI &45
 5160 MOV R1,#620
 5170 SWI &45
 5180 MOV R0,#4
 5190 MOV R1,#660
 5200 SWI &45
 5210 MOV R0,#5
 5220 MOV R1,#680
 5230 SWI &45
 5240 MOV R2,#492
 5250 SWI &45
 5260 MOV R0,#4
 5270 MOV R2,#532
 5280 SWI &45
 5290 MOV R0,#5
 5300 MOV R2,#552
 5310 SWI &45
 5320 MOV R1,#660
 5330 SWI &45
 5340 MOV R0,#4
 5350 MOV R1,#620
 5360 SWI &45
 5370 MOV R0,#5
 5380 MOV R1,#600
 5390 SWI &45
 5400 MOV R2,#532
 5410 SWI &45
 5420 \REM B off_target
 5430 BLE off_target   ; kill this to return to original program
 5440
 5450 \REM .on_target
 5460 MOV R0,#4
 5470 MOV R1,#600
 5480 MOV R2,#472
 5490 SWI &45
 5500 MOV R0,#5
 5510 MOV R1,#620
 5520 MOV R2,#492
 5530 SWI &45
 5540 MOV R0,#4
 5550 MOV R1,#660
 5560 SWI &45
 5570 MOV R0,#5
 5580 MOV R1,#680
 5590 MOV R2,#472
 5600 SWI &45
 5610 MOV R0,#4
 5620 MOV R2,#552
 5630 SWI &45
 5640 MOV R0,#5
 5650 MOV R1,#660
 5660 MOV R2,#532
 5670 SWI &45
 5680 MOV R0,#4
 5690 MOV R1,#620
 5700 SWI &45
 5710 MOV R0,#5
 5720 MOV R1,#600
 5730 MOV R2,#552
 5740 SWI &45
 5750
 5760 .off_target
 5770 LDMFD R13!,{PC}
 5780
 5790 ;****************** rotate y,z about x axis *****************************
 5800
 5810 .rotate_x_axis             ;requires r7=ang of rot,r2=y,r3=z,r0=pre shift
 5820 STMFD R13!,{R4-R11,R14}
 5830 LDR R10,[R12,#4]               ;r10 points to start of sin table
 5840 LDR R11,[R12,#8]               ;r11 points to start of cos table
 5850 LDR R4,[R10,R7,ASL #2]         ;r1 contains 'shifted' sin (r7)
 5860 LDR R5,[R11,R7,ASL #2]         ;r2 contains 'shifted' cos (r7)
 5870 MOV R4,R4,ASR R0               ;scale sin and cos by r0
 5880 MOV R5,R5,ASR R0
 5890 RSB R0,R0,#30                  ;set r0 to remaning bits of shift
 5900 MUL R6,R2,R4                   ;rotation equations on x,z about y axis
 5910 MUL R7,R3,R5
 5920 SUB R8,R6,R7
 5930 MUL R6,R3,R4
 5940 MUL R7,R2,R5
 5950 ADD R7,R6,R7
 5960 MOV R2,R7,ASR R0               ;scale result by remaning r0 bits
 5970 MOV R3,R8,ASR R0
 5980 LDMFD R13!,{R4-R11,PC}
 5990
 6000 ;****************** rotate x,z about y axis *****************************
 6010
 6020 .rotate_y_axis
 6030 STMFD R13!,{R4-R11,R14}          ; repeat as aboue routine except y axis
 6040 LDR R10,[R12,#4]
 6050 LDR R11,[R12,#8]
 6060 LDR R4,[R10,R7,ASL #2]
 6070 LDR R5,[R11,R7,ASL #2]
 6080 MOV R4,R4,ASR R0
 6090 MOV R5,R5,ASR R0
 6100 RSB R0,R0,#30
 6110 MUL R6,R1,R4
 6120 MUL R7,R3,R5
 6130 SUB R8,R6,R7
 6140 MUL R6,R3,R4
 6150 MUL R7,R1,R5
 6160 ADD R7,R6,R7
 6170 MOV R1,R7,ASR R0
 6180 MOV R3,R8,ASR R0
 6190 LDMFD R13!,{R4-R11,PC}
 6200
 6210 ;****************** rotate x,y about z axis *****************************
 6220
 6230 .rotate_z_axis
 6240 STMFD R13!,{R4-R11,R14}          ; repeat as aboue routine except z axis
 6250 LDR R10,[R12,#4]
 6260 LDR R11,[R12,#8]
 6270 LDR R4,[R10,R7,ASL #2]
 6280 LDR R5,[R11,R7,ASL #2]
 6290 MOV R4,R4,ASR R0
 6300 MOV R5,R5,ASR R0
 6310 RSB R0,R0,#30
 6320 MUL R6,R1,R4
 6330 MUL R7,R2,R5
 6340 SUB R8,R6,R7
 6350 MUL R6,R2,R4
 6360 MUL R7,R1,R5
 6370 ADD R7,R6,R7
 6380 MOV R1,R7,ASR R0
 6390 MOV R2,R8,ASR R0
 6400 LDMFD R13!,{R4-R11,PC}
 6410
 6420 ;****************** routine to explode all objects *********************
 6430
 6440 .game_over
 6450 STMFD R13!,{R14}
 6460 BL load_info
 6470 LDR R11,[R12]
 6480 MVN R10,#0
 6490 .loop_find_object2
 6500 ADD R10,R10,#1
 6510 LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
 6520 CMP R10,#max_objects%:BGE finnished
 6530 CMP R0,#0:BEQ loop_find_object2         ;CHECK IF OBJECT IS ALIVE
 6540 ADD R9,R11,R10,ASL #object_lengthlog%  ;R8 POINTS TO BEGINING OF OBJECT
 6550 MOV R7,#0:STR R7,[R9]
 6560 MOV R8,#2
 6570 BL explo
 6580 B loop_find_object2
 6590 .finnished
 6600 LDMFD R13!,{PC}
 6610
 6620 ;**************** routine to adjust vertices of object ******************
 6630
 6640 .vertex
 6650 STMFD R13!,{R0-R11,R14}
 6660 LDR R11,[R12,#16]              ;r11=address of start of verticies data
 6670 SUB R0,R0,#1                   ;r0=object ref number
 6680 ADD R11,R11,R0,ASL #10         ;offsets base coord address by object
 6690 LDR R10,[R11],#16              ;r10=number of verticies to be spun
 6700 LDR R8,[R12,#24]               ;r8=start address of temp store
 6710
 6720 .loop_vertex
 6730 LDR R1,[R11],#4                ;loads x,y,z coords of verticie
 6740 LDR R2,[R11],#4
 6750 LDR R3,[R11],#8
 6760
 6770 LDR R7,[R9,#40]                ;r7=updated angle of object
 6780 MOV R0,#10                     ;r0=shift factor for rot of 256
 6790 BL rotate_x_axis
 6800
 6810 LDR R7,[R9,#44]                ;r7=updated angle of object
 6820 MOV R0,#10                     ;r0=shift factor for rot of 256
 6830 BL rotate_y_axis
 6840
 6850 LDR R7,[R9,#48]                ;r7=updated angle of object
 6860 MOV R0,#10                     ;r0=shift factor for rot of 256
 6870 BL rotate_z_axis
 6880
 6890 ADD R1,R1,R4                   ;offset verticie by central coords of
 6900 ADD R2,R2,R5                   ;object
 6910 ADD R3,R3,R6
 6920
 6930 LDR R0,[R12,#12]               ;r0=start address of perspective table
 6940 LDR R0,[R0,R3,ASL #2]          ;r0=perspective value relative to z coord
 6950 MUL R1,R0,R1
 6960 MUL R2,R0,R2                   ;scale x,y according to perspective
 6970 MOV R1,R1,ASR #12              ;value
 6980 MOV R2,R2,ASR #12
 6990
 7000 STR R1,[R8],#4                 ;stores vertecie into temp store
 7010 STR R2,[R8],#4
 7020 STR R3,[R8],#8
 7030
 7040 SUB R10,R10,#1                 ;check for end of vertecie table
 7050 CMP R10,#0                     ;and continue loop if unfinished
 7060 BGE loop_vertex
 7070 LDMFD R13!,{R0-R11,PC}
 7080
 7090 ;******************* routine to draw objects facets *********************
 7100
 7110 .draw_facets
 7120 STMFD R13!,{R0-R11,R14}
 7130 MOV R1,#11
 7140 CMP R0,#4:BEQ fade
 7150 CMP R0,#6:BEQ fade
 7160 B skip_fade
 7170 .fade
 7180 LDR R1,[R9,#64]:CMP R1,#24:MOVGE R1,#11:MOVLT R1,R1,ASR #1
 7190 .skip_fade
 7200 LDR R11,[R12,#20]
 7210 SUB R0,R0,#1
 7220 ADD R11,R11,R0,ASL #10
 7230 LDR R10,[R11],#16
 7240 LDR R8,[R12,#24]
 7250
 7260 MOV R0,#18:SWI 0:MOV R0,#0:SWI 0:MOV R0,R1:SWI 0
 7270
 7280 .loop_facets
 7290
 7300 LDR R3,[R11],#4
 7310 ADD R7,R8,R3,ASL #4
 7320 LDR R1,[R7]
 7330 ADD R1,R1,#640
 7340 LDR R2,[R7,#4]
 7350 ADD R2,R2,#512
 7360
 7370 LDR R3,[R11],#4
 7380 ADD R7,R8,R3,ASL #4
 7390 LDR R4,[R7]
 7400 ADD R4,R4,#640
 7410 LDR R5,[R7,#4]
 7420 ADD R5,R5,#512
 7430
 7440 LDR R3,[R11],#4
 7450 ADD R7,R8,R3,ASL #4
 7460 LDR R6,[R7]
 7470 ADD R6,R6,#640
 7480 LDR R9,[R7,#4]
 7490 ADD R9,R9,#512
 7500
 7510 BL hidden_facets
 7520 CMP R0,#0
 7530 ADDLT R11,R11,#4
 7540 BLT no_plot
 7550
 7560 MOV R0,#4
 7570 SWI &45
 7580
 7590 MOV R0,#5
 7600 MOV R1,R4
 7610 MOV R2,R5
 7620 SWI &45
 7630
 7640 MOV R1,R6
 7650 MOV R2,R9
 7660 SWI &45
 7670
 7680 LDR R3,[R11],#4
 7690 ADD R7,R8,R3,ASL #4
 7700 LDR R1,[R7]
 7710 ADD R1,R1,#640
 7720 LDR R2,[R7,#4]
 7730 ADD R2,R2,#512
 7740 MOV R0,#5
 7750 SWI &45
 7760
 7770 LDR R3,[R11,#-16]
 7780 ADD R7,R8,R3,ASL #4
 7790 LDR R1,[R7]
 7800 ADD R1,R1,#640
 7810 LDR R2,[R7,#4]
 7820 ADD R2,R2,#512
 7830 MOV R0,#5
 7840 SWI &45
 7850
 7860 .no_plot
 7870 SUB R10,R10,#1
 7880 CMP R10,#0
 7890 BGT loop_facets
 7900 LDMFD R13!,{R0-R11,PC}
 7910
 7920 .hidden_facets
 7930 STMFD R13!,{R1-R11,R14}
 7940 SUB R3,R1,R4
 7950 SUB R7,R2,R5
 7960 SUB R8,R6,R4
 7970 SUB R10,R9,R5
 7980 MUL R3,R10,R3
 7990 MUL R7,R8,R7
 8000 SUB R0,R3,R7
 8010 LDMFD R13!,{R1-R11,PC}
 8020
 8030
 8040 .shell
 8050 STMFD R13!,{R1-R11,R14}
 8060 LDR R0,[R12,#36]
 8070 CMP R0,#0
 8080 BNE bin_full1
 8090 MOV R0,#1
 8100 STR R0,[R12,#36]
 8110
 8120 MOV R10,#0
 8130 .loop_find_free1
 8140 ADD R10,R10,#1
 8150 LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
 8160 CMP R10,#max_objects%:BGE bin_full1
 8170 CMP R0,#0:BNE loop_find_free1          ;CHECK IF OBJECT IS DEAD
 8180 ADD R9,R11,R10,ASL #object_lengthlog%  ;R9 POINTS TO BEGINING OF OBJECT
 8190
 8200 MOV R0,#2:STR R0,[R9]
 8210 MOV R0,#0:STR R0,[R9,#16]
 8220 MOV R0,#0:STR R0,[R9,#20]
 8230 MOV R0,#0:STR R0,[R9,#24]
 8240 MOV R0,#0:STR R0,[R9,#40]
 8250 MOV R0,#0:STR R0,[R9,#44]
 8260 MOV R0,#0:STR R0,[R9,#48]
 8270 LDR R7,[R11,#20]
 8280 MOV R1,#0:LDR R3,[R12,#32]:MOV R3,R3,ASL #2
 8290 MOV R0,#16
 8300 BL rotate_y_axis               ;rotates
 8310 STR R1,[R9,#52]
 8320 MOV R2,#0
 8330 STR R2,[R9,#56]
 8340 STR R3,[R9,#60]
 8350 MOV R4,#2
 8360 LDR R0,[R11,#4]:MLA R0,R4,R1,R0:STR R0,[R9,#4]
 8370 LDR R0,[R11,#8]:MLA R0,R4,R2,R0:STR R0,[R9,#8]
 8380 LDR R0,[R11,#12]:MLA R0,R4,R3,R0:STR R0,[R9,#12]
 8390 MOV R0,#1:STR R0,[R9,#64]
 8400 MOV R0,#123:STR R0,[R9,#68]
 8410 MOV R0,#71:STR R0,[R9,#72]
 8420 MOV R0,#53:STR R0,[R9,#76]
 8430 MOV R0,#(8*F)^2:ADD R0,R0,#(1*F)^2:STR R0,[R9,#84]
 8440
 8450 MOV R0,#1
 8460 MVN R1,#3
 8470 MOV R2,#0
 8480 MOV R3,#70
 8490 SWI "Sound_Control"
 8500
 8510 .bin_full1
 8520 LDMFD R13!,{R1-R11,PC}
 8530
 8540 ;**************************drive tank************************************
 8550 .tank_drive
 8560 STMFD R13!,{R0-R11,R14}
 8570 LDR R0,[R9,#80]
 8580 CMP R0,#0
 8590 BLEQ new_aim
 8600 CMP R0,#1
 8610 BLEQ attack
 8620 CMP R0,#2
 8630 BLEQ moving
 8640 CMP R0,#3
 8650 BLEQ turning
 8660 LDMFD R13!,{R0-R11,PC}
 8670
 8680 ;*************************give tank new aim******************************
 8690
 8700 .new_aim
 8710 STMFD R13!,{R0-R11,R14}
 8720 LDR R0,[R12,#76]
 8730 CMP R0,#0
 8740 BLT end_aim
 8750 BL random_number               ;r0=random number 0-4095
 8760 AND R1,R0,#1                   ;make r1 either 1 or 0
 8770 CMP R1,#0
 8780 BEQ new_attack                 ;if r1=0 then tank chooses to attack
 8790                                ;otherwise tank chooses to move off
 8800 AND R1,R0,#31                  ;make r1 within range 0-64
 8810 STR R1,[R9,#64]                ;store r1 as number of frames tank turns
 8820 BL random_number               ;r0=random number 0-4095
 8830 AND R1,R0,#1                   ;make r1 either 1 or 0
 8840 CMP R1,#0                      ;if r1=0 then
 8850 SUBEQ R1,R1,#1                 ;             r1=-1
 8860 LDR R2,[R12,#28]               ;r2=standard tank turning rate
 8870 MUL R3,R2,R1                   ;r3=turn left or right by turn rate
 8880 STR R3,[R9,#72]                ;new turn rate is stored for later use...
 8890 MOV R0,#3
 8900 STR R0,[R9,#80]                ;tank status is set to turning
 8910 B end_aim                      ;end of turn set up.
 8920
 8930 .new_attack
 8940 LDR R1,[R9,#64]
 8950 CMP R1,#0
 8960 BGT end_aim
 8970 MOV R1,#1
 8980 STR R1,[R9,#80]
 8990 .end_aim
 9000
 9010 LDMFD R13!,{R0-R11,PC}
 9020 ;****************************** attack **********************************
 9030
 9040 .attack
 9050 STMFD R13!,{R0-R11,R14}
 9060 LDR R7,[R9,#20]
 9070 LDR R11,[R12]
 9080
 9090 RSB R7,R7,#4096
 9100 MOV R1,#0
 9110 MOV R3,#400*SC
 9120 MOV R0,#18
 9130 BL rotate_y_axis
 9140 LDR R2,[R9,#4]
 9150 LDR R4,[R9,#12]
 9160 SUB R1,R2,R1
 9170 SUB R2,R4,R3
 9180 LDR R3,[R11,#4]
 9190 LDR R4,[R11,#12]
 9200 SUB R1,R1,R3
 9210 SUB R2,R2,R4
 9220 MOV R1,R1,ASR #8
 9230 MOV R2,R2,ASR #8
 9240 MUL R3,R1,R1
 9250 MLA R1,R2,R2,R3
 9260 STMFD R13!,{R1}
 9270
 9280 LDR R7,[R9,#20]
 9290 LDR R8,[R12,#28]
 9300 ADD R7,R7,R8
 9310 RSB R7,R7,#4096
 9320 MOV R1,#4096
 9330 SUB R1,R1,#1
 9340 AND R7,R7,R1
 9350 MOV R1,#0
 9360 MOV R3,#400*SC
 9370 MOV R0,#18
 9380 BL rotate_y_axis
 9390 LDR R2,[R9,#4]
 9400 LDR R4,[R9,#12]
 9410 SUB R1,R2,R1
 9420 SUB R2,R4,R3
 9430 LDR R3,[R11,#4]
 9440 LDR R4,[R11,#12]
 9450 SUB R1,R1,R3
 9460 SUB R2,R2,R4
 9470 MOV R1,R1,ASR #8
 9480 MOV R2,R2,ASR #8
 9490 MUL R3,R1,R1
 9500 MLA R1,R2,R2,R3
 9510 STMFD R13!,{R1}
 9520
 9530 LDR R7,[R9,#20]
 9540 LDR R8,[R12,#28]
 9550 SUB R7,R7,R8
 9560 RSB R7,R7,#4096
 9570 MOV R1,#4096
 9580 SUB R1,R1,#1
 9590 AND R7,R7,R1
 9600 MOV R1,#0
 9610 MOV R3,#400*SC
 9620 MOV R0,#18
 9630 BL rotate_y_axis
 9640 LDR R2,[R9,#4]
 9650 LDR R4,[R9,#12]
 9660 SUB R1,R2,R1
 9670 SUB R2,R4,R3
 9680 LDR R3,[R11,#4]
 9690 LDR R4,[R11,#12]
 9700 SUB R1,R1,R3
 9710 SUB R2,R2,R4
 9720 MOV R1,R1,ASR #8
 9730 MOV R2,R2,ASR #8
 9740 MUL R3,R1,R1
 9750 MLA R1,R2,R2,R3
 9760
 9770 LDMFD R13!,{R2}
 9780 LDMFD R13!,{R3}
 9790
 9800 CMP R1,R2
 9810 MOVLE R4,R1:MOVGT R4,R2
 9820 CMP R4,R3
 9830 MOVGE R4,R3
 9840
 9850 CMP R4,R1:LDREQ R5,[R9,#20]:SUBEQ R5,R5,R8:STREQ R5,[R9,#20]
 9860 CMP R4,R2:LDREQ R5,[R9,#20]:ADDEQ R5,R5,R8:STREQ R5,[R9,#20]
 9870 CMP R4,R3:BLEQ enemy_shell:MOVEQ R0,#0:STREQ R0,[R9,#80]
 9880 MOVEQ R0,#1:STREQ R0,[R9,#64]
 9890
 9900 LDMFD R13!,{R0-R11,PC}
 9910
 9920 ;******************************tank fires shell************************
 9930
 9940 .enemy_shell
 9950 STMFD R13!,{R0-R11,R14}
 9960 LDR R11,[R12]
 9970 MOV R10,#0
 9980 .loop_find_free2
 9990 ADD R10,R10,#1
10000 LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
10010 CMP R10,#max_objects%:BGE bin_full2
10020 CMP R0,#0:BNE loop_find_free2          ;CHECK IF OBJECT IS DEAD
10030 ADD R11,R11,R10,ASL #object_lengthlog%  ;R9 POINTS TO BEGINING OF OBJECT
10040
10050 MOV R0,#2:STR R0,[R11]
10060 MOV R0,#0:STR R0,[R11,#16]
10070 MOV R0,#0:STR R0,[R11,#20]
10080 MOV R0,#0:STR R0,[R11,#24]
10090 MOV R0,#0:STR R0,[R11,#40]
10100 MOV R0,#0:STR R0,[R11,#44]
10110 MOV R0,#0:STR R0,[R11,#48]
10120 LDR R7,[R9,#20]
10130 RSB R7,R7,#4096
10140 MOV R1,#0:LDR R3,[R12,#32]:MVN R3,R3,ASL #2
10150 MOV R0,#16
10160 BL rotate_y_axis               ;rotates
10170 STR R1,[R11,#52]
10180 MOV R2,#0
10190 STR R2,[R11,#56]
10200 STR R3,[R11,#60]
10210 MOV R4,#1
10220 LDR R0,[R9,#4]:MLA R0,R4,R1,R0:STR R0,[R11,#4]
10230 MOV R0,#20*SC:STR R0,[R11,#8]
10240 LDR R0,[R9,#12]:MLA R0,R4,R3,R0:STR R0,[R11,#12]
10250 MOV R0,#1:STR R0,[R11,#64]
10260 MOV R0,#123:STR R0,[R11,#68]
10270 MOV R0,#71:STR R0,[R11,#72]
10280 MOV R0,#53:STR R0,[R11,#76]
10290 MOV R0,#(8*F)^2:STR R0,[R11,#84]
10300
10310 MOV R0,#1
10320 MVN R1,#3
10330 MOV R2,#0
10340 MOV R3,#70
10350 SWI "Sound_Control"
10360
10370 .bin_full2
10380
10390 LDMFD R13!,{R0-R11,PC}
10400
10410 ;******************************turning tank*****************************
10420
10430 .turning
10440 STMFD R13!,{R0-R11,R14}
10450 LDR R1,[R9,#64]                ;r1=number of frames left to turn
10460 SUB R1,R1,#1                   ;decrement number of frames
10470 STR R1,[R9,#64]                ;store frames left
10480 CMP R1,#0                      ;end of turn?
10490 BLEQ mov_vec_set               ;if end of turn then set up movement
10500 STREQ R1,[R9,#72]              ;if end of turn then set rotation to 0
10510 LDMFD R13!,{R0-R11,PC}
10520
10530 ;*****************************moving tank********************************
10540
10550 .moving
10560 STMFD R13!,{R0-R11,R14}
10570 LDR R1,[R9,#64]                ;r1=number of frames left to move
10580 SUB R1,R1,#1                   ;decrement number of frames
10590 STR R1,[R9,#64]                ;store frames left
10600 CMP R1,#0                      ;end of move?
10610 STREQ R1,[R9,#80]              ;if end of move then set status to new aim
10620 STREQ R1,[R9,#52]              ;if end of move then set vectors to 0
10630 STREQ R1,[R9,#60]
10640 LDMFD R13!,{R0-R11,PC}
10650
10660 ;*********************set tank movement vectors**************************
10670
10680 .mov_vec_set
10690 STMFD R13!,{R0-R11,R14}
10700 LDR R7,[R9,#20]
10710 LDR R3,[R12,#32]
10720 MOV R1,#0
10730 MOV R0,#15
10740 RSB R7,R7,#4096
10750 BL rotate_y_axis
10760 MVN R1,R1
10770 MVN R3,R3
10780 STR R1,[R9,#52]
10790 STR R3,[R9,#60]
10800 BL random_number
10810 AND R1,R0,#255
10820 STR R1,[R9,#64]
10830 MOV R2,#2
10840 STR R2,[R9,#80]
10850 LDMFD R13!,{R0-R11,PC}
10860
10870 ;*************************choose random number***************************
10880
10890 .random_number
10900 STMFD R13!,{R1-R11,R14}
10910 LDR R1,[R12,#40]               ;r1=start address of rnd table
10920 LDR R2,[R12,#44]               ;r2=pointer position in table
10930 LDR R0,[R1,R2,ASL #2]          ;r0=random value
10940 ADD R2,R2,#1                   ;increase pointer value
10950 MOV R3,#4096
10960 SUB R3,R3,#1                   ;set r3 to clip range
10970 AND R2,R2,R3                   ;clip pointer within range
10980 STR R2,[R12,#44]               ;store new pointer value
10990 LDMFD R13!,{R1-R11,PC}
11000
11010 ;************************detect shell collision**************************
11020
11030 .hit_shell
11040 STMFD R13!,{R0-R11,R14}
11050 MOV R8,#1
11060 MOV R3,#0
11070 LDR R0,[R12,#52]
11080 MVN R1,R0
11090 LDR R2,[R9,#4]
11100 CMP R2,R0
11110 STRGE R3,[R9]:BLGE explo
11120 CMP R2,R1
11130 STRLE R3,[R9]:BLLE explo
11140 LDR R2,[R9,#12]
11150 CMP R2,R0
11160 STRGE R3,[R9]:BLGE explo
11170 CMP R2,R1
11180 STRLE R3,[R9]:BLLE explo
11190
11200 BL hit_detect
11210 CMP R1,#0
11220 BEQ missed
11230 MOV R8,#3
11240 LDR R2,[R1]
11250 CMP R2,#1:STREQ R3,[R9]:BLEQ explo:BEQ missed
11260 CMP R2,#5:STREQ R3,[R9]:BLEQ explo:BEQ missed
11270 CMP R2,#2:STREQ R3,[R9]:STREQ R3,[R1]:BLEQ explo:BEQ missed
11280 CMP R2,#7:BNE not_bonus_obj
11290 LDR R4,[R1,#8]
11300 CMP R4,#100*SC:BGT missed
11310 LDR R4,[R12,#64]:STR R4,[R12,#68]:MOV R8,#15:STR R3,[R9]:STR R3,[R1]:BL explo
11320 B missed
11330 .not_bonus_obj
11340 CMP R2,#3:BNE missed
11350 STR R3,[R9]:STR R3,[R1]:MOV R8,#15:BL explo
11360 CMP R1,R11:LDRNE R4,[R12,#68]:ADDNE R4,R4,#1:STRNE R4,[R12,#68]
11370
11380 .missed
11390 LDMFD R13!,{R0-R11,PC}
11400
11410 ;************************detect tank collision**************************
11420
11430 .hit_tank
11440 STMFD R13!,{R0-R11,R14}
11450 LDR R0,[R12,#52]
11460 MVN R1,R0
11470 LDR R2,[R9,#4]
11480 CMP R2,R0
11490 BLGE bounce
11500 CMP R2,R1
11510 BLLE bounce
11520 LDR R2,[R9,#12]
11530 CMP R2,R0
11540 BLGE bounce
11550 CMP R2,R1
11560 BLLE bounce
11570
11580 BL hit_detect
11590 CMP R1,#0
11600 BEQ missed2
11610 LDR R2,[R1]
11620 CMP R2,#4:BEQ missed2
11630 CMP R2,#6:BEQ missed2
11640 CMP R2,#2:BEQ missed2
11650 CMP R2,#7:BEQ missed2
11660 BL bounce
11670 .missed2
11680 LDMFD R13!,{R0-R11,PC}
11690
11700 ;**************************hit bonus************************************
11710
11720 .hit_bonus
11730 STMFD R13!,{R0-R11,R14}
11740 BL hit_detect
11750 CMP R1,#0
11760 BEQ missed_bonus
11770 LDR R2,[R9,#8]
11780 CMP R2,#100*SC
11790 BGT missed_bonus
11800 LDR R3,[R1]
11810 CMP R3,#7
11820 BEQ missed_bonus
11830 CMP R3,#4
11840 BEQ missed_bonus
11850 CMP R3,#6
11860 BEQ missed_bonus
11870 CMP R3,#2
11880 BEQ missed_bonus
11890 MOV R0,#0
11900 STR R0,[R1]
11910 MOV R8,#12
11920 BL explo
11930 .missed_bonus
11940 LDMFD R13!,{R0-R11,PC}
11950
11960 ;************************bounces tanks off objets***********************
11970
11980 .bounce
11990 STMFD R13!,{R0-R11,R14}
12000 LDR R1,[R9,#4]
12010 LDR R2,[R9,#12]
12020 LDR R3,[R9,#52]
12030 LDR R4,[R9,#60]
12040 MOV R5,#5
12050 MUL R3,R5,R3
12060 MUL R4,R5,R4
12070 SUB R1,R1,R3
12080 SUB R2,R2,R4
12090 STR R1,[R9,#4]
12100 STR R2,[R9,#12]
12110 MOV R0,#0
12120 STR R0,[R9,#80]
12130 STR R0,[R9,#52]
12140 STR R0,[R9,#56]
12150 STR R0,[R9,#60]
12160 LDMFD R13!,{R0-R11,PC}
12170
12180 ;****************************hit detection******************************
12190
12200 .hit_detect
12210 STMFD R13!,{R0,R2-R11,R14}
12220 MVN R10,#0
12230 .loop_find_object
12240 ADD R10,R10,#1
12250 LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
12260 CMP R10,#max_objects%:BGE miss
12270 CMP R0,#0:BEQ loop_find_object         ;CHECK IF OBJECT IS ALIVE
12280 ADD R8,R11,R10,ASL #object_lengthlog%  ;R8 POINTS TO BEGINING OF OBJECT
12290 CMP R8,R9:BEQ self
12300 LDR R5,[R8,#84]
12310 LDR R6,[R8,#4]
12320 LDR R7,[R8,#12]
12330
12340 LDR R2,[R9,#84]
12350 LDR R3,[R9,#4]
12360 LDR R4,[R9,#12]
12370
12380 ADD R2,R2,R5
12390 SUB R6,R3,R6
12400 SUB R7,R4,R7
12410 MOV R6,R6,ASR #8
12420 MOV R7,R7,ASR #8
12430
12440 MUL R3,R6,R6
12450 MLA R4,R7,R7,R3
12460
12470 CMP R2,R4
12480 MOVGT R1,R8
12490 BGT hit
12500 .self
12510 B loop_find_object
12520 .miss
12530 MOV R1,#0
12540 .hit
12550 LDMFD R13!,{R0,R2-R11,PC}
12560
12570 ;************************** places explosion in bin ********************
12580
12590 .explo
12600 STMFD R13!,{R0-R11,R14}
12610 LDR R1,[R9,#4]
12620 LDR R2,[R9,#8]
12630 LDR R3,[R9,#12]
12640 SUB R9,R8,#3
12650
12660 .another_panel
12670 STMFD R13!,{R1-R3}
12680 LDR R11,[R12]
12690 MOV R10,#0
12700 .loop_find_free3
12710 ADD R10,R10,#1
12720 LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
12730 CMP R10,#max_objects%:BGE bin_full3
12740 CMP R0,#0:BNE loop_find_free3          ;CHECK IF OBJECT IS DEAD
12750 ADD R11,R11,R10,ASL #object_lengthlog%  ;R9 POINTS TO BEGINING OF OBJECT
12760
12770 BL random_number
12780 CMP R0,#2048:MOVLE R0,#6:MOVGT R0,#4:STR R0,[R11]
12790 STR R1,[R11,#4]
12800 STR R2,[R11,#8]
12810 STR R3,[R11,#12]
12820 BL random_number:STR R0,[R11,#16]
12830 BL random_number:STR R0,[R11,#20]
12840 BL random_number:STR R0,[R11,#24]
12850 BL random_number:SUB R0,R0,#2^11:MOV R0,R0,ASL #1:STR R0,[R11,#52]
12860 BL random_number:STR R0,[R11,#56]
12870 BL random_number:SUB R0,R0,#2^11:MOV R0,R0,ASL #1:STR R0,[R11,#60]
12880 BL random_number:MOV R0,R0,ASR #7:ADD R0,R0,#38:STR R0,[R11,#64]
12890 BL random_number:MOV R0,R0,ASR #4:STR R0,[R11,#68]
12900 BL random_number:MOV R0,R0,ASR #4:STR R0,[R11,#72]
12910 BL random_number:MOV R0,R0,ASR #4:STR R0,[R11,#76]
12920 .bin_full3
12930 LDMFD R13!,{R1-R3}
12940 SUB R8,R8,#1
12950 CMP R8,#0:BGT another_panel
12960
12970 LDR R0,[R12,#72]:CMP R0,#0:BNE skip_sound
12980 CMP R9,#3:MOVLT R9,#3
12990 MOV R0,#2
13000 MVN R1,R9
13010 MOV R2,#50
13020 MOV R3,#0
13030 SWI "Sound_Control"
13040 .skip_sound
13050 LDMFD R13!,{R0-R11,PC}
13060
13070 ;*****************************data set up********************************
13080
13090 .load_info                    ;load address of start of info table in r12
13100 STMFD R13!,{R14}
13110 ADR R12,info
13120 LDMFD R13!,{PC}
13130 .info
13140 ]
13150 FOR loop=1 TO 100          :REM length of info table = 100
13160 [ OPT pass%
13170 EQUD 0
13180 ]
13190 NEXT loop
13200
13210 [ OPT pass%
13220
13230 ]
13240 NEXT pass%
13250 ENDPROC
13260
13270 DEFPROC_object_set_up
13280 FOR loop=0 TO max_objects%-1
13290 !(object_buffer+loop*object_length%)=0
13300 NEXT loop
13310 !(object_buffer+0)=3       :REM SETS UP YOUR TANK AS THE FIRST TANK
13320 !(object_buffer+4)=0
13330 !(object_buffer+8)=20*SC
13340 !(object_buffer+12)=0
13350 !(object_buffer+16)=0
13360 !(object_buffer+20)=0
13370 !(object_buffer+24)=0
13380 !(object_buffer+52)=0
13390 !(object_buffer+56)=0
13400 !(object_buffer+60)=0
13410 !(object_buffer+64)=0
13420 !(object_buffer+84)=(25*F)^2         :REM hit distance:\???
13430 mem=1
13440 FOR z%=1 TO 14
13450 !(object_buffer+(mem*object_length%))=(RND(2)-1)*4+1 :REM OBJECT COD BIT
13460 !(object_buffer+(mem*object_length%)+4)=(RND(6000)-3000)*SC  :REM x
13470 !(object_buffer+(mem*object_length%)+8)=0                    :REM y
13480 !(object_buffer+(mem*object_length%)+12)=(RND(6000)-3000)*SC :REM z
13490 !(object_buffer+(mem*object_length%)+16)=4096/2              :REM x angle
13500 !(object_buffer+(mem*object_length%)+20)=RND(4096)-1         :REM y angle
13510 !(object_buffer+(mem*object_length%)+24)=0                   :REM z angle
13520 !(object_buffer+(mem*object_length%)+40)=4096/2             :REM off x ang
13530 !(object_buffer+(mem*object_length%)+44)=0                  :REM off y ang
13540 !(object_buffer+(mem*object_length%)+48)=0                  :REM off z ang
13550 !(object_buffer+(mem*object_length%)+52)=0                   :REM mov vec
13560 !(object_buffer+(mem*object_length%)+56)=0                   :REM x,y,z
13570 !(object_buffer+(mem*object_length%)+60)=0
13580 !(object_buffer+(mem*object_length%)+64)=0               :REM frame count
13590 !(object_buffer+(mem*object_length%)+68)=0               :REM spin speed
13600 !(object_buffer+(mem*object_length%)+72)=0               :REM x,y,z
13610 !(object_buffer+(mem*object_length%)+76)=0
13620 !(object_buffer+(mem*object_length%)+80)=0               :REM status bit
13630 !(object_buffer+(mem*object_length%)+84)=(13*F)^2     :REM hit distance
13640 mem+=1
13650 NEXT z%
13660
13670 FOR z%=1 TO level%
13680 !(object_buffer+(mem*object_length%))=3     :REM OBJECT COD BIT
13690 !(object_buffer+(mem*object_length%)+4)=(RND(8000)-4000)*SC  :REM x
13700 !(object_buffer+(mem*object_length%)+8)=0                    :REM y
13710 !(object_buffer+(mem*object_length%)+12)=(RND(8000)-4000)*SC :REM z
13720 !(object_buffer+(mem*object_length%)+16)=4096/2              :REM x angle
13730 !(object_buffer+(mem*object_length%)+20)=RND(4096)-1          :REM y angle
13740 !(object_buffer+(mem*object_length%)+24)=0                   :REM z angle
13750 !(object_buffer+(mem*object_length%)+40)=4096/2             :REM off x ang
13760 !(object_buffer+(mem*object_length%)+44)=0                  :REM off y ang
13770 !(object_buffer+(mem*object_length%)+48)=0                  :REM off z ang
13780 !(object_buffer+(mem*object_length%)+52)=0                   :REM mov vec
13790 !(object_buffer+(mem*object_length%)+56)=0                   :REM x,y,z
13800 !(object_buffer+(mem*object_length%)+60)=0
13810 !(object_buffer+(mem*object_length%)+64)=0               :REM frame count
13820 !(object_buffer+(mem*object_length%)+68)=0               :REM spin speed
13830 !(object_buffer+(mem*object_length%)+72)=0               :REM x,y,z
13840 !(object_buffer+(mem*object_length%)+76)=0
13850 !(object_buffer+(mem*object_length%)+80)=0               :REM status bit
13860 !(object_buffer+(mem*object_length%)+84)=(15*F)^2     :REM hit distance
13870 mem+=1
13880 NEXT z%
13890 ENDPROC
13900
13910 DEFPROC_table_set_up       :REM SETS UP A DEMO OBJECT LIST (20 OBJECTS)
13920
13930 mem=0
13940 FOR angle=0 TO (2.5*PI) STEP (PI*2)/4096
13950 !(sin+mem)=SIN(angle)*2^30
13960 mem+=4
13970 NEXT angle
13980
13990 FOR loop=1 TO 4096*4
14000 !(perspective+(loop*4))=(4096/(loop/700))
14010 NEXT loop
14020
14030 READ num_obj
14040 FOR loop=1 TO num_obj
14050 mem=(loop-1)*1024
14060 READ num
14070 !(cord+mem)=num
14080 mem+=16
14090 FOR loop2=1 TO num
14100 READ X,Y,Z
14110 !(cord+mem)=X*F
14120 !(cord+mem+4)=Y*F
14130 !(cord+mem+8)=Z*F
14140 mem+=16
14150 NEXT loop2
14160 NEXT loop
14170
14180 DATA 7
14190 DATA 8, -10,0,10, 10,0,10, 10,0,-10, -10,0,-10, -3,30,3, 3,30,3, 3,30,-3, -3,30,-3
14200 DATA 8, -4,-4,4, 4,-4,4, 4,-4,-4, -4,-4,-4, -4,4,4, 4,4,4, 4,4,-4, -4,4,-4
14210 DATA 24, 6,0,14, 6,0,-14, -6,0,-14, -6,0,14, 8,3,17, 8,3,-16, -8,3,-16, -8,3,17, 4,7,0, 4,7,-11, -4,7,-11, -4,7,0, 3,10,-2, 3,11,-10, -3,11,-10, -3,10,-2
14220 DATA     1,8,15, 1,8,-.5, -1,8,-.5, -1,8,15, 1,9,15, 1,9,-1, -1,9,-1, -1,9,15
14230 DATA 4, 3,-3,0, 3,3,0, -3,3,0, -3,-3,0
14240 DATA 8, -9,0,9, 9,0,9, 9,0,-9, -9,0,-9, -9,100,9, 9,100,9, 9,100,-9, -9,100,-9
14250 DATA 4, 6,-6,0, 3,3,0, -4,4,0, -3,-3,0
14260 DATA 18, 0,5,13, 11,5,7, 11,5,-7, 0,5,-13, -11,5,-7, -11,5,7, 0,0,6, 5,0,3, 5,0,-3, 0,0,-6, -5,0,-3, -5,0,3, 0,10,6, 5,10,3, 5,10,-3, 0,10,-6, -5,10,-3, -5,10,3
14270
14280
14290 FOR loop=1 TO num_obj
14300 mem=(loop-1)*1024
14310 READ num
14320 !(facet+mem)=num
14330 mem+=16
14340 FOR loop2=1 TO num
14350 READ P1,P2,P3,P4
14360 !(facet+mem)=P1-1
14370 !(facet+mem+4)=P2-1
14380 !(facet+mem+8)=P3-1
14390 !(facet+mem+12)=P4-1
14400 mem+=16
14410 NEXT loop2
14420 NEXT loop
14430
14440 DATA 6, 1,2,3,4, 1,5,6,2, 2,6,7,3, 3,7,8,4, 4,8,5,1, 8,7,6,5
14450 DATA 6, 1,2,3,4, 1,5,6,2, 2,6,7,3, 3,7,8,4, 4,8,5,1, 8,7,6,5
14460 DATA 19, 1,2,3,4, 1,5,6,2, 2,6,7,3, 3,7,8,4, 4,8,5,1, 5,9,10,6, 6,10,11,7, 7,11,12,8, 8,12,9,5, 9,13,14,10, 10,14,15,11, 11,15,16,12, 12,16,13,9, 13,16,15,14, 19,23,24,20, 24,23,22,21, 21,22,18,17, 17,18,19,20, 20,24,21,17
14470 DATA 2, 1,2,3,4, 4,3,2,1
14480 DATA 6, 1,2,3,4, 1,5,6,2, 2,6,7,3, 3,7,8,4, 4,8,5,1, 8,7,6,5
14490 DATA 2, 1,2,3,4, 4,3,2,1
14500 DATA 16, 7,8,9,10, 10,11,12,7, 1,2,8,7, 2,3,9,8, 3,4,10,9, 4,5,11,10, 5,6,12,11, 6,1,7,12, 1,13,14,2, 2,14,15,3, 3,15,16,4, 4,16,17,5, 5,17,18,6, 6,18,13,1, 16,15,14,13, 18,17,16,13
14510
14520 FOR loop%=0 TO 4095
14530 !(rnd_angle+loop%*4)=RND(4096)-1
14540 NEXT loop%
14550
14560 FOR loop%=0 TO 1024-1
14570 !(dots+loop%*4)=(RND(8000)-4000)
14580 NEXT loop%
14590
14600 ENDPROC
14610
14620  DEFPROC_SWOP
14630 IF screen%=1 screen%=2:GOTO14670 ELSE screen%=1
14640 *FX112,1
14650 *FX113,2
14660  ENDPROC
14670 *FX112,2
14680 *FX113,1
14690  ENDPROC

� >The_Game
K � ********************************************************************
K � ************************** A I W I D *******************************
(K � ********************************************************************
2K � ************** By Stuart Cupit  and  Simon Cruse *******************
<K � ********************************************************************
FK � ************************* (c) 1/11/89 ******************************
PK � ********************************************************************
Z
d&� � �"FX15":�12:�:�" at line ";�:�
n	 � 12
x �
�	 @%=0
�	 Ƞ 2
� *CHANNELVOICE 1 Launch
� *CHANNELVOICE 2 Splash
�
� SC=2^8
� F=5
� lives%=99
�� "Start level% : "Slevel%
�level%=Slevel%
� screen%=1
�> object_length%=256          :� SIZE OF EACH OBJECT BUFFER
�L max_objects%=256            :� MAXIMUM NUMBER OF OBJECTS POSSIBLE = 256
- object_lengthlog%=�(object_length%)/�(2)
= � code 100000            :� SIZE OF GAME CODING = 100000
0 � object_buffer object_length%*max_objects%
" � sin 5120*4
, � perspective 4096*4*4
6 � cord 10000
@ � facet 10000
J � temp_cord 10000
T � rnd_angle 4096*4
^ � dots 512*4*2
h cos=sin+4096
r
|
 �_ass
�
�0 � �26,12)"Setting up.      Please wait...";
� �_table_set_up
�
� !(info)=object_buffer
� !(info+4)=sin
� !(info+8)=cos
� !(info+12)=perspective
� !(info+16)=cord
� !(info+20)=facet
� !(info+24)=temp_cord
�6 !(info+28)=64                       :� SPIN SPEED
�9 !(info+32)=64*SC                    :� DRIVING SPEED
 !(info+36)=0
 !(info+40)=rnd_angle
 !(info+44)=0
& !(info+48)=dots
0 !(info+52)=4000*SC
: !(info+56)=0
D !(info+60)=0
N !(info+64)=level%
X !(info+68)=0
b !(info+72)=0
l !(info+76)=0
v !(info+80)=lives%
� !(info+84)=0
�
�
 val=0
� � loop=0 � 11
� val+=21
� � 19,loop,16,0,val,0
� � loop
� � 19,12,16,255,0,0
� � 19,13,16,0,255,255
� � 19,14,16,255,0,255
� � 19,15,16,255,255,0
�
� level%=Slevel%
 !(info+64)=Slevel%
 !(info+68)=0
 !(info+80)=lives%
  end_flag%=1
* !(info+72)=0
4 !(info+76)=-68
> sign=-1
H �_object_set_up
RJ �("FX112,"+�(screen% �3)):�("FX113,"+�(screen%)):screen%=screen% �3:�
\8 !(object_buffer+8)=((!(info+76)^2)*SC*sign)+(40*SC)
f
p# � !(info+76)<0 � paused:� �tlC
z � end_flag%=2 � paused
� col=!(info+76)/2
� � col>11 col=11
�i � end_flag%=2 � !(info+80)<=0 � col:� �32,10) "G A M E  O V E R":� �18,12) "O n  l e v e l  ",level%
� � end_flag%=1 � game
�	 � 12
�' � �0,1) "Level ";:�15:�;level%:�12
�, � �30,1) "Lives ";:�15:�;!(info+80):�12
�A � �60,1) "Remaining Tanks ";:�15:�;!(info+64)-!(info+68):�12
�� �(-99) � � �(-1)
�� �(-2) !(info+80)+=1
�!(info+36)=0
�U � !(object_buffer)=0 � end_flag%=1 !(info+80)-=1:!(object_buffer)=3:!(info+84)=1
�/ � !(info+84)=2:� 30:� 11:� 11:!(info+84)=0
* � !(info+84)=1:� 30:� 11:!(info+84)=2
\ � !(info+80)<=0 � end_flag%=1 end_flag%=2:!(info+72)=-2000*SC:� game_over:� 2,-15,0,255
W � !(info+64)=!(info+68) � !(info+64)+=1:level%=!(info+64):!(info+68)=0:end_flag%=2
$  � end_flag%=2 !(info+76)+=1
., � !(info+76)>=68 � !(info+80)<=0 � �dxB
8 � !(info+76)>=68 � �T`C
B! � !(info+76)<0 !(info+76)+=1
L$ � !(info+76)<0 sign=-1 � sign=1
VG � !(info+80)>0 !(object_buffer+8)=((!(info+76)^2)*SC*sign)+(40*SC)
`M �("FX112,"+�(screen% �3)):�("FX113,"+�(screen%)):screen%=screen% �3:Ȗ:�
j � �DfC
t
~
� �
�
�
� � �_ass
� � pass%=0 � 2 � 2
� P%=code
� [ OPT pass%
�2 .game                          ;start of game
� STMFD R13!,{R14}
�N BL load_info                  ;puts address of start of info table in r12
�
� LDR R0,[R12,#36]
 CMP R0,#0:BEQ no_shell

 ADD R0,R0,#1
 STR R0,[R12,#36]
 CMP R0,#20
( BNE no_shell
2 MOV R0,#0:STR R0,[R12,#36]
< .no_shell
F
PM ;**************************** bonus ship *******************************
Z
d LDR R11,[R12]
n BL random_number
x CMP R0,#4:BGT no_ship
� MOV R10,#0
� .loop_find_free4
� ADD R10,R10,#1
�H LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
�& CMP R10,#max_objects%:BGE no_ship
�C CMP R0,#0:BNE loop_find_free4          ;CHECK � OBJECT IS DEAD
�H ADD R11,R11,R10,ASL #object_lengthlog%  ;R9 ȒS � BEGINING � OBJECT
�
� MOV R0,#7:STR R0,[R11]
�I BL random_number:MOV R0,R0,ASL #9:SUB R0,R0,#4096*SC:STR R0,[R11,#4]
�$ MOV R0,#4000*SC:STR R0,[R11,#8]
�J BL random_number:MOV R0,R0,ASL #9:SUB R0,R0,#4096*SC:STR R0,[R11,#12]
�$ MOV R0,#4096/2:STR R0,[R11,#16]
& BL random_number:STR R0,[R11,#20]
 MOV R0,#0:STR R0,[R11,#24]
 MOV R0,#0:STR R0,[R11,#52]
"# MVN R0,#50*SC:STR R0,[R11,#56]
, MOV R0,#0:STR R0,[R11,#60]
6 MOV R0,#0:STR R0,[R11,#64]
@ MOV R0,#0:STR R0,[R11,#68]
J  MOV R0,#32:STR R0,[R11,#72]
T MOV R0,#0:STR R0,[R11,#76]
^% MOV R0,#(8*F)^2:STR R0,[R11,#84]
h
r
 .no_ship
|
�M ;**************************** key detect for movement etc **************
�
�N LDR R11,[R12]                  ;loads start address of object data in r11
�
�3 LDR R10,[R12,#28]              ;movement speed
�
� MOV R9,R11
� BL hit_tank
�
�, MOV R0,#129                    ;os byte
�/ MVN R1,#73                     ;return key
� MOV R2,#&FF
� SWI "OS_Byte"
 CMP R1,#&FF
< BLEQ shell                     ;shell instaling routine

& MOV R0,#129
08 MVN R1,#66                     ; Z = fast spin left
: MOV R2,#&FF
D SWI "OS_Byte"
N CMP R1,#&FF
X: LDREQ R9,[R11,#20]:ADDEQ R9,R9,R10:STREQ R9,[R11,#20]
b
l MOV R0,#129
v6 MVN R1,#81                     ; S slow spin left
� MOV R2,#&FF
� SWI "OS_Byte"
� CMP R1,#&FF
�: LDREQ R9,[R11,#20]:SUBEQ R9,R9,#20:STREQ R9,[R11,#20]
�
�
� MOV R0,#129
�: MVN R1,#97                     ;  X = fast spin right
� MOV R2,#&FF
� SWI "OS_Byte"
� CMP R1,#&FF
�: LDREQ R9,[R11,#20]:SUBEQ R9,R9,R10:STREQ R9,[R11,#20]
�
 MOV R0,#129
: MVN R1,#50                     ;  D = slow spin right
 MOV R2,#&FF
  SWI "OS_Byte"
* CMP R1,#&FF
4: LDREQ R9,[R11,#20]:ADDEQ R9,R9,#20:STREQ R9,[R11,#20]
>
H
R MOV R0,#129
\4 MVN R1,#79                     ;  " = forwards"
f MOV R2,#&FF
p SWI "OS_Byte"
z CMP R1,#&FF
� BNE skip_drive1
� LDR R7,[R11,#20]
�; MOV R1,#0:LDR R3,[R12,#32]     ;speed of travel vector
�$MOV R0,R3:MOV R3,#2:MUL R3,R0,R3
� MOV R0,#16
�, BL rotate_y_axis               ;rotates
� LDR R4,[R11,#4]
� LDR R5,[R11,#12]
� ADD R4,R4,R1
� ADD R5,R5,R3
� STR R4,[R11,#4]
� STR R5,[R11,#12]
� STR R1,[R11,#52]
	 STR R3,[R11,#60]
	 .skip_drive1
	
	$ MOV R0,#129
	.4 MVN R1,#104                    ;  ? = backwards
	8 MOV R2,#&FF
	B SWI "OS_Byte"
	L CMP R1,#&FF
	V BNE skip_drive2
	` LDR R7,[R11,#20]
	j; MOV R1,#0:LDR R3,[R12,#32]     ;speed of travel vector
	t$MOV R0,R3:MOV R3,#2:MUL R3,R0,R3
	~ MOV R0,#16
	�, BL rotate_y_axis               ;rotates
	� LDR R4,[R11,#4]
	� LDR R5,[R11,#12]
	� SUB R4,R4,R1
	� SUB R5,R5,R3
	� STR R4,[R11,#4]
	� STR R5,[R11,#12]
	� MVN R1,R1
	� MVN R3,R3
	� STR R1,[R11,#52]
	� STR R3,[R11,#60]
	� .skip_drive2



C MOV R10,#4096                 ;range check your rotation angle
 SUB R10,R10,#1
(2 LDR R9,[R11,#20]:� R9,R9,R10:STR R9,[R11,#20]
2
< B skip_paused
F .paused
P STMFD R13!,{R14}
ZN BL load_info                  ;puts address of start of info table in r12
d .skip_paused
n
xL ;************************** dots **************************************
�
�6 MOV R0,#18:SWI 0:MOV R0,#0:SWI 0:MOV R0,#11:SWI 0
�H MOV R0,#69:MOV R1,#256:MOV R2,#1024-256:SWI &45:MOV R1,#254:SWI &45
� LDR R11,[R12]
� LDR R7,[R11,#20]
�% LDR R4,[R11,#4]:MOV R4,R4,ASR #8
�% LDR R5,[R11,#8]:MOV R5,R5,ASR #8
�& LDR R6,[R11,#12]:MOV R6,R6,ASR #8
� LDR R11,[R12,#48]
� LDR R9,[R12,#12]
� MOV R10,#0
� .loop_dots
� LDR R1,[R11],#4
 MOV R2,#0
 LDR R3,[R11],#4
 SUB R1,R1,R4
" SUB R2,R2,R5
, SUB R3,R3,R6
6 MOV R0,#15
@ BL rotate_y_axis
J CMP R3,#1:BLE dot_range
T$ CMP R3,#2048+1024:BGE dot_range
^ LDR R0,[R9,R3,ASL #2]
h MUL R1,R0,R1
r MUL R2,R0,R2
| MOV R1,R1,ASR #12
� MOV R2,R2,ASR #12
� ADD R1,R1,#640
� CMP R1,#0:BLT dot_range
� CMP R1,#1280:BGE dot_range
� ADD R2,R2,#512
� MOV R0,#69
� SWI &45
� .dot_range
� ADD R10,R10,#1
� CMP R10,#256*2
� BLT loop_dots
�
�1                                        ;data
M ;***************************detect hits*********************************

 LDR R11,[R12]
&N MOV R10,#1                    ;r10 is used as counter (1 to max_objects%)
0 .loop_buff2
:H LDR R0,[R11,R10,ASL #object_lengthlog%];r0 contains object ref code
DE CMP R0,#0:BEQ dead_obj2                 ;check if object is dead
NL ADD R9,R11,R10,ASL #object_lengthlog%  ;r9 points to begining of object
X
b CMP R0,#2
l BLEQ hit_shell
v
�K CMP R0,#3                             ;if object is a tank, it follows
�F BLEQ hit_tank                         ;tests if tank has collided
�; BLEQ tank_drive                       ;driving pattern
�
� CMP R0,#4
� BEQ explo_pannel
� CMP R0,#6
� BEQ explo_pannel
� B not_explo
� .explo_pannel
� LDR R1,[R9,#56]
� SUB R1,R1,#.8*SC
� LDR R2,[R9,#8]

 LDR R3,[R12,#72]

! CMP R2,R3:MVNLE R1,R1,ASR #1

 STR R1,[R9,#56]

  LDR R1,[R9,#64]

* SUB R1,R1,#1

4 STR R1,[R9,#64]

> CMP R1,#0

H MOVLE R1,#0:STRLE R1,[R9]

R .not_explo

\

f CMP R0,#7:BNE not_bonus

p BL hit_bonus

z LDR R1,[R9,#8]

�< CMP R1,#4096*SC:MOVGE R0,#0:STRGE R0,[R9]:BGE not_bonus

� CMP R1,#60

� BGT not_bonus

� MOV R2,#0:STR R2,[R9,#56]

� LDR R1,[R9,#64]

� CMP R1,#0

�
 �Q R0,#1

� STREQ R0,[R9,#64]

� ADD R1,R1,#1

� STR R1,[R9,#64]

�C CMP R1,#128:MOVGE R2,#50*SC:STRGE R2,[R9,#56]:STRGE R2,[R9,#8]

�* � R2,R1,#7:CMP R2,#0:BLEQ enemy_shell

� .not_bonus

 .dead_obj2
; ADD R10,R10,#1                 ;increment count on r10
$C CMP R10,#max_objects%          ;check for end of count reached
. BLT loop_buff2
8
BN ;********************* loop to rotate and offset objects ****************
L
V LDR R11,[R12]
`N MOV R10,#1                    ;r10 is used as counter (1 to max_objects%)
j
t: LDR R4,[R11,#4]                ;r4 holds your x coord
~: LDR R5,[R11,#8]                ;r5 holds your y coord
�: LDR R6,[R11,#12]               ;r6 holds your z coord
�H LDR R7,[R11,#20]               ;r7 holds your facing angle (y axis)
�
� .loop_buff
�H LDR R0,[R11,R10,ASL #object_lengthlog%];r0 contains object ref code
�D CMP R0,#0:BEQ dead_obj                 ;check if object is dead
�L ADD R9,R11,R10,ASL #object_lengthlog%  ;r9 points to begining of object
� MOV R8,R0
�
� MOV R2,#4096
�8 SUB R2,R2,#1                           ;set r2=4095
�
F LDR R1,[R9,#16]                        ;inc x ang by ang velocity

 LDR R3,[R9,#68]
 ADD R1,R1,R3
6 � R1,R1,R2                           ;range cheek
( STR R1,[R9,#16]
2
<H LDR R1,[R9,#20]                        ;repeat above for y,x angles
F LDR R3,[R9,#72]
P ADD R1,R1,R3
Z � R1,R1,R2
d STR R1,[R9,#20]
n
x LDR R1,[R9,#24]
� LDR R3,[R9,#76]
� ADD R1,R1,R3
� � R1,R1,R2
� STR R1,[R9,#24]
�
�M LDR R1,[R9,#16]                        ;copy x ang into temp x ang store
� � R1,R1,R2
� STR R1,[R9,#40]
�
�M LDR R1,[R9,#20]                        ;copy y ang into temp y ang store
�L ADD R1,R1,R7                   ;exception offset ang by your y axis ang
� � R1,R1,R2
� STR R1,[R9,#44]

M LDR R1,[R9,#24]                        ;copy z ang into temp z ang store
 � R1,R1,R2
" STR R1,[R9,#48]
,
6C LDR R1,[R9,#4]                 ;loads r1 with original x coord
@C LDR R2,[R9,#8]                 ;loads r2 with original y coord
JC LDR R3,[R9,#12]                ;loads r3 with original z coord
T
^; LDR R0,[R9,#52]                ;offset pos by velocity
h& ADD R1,R1,R0                   ;x
r LDR R0,[R9,#56]
|& ADD R2,R2,R0                   ;y
� LDR R0,[R9,#60]
�& ADD R3,R3,R0                   ;z
�
�D STR R1,[R9,#4]                 ;stores r1 with original x coord
�D STR R2,[R9,#8]                 ;stores r2 with original y coord
�D STR R3,[R9,#12]                ;stores r3 with original z coord
�
�J SUB R1,R1,R4                   ;places objects coords relative to you
� SUB R2,R2,R5
� SUB R3,R3,R6
�
� MOV R1,R1,ASR #8
� MOV R2,R2,ASR #8
 MOV R3,R3,ASR #8

< MOV R0,#17                     ;scale of input registor
&> BL rotate_y_axis               ;rotates object around you
0
:K STR R1,[R9,#28]                ;stores x,y,x in temp rotated locations
D STR R2,[R9,#32]
N STR R3,[R9,#36]
X
b
l MOV R1,R1,ASR #5
v MOV R3,R3,ASR #5
� ADD R1,R1,#256
� ADD R2,R3,#1024-256
�C CMP R8,#1:�Q R0,#18:SWIEQ 0:�Q R0,#0:SWIEQ 0:�Q R0,#13:SWIEQ 0
�C CMP R8,#2:�Q R0,#18:SWIEQ 0:�Q R0,#0:SWIEQ 0:�Q R0,#14:SWIEQ 0
�C CMP R8,#3:�Q R0,#18:SWIEQ 0:�Q R0,#0:SWIEQ 0:�Q R0,#12:SWIEQ 0
�C CMP R8,#4:�Q R0,#18:SWIEQ 0:�Q R0,#0:SWIEQ 0:�Q R0,#15:SWIEQ 0
�C CMP R8,#5:�Q R0,#18:SWIEQ 0:�Q R0,#0:SWIEQ 0:�Q R0,#13:SWIEQ 0
�C CMP R8,#6:�Q R0,#18:SWIEQ 0:�Q R0,#0:SWIEQ 0:�Q R0,#15:SWIEQ 0
�i CMP R8,#7:�Q R0,#18:SWIEQ 0:�Q R0,#0:SWIEQ 0:BLEQ random_number:�EQ R0,R0,#3:ADDEQ R0,R0,#12:SWIEQ 0
� MOV R0,#69
� SWI &45
�
� .dead_obj
\??????????
; ADD R10,R10,#1                 ;increment count on r10
C CMP R10,#max_objects%          ;check for end of count reached
  BLT loop_buff
*
4N ;****************** sort out +z objects and call draw routines **********
>
H MOV R10,#1
R MOV R0,#0
\ STR R0,[R12,#60]
f .loop_draw
pH LDR R0,[R11,R10,ASL #object_lengthlog%];r0 contains object ref code
zD CMP R0,#0:BEQ dead_obj1                ;check if object is dead
�L ADD R9,R11,R10,ASL #object_lengthlog%  ;r9 points to begining of object
�1                                        ;data
�C LDR R4,[R9,#28]                 ;loads r4 with rotated x coord
�C LDR R5,[R9,#32]                 ;loads r5 with rotated y coord
�C LDR R6,[R9,#36]                 ;loads r6 with rotated z coord
�
� CMP R6,#((4096*4)-512)
� BGT dead_obj1
� CMP R6,#45*F
� BLT dead_obj1
�
�H BL vertex                      ;spins the verticies by x,y,z angles
�C BL draw_facets                 ;draws visable facets to screen

 CMP R0,#3:BEQ detect
 CMP R0,#7:BEQ detect
$ B dead_obj1
. .detect
8 MOV R0,#1
B CMP R4,#0
L MVNLT R7,R4
V MOVGE R7,R4
` CMP R7,#50
j STRLE R0,[R12,#60]
t
~ .dead_obj1
�; ADD R10,R10,#1                 ;increment count on r10
�C CMP R10,#max_objects%          ;check for end of count reached
� BLT loop_draw
�
�6 MOV R0,#18:SWI 0:MOV R0,#0:SWI 0:MOV R0,#12:SWI 0
�
� LDR R0,[R12,#60]
� CMP R0,#0
� \� BGT on_target
� MOV R0,#4
� MOV R1,#600
� MOV R2,#492
 SWI &45

 MOV R0,#5
 MOV R2,#472
 SWI &45
( MOV R1,#620
2 SWI &45
< MOV R0,#4
F MOV R1,#660
P SWI &45
Z MOV R0,#5
d MOV R1,#680
n SWI &45
x MOV R2,#492
� SWI &45
� MOV R0,#4
� MOV R2,#532
� SWI &45
� MOV R0,#5
� MOV R2,#552
� SWI &45
� MOV R1,#660
� SWI &45
� MOV R0,#4
� MOV R1,#620
� SWI &45
� MOV R0,#5
 MOV R1,#600
 SWI &45
 MOV R2,#532
" SWI &45
, \� B off_target
6? BLE off_target   ; kill this to return to original program
@
J \� .on_target
T MOV R0,#4
^ MOV R1,#600
h MOV R2,#472
r SWI &45
| MOV R0,#5
� MOV R1,#620
� MOV R2,#492
� SWI &45
� MOV R0,#4
� MOV R1,#660
� SWI &45
� MOV R0,#5
� MOV R1,#680
� MOV R2,#472
� SWI &45
� MOV R0,#4
� MOV R2,#552
� SWI &45
 MOV R0,#5
 MOV R1,#660
 MOV R2,#532
& SWI &45
0 MOV R0,#4
: MOV R1,#620
D SWI &45
N MOV R0,#5
X MOV R1,#600
b MOV R2,#552
l SWI &45
v
� .off_target
� LDMFD R13!,{PC}
�
�N ;****************** rotate y,z about x axis *****************************
�
�N .rotate_x_axis             ;requires r7=ang of rot,r2=y,r3=z,r0=pre shift
� STMFD R13!,{R4-R11,R14}
�E LDR R10,[R12,#4]               ;r10 points to start of sin table
�E LDR R11,[R12,#8]               ;r11 points to start of cos table
�C LDR R4,[R10,R7,ASL #2]         ;r1 contains 'shifted' sin (r7)
�C LDR R5,[R11,R7,ASL #2]         ;r2 contains 'shifted' cos (r7)
�< MOV R4,R4,ASR R0               ;scale sin and cos by r0
� MOV R5,R5,ASR R0
E RSB R0,R0,#30                  ;set r0 to remaning bits of shift
K MUL R6,R2,R4                   ;rotation equations on x,z about y axis
 MUL R7,R3,R5
  SUB R8,R6,R7
* MUL R6,R3,R4
4 MUL R7,R2,R5
> ADD R7,R6,R7
HE MOV R2,R7,ASR R0               ;scale result by remaning r0 bits
R MOV R3,R8,ASR R0
\ LDMFD R13!,{R4-R11,PC}
f
pN ;****************** rotate x,z about y axis *****************************
z
� .rotate_y_axis
�M STMFD R13!,{R4-R11,R14}          ; repeat as aboue routine except y axis
� LDR R10,[R12,#4]
� LDR R11,[R12,#8]
� LDR R4,[R10,R7,ASL #2]
� LDR R5,[R11,R7,ASL #2]
� MOV R4,R4,ASR R0
� MOV R5,R5,ASR R0
� RSB R0,R0,#30
� MUL R6,R1,R4
� MUL R7,R3,R5
� SUB R8,R6,R7
� MUL R6,R3,R4
 MUL R7,R1,R5
 ADD R7,R6,R7
 MOV R1,R7,ASR R0
$ MOV R3,R8,ASR R0
. LDMFD R13!,{R4-R11,PC}
8
BN ;****************** rotate x,y about z axis *****************************
L
V .rotate_z_axis
`M STMFD R13!,{R4-R11,R14}          ; repeat as aboue routine except z axis
j LDR R10,[R12,#4]
t LDR R11,[R12,#8]
~ LDR R4,[R10,R7,ASL #2]
� LDR R5,[R11,R7,ASL #2]
� MOV R4,R4,ASR R0
� MOV R5,R5,ASR R0
� RSB R0,R0,#30
� MUL R6,R1,R4
� MUL R7,R2,R5
� SUB R8,R6,R7
� MUL R6,R2,R4
� MUL R7,R1,R5
� ADD R7,R6,R7
� MOV R1,R7,ASR R0
� MOV R2,R8,ASR R0
 LDMFD R13!,{R4-R11,PC}


M ;****************** routine to explode all objects *********************

( .game_over
2 STMFD R13!,{R14}
< BL load_info
F LDR R11,[R12]
P MVN R10,#0
Z .loop_find_object2
d ADD R10,R10,#1
nH LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
x( CMP R10,#max_objects%:BGE finnished
�E CMP R0,#0:BEQ loop_find_object2         ;CHECK � OBJECT IS ALIVE
�G ADD R9,R11,R10,ASL #object_lengthlog%  ;R8 ȒS � BEGINING � OBJECT
� MOV R7,#0:STR R7,[R9]
� MOV R8,#2
�
 BL explo
� B loop_find_object2
� .finnished
� LDMFD R13!,{PC}
�
�N ;**************** routine to adjust vertices of object ******************
�
� .vertex
� STMFD R13!,{R0-R11,R14}
K LDR R11,[R12,#16]              ;r11=address of start of verticies data
9 SUB R0,R0,#1                   ;r0=object ref number
I ADD R11,R11,R0,ASL #10         ;offsets base coord address by object
"G LDR R10,[R11],#16              ;r10=number of verticies to be spun
,C LDR R8,[R12,#24]               ;r8=start address of temp store
6
@ .loop_vertex
JC LDR R1,[R11],#4                ;loads x,y,z coords of verticie
T LDR R2,[R11],#4
^ LDR R3,[R11],#8
h
r? LDR R7,[R9,#40]                ;r7=updated angle of object
|C MOV R0,#10                     ;r0=shift factor for rot of 256
� BL rotate_x_axis
�
�? LDR R7,[R9,#44]                ;r7=updated angle of object
�C MOV R0,#10                     ;r0=shift factor for rot of 256
� BL rotate_y_axis
�
�? LDR R7,[R9,#48]                ;r7=updated angle of object
�C MOV R0,#10                     ;r0=shift factor for rot of 256
� BL rotate_z_axis
�
�I ADD R1,R1,R4                   ;offset verticie by central coords of
�+ ADD R2,R2,R5                   ;object
� ADD R3,R3,R6

J LDR R0,[R12,#12]               ;r0=start address of perspective table
M LDR R0,[R0,R3,ASL #2]          ;r0=perspective value relative to z coord
& MUL R1,R0,R1
0G MUL R2,R0,R2                   ;scale x,y according to perspective
:* MOV R1,R1,ASR #12              ;value
D MOV R2,R2,ASR #12
N
XD STR R1,[R8],#4                 ;stores vertecie into temp store
b STR R2,[R8],#4
l STR R3,[R8],#8
v
�D SUB R10,R10,#1                 ;check for end of vertecie table
�D CMP R10,#0                     ;and continue loop if unfinished
� BGE loop_vertex
� LDMFD R13!,{R0-R11,PC}
�
�N ;******************* routine to draw objects facets *********************
�
� .draw_facets
� STMFD R13!,{R0-R11,R14}
� MOV R1,#11
� CMP R0,#4:BEQ fade
� CMP R0,#6:BEQ fade
� B skip_fade

 .fade
? LDR R1,[R9,#64]:CMP R1,#24:MOVGE R1,#11:MOVLT R1,R1,ASR #1
 .skip_fade
  LDR R11,[R12,#20]
* SUB R0,R0,#1
4 ADD R11,R11,R0,ASL #10
> LDR R10,[R11],#16
H LDR R8,[R12,#24]
R
\5 MOV R0,#18:SWI 0:MOV R0,#0:SWI 0:MOV R0,R1:SWI 0
f
p .loop_facets
z
� LDR R3,[R11],#4
� ADD R7,R8,R3,ASL #4
� LDR R1,[R7]
� ADD R1,R1,#640
� LDR R2,[R7,#4]
� ADD R2,R2,#512
�
� LDR R3,[R11],#4
� ADD R7,R8,R3,ASL #4
� LDR R4,[R7]
� ADD R4,R4,#640
� LDR R5,[R7,#4]
� ADD R5,R5,#512

 LDR R3,[R11],#4
 ADD R7,R8,R3,ASL #4
$ LDR R6,[R7]
. ADD R6,R6,#640
8 LDR R9,[R7,#4]
B ADD R9,R9,#512
L
V BL hidden_facets
` CMP R0,#0
j ADDLT R11,R11,#4
t BLT no_plot
~
� MOV R0,#4
� SWI &45
�
� MOV R0,#5
� MOV R1,R4
� MOV R2,R5
� SWI &45
�
� MOV R1,R6
� MOV R2,R9
� SWI &45
�
 LDR R3,[R11],#4

 ADD R7,R8,R3,ASL #4
 LDR R1,[R7]
 ADD R1,R1,#640
( LDR R2,[R7,#4]
2 ADD R2,R2,#512
< MOV R0,#5
F SWI &45
P
Z LDR R3,[R11,#-16]
d ADD R7,R8,R3,ASL #4
n LDR R1,[R7]
x ADD R1,R1,#640
� LDR R2,[R7,#4]
� ADD R2,R2,#512
� MOV R0,#5
� SWI &45
�
�
 .no_plot
� SUB R10,R10,#1
� CMP R10,#0
� BGT loop_facets
� LDMFD R13!,{R0-R11,PC}
�
� .hidden_facets
� STMFD R13!,{R1-R11,R14}
 SUB R3,R1,R4
 SUB R7,R2,R5
 SUB R8,R6,R4
" SUB R10,R9,R5
, MUL R3,R10,R3
6 MUL R7,R8,R7
@ SUB R0,R3,R7
J LDMFD R13!,{R1-R11,PC}
T
^
h .shell
r STMFD R13!,{R1-R11,R14}
| LDR R0,[R12,#36]
� CMP R0,#0
� BNE bin_full1
� MOV R0,#1
� STR R0,[R12,#36]
�
� MOV R10,#0
� .loop_find_free1
� ADD R10,R10,#1
�H LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
�( CMP R10,#max_objects%:BGE bin_full1
�C CMP R0,#0:BNE loop_find_free1          ;CHECK � OBJECT IS DEAD
�G ADD R9,R11,R10,ASL #object_lengthlog%  ;R9 ȒS � BEGINING � OBJECT
�
  MOV R0,#2:STR R0,[R9]
  MOV R0,#0:STR R0,[R9,#16]
  MOV R0,#0:STR R0,[R9,#20]
 & MOV R0,#0:STR R0,[R9,#24]
 0 MOV R0,#0:STR R0,[R9,#40]
 : MOV R0,#0:STR R0,[R9,#44]
 D MOV R0,#0:STR R0,[R9,#48]
 N LDR R7,[R11,#20]
 X0 MOV R1,#0:LDR R3,[R12,#32]:MOV R3,R3,ASL #2
 b MOV R0,#16
 l, BL rotate_y_axis               ;rotates
 v STR R1,[R9,#52]
 � MOV R2,#0
 � STR R2,[R9,#56]
 � STR R3,[R9,#60]
 � MOV R4,#2
 �3 LDR R0,[R11,#4]:MLA R0,R4,R1,R0:STR R0,[R9,#4]
 �3 LDR R0,[R11,#8]:MLA R0,R4,R2,R0:STR R0,[R9,#8]
 �5 LDR R0,[R11,#12]:MLA R0,R4,R3,R0:STR R0,[R9,#12]
 � MOV R0,#1:STR R0,[R9,#64]
 �  MOV R0,#123:STR R0,[R9,#68]
 � MOV R0,#71:STR R0,[R9,#72]
 � MOV R0,#53:STR R0,[R9,#76]
 �7 MOV R0,#(8*F)^2:ADD R0,R0,#(1*F)^2:STR R0,[R9,#84]
 �
! MOV R0,#1
! MVN R1,#3
! MOV R2,#0
!  MOV R3,#70
!* SWI "Sound_Control"
!4
!> .bin_full1
!H LDMFD R13!,{R1-R11,PC}
!R
!\N ;**************************drive tank************************************
!f .tank_drive
!p STMFD R13!,{R0-R11,R14}
!z LDR R0,[R9,#80]
!� CMP R0,#0
!� BLEQ new_aim
!� CMP R0,#1
!� BLEQ attack
!� CMP R0,#2
!� BLEQ moving
!� CMP R0,#3
!� BLEQ turning
!� LDMFD R13!,{R0-R11,PC}
!�
!�N ;*************************give tank new aim******************************
!�
!�
 .new_aim
" STMFD R13!,{R0-R11,R14}
" LDR R0,[R12,#76]
" CMP R0,#0
"$ BLT end_aim
".< BL random_number               ;r0=random number 0-4095
"88 � R1,R0,#1                   ;make r1 either 1 or 0
"B CMP R1,#0
"LH BEQ new_attack                 ;if r1=0 then tank chooses to attack
"VG                                ;otherwise tank chooses to move off
"`< � R1,R0,#31                  ;make r1 within range 0-64
"jL STR R1,[R9,#64]                ;store r1 as number of frames tank turns
"t< BL random_number               ;r0=random number 0-4095
"~8 � R1,R0,#1                   ;make r1 either 1 or 0
"�1 CMP R1,#0                      ;if r1=0 then
"�7 SUBEQ R1,R1,#1                 ;             r1=-1
"�B LDR R2,[R12,#28]               ;r2=standard tank turning rate
"�G MUL R3,R2,R1                   ;r3=turn left or right by turn rate
"�M STR R3,[R9,#72]                ;new turn rate is stored for later use...
"� MOV R0,#3
"�B STR R0,[R9,#80]                ;tank status is set to turning
"�8 B end_aim                      ;end of turn set up.
"�
"� .new_attack
"� LDR R1,[R9,#64]
"� CMP R1,#0
# BGT end_aim
#
 MOV R1,#1
# STR R1,[R9,#80]
#
 .end_aim
#(
#2 LDMFD R13!,{R0-R11,PC}
#<N ;****************************** attack **********************************
#F
#P .attack
#Z STMFD R13!,{R0-R11,R14}
#d LDR R7,[R9,#20]
#n LDR R11,[R12]
#x
#� RSB R7,R7,#4096
#� MOV R1,#0
#� MOV R3,#400*SC
#� MOV R0,#18
#� BL rotate_y_axis
#� LDR R2,[R9,#4]
#� LDR R4,[R9,#12]
#� SUB R1,R2,R1
#� SUB R2,R4,R3
#� LDR R3,[R11,#4]
#� LDR R4,[R11,#12]
#� SUB R1,R1,R3
#� SUB R2,R2,R4
$ MOV R1,R1,ASR #8
$ MOV R2,R2,ASR #8
$ MUL R3,R1,R1
$" MLA R1,R2,R2,R3
$, STMFD R13!,{R1}
$6
$@ LDR R7,[R9,#20]
$J LDR R8,[R12,#28]
$T ADD R7,R7,R8
$^ RSB R7,R7,#4096
$h MOV R1,#4096
$r SUB R1,R1,#1
$| � R7,R7,R1
$� MOV R1,#0
$� MOV R3,#400*SC
$� MOV R0,#18
$� BL rotate_y_axis
$� LDR R2,[R9,#4]
$� LDR R4,[R9,#12]
$� SUB R1,R2,R1
$� SUB R2,R4,R3
$� LDR R3,[R11,#4]
$� LDR R4,[R11,#12]
$� SUB R1,R1,R3
$� SUB R2,R2,R4
$� MOV R1,R1,ASR #8
% MOV R2,R2,ASR #8
% MUL R3,R1,R1
% MLA R1,R2,R2,R3
%& STMFD R13!,{R1}
%0
%: LDR R7,[R9,#20]
%D LDR R8,[R12,#28]
%N SUB R7,R7,R8
%X RSB R7,R7,#4096
%b MOV R1,#4096
%l SUB R1,R1,#1
%v � R7,R7,R1
%� MOV R1,#0
%� MOV R3,#400*SC
%� MOV R0,#18
%� BL rotate_y_axis
%� LDR R2,[R9,#4]
%� LDR R4,[R9,#12]
%� SUB R1,R2,R1
%� SUB R2,R4,R3
%� LDR R3,[R11,#4]
%� LDR R4,[R11,#12]
%� SUB R1,R1,R3
%� SUB R2,R2,R4
%� MOV R1,R1,ASR #8
& MOV R2,R2,ASR #8
& MUL R3,R1,R1
& MLA R1,R2,R2,R3
& 
&* LDMFD R13!,{R2}
&4 LDMFD R13!,{R3}
&>
&H CMP R1,R2
&R MOVLE R4,R1:MOVGT R4,R2
&\ CMP R4,R3
&f MOVGE R4,R3
&p
&zA CMP R4,R1:LDREQ R5,[R9,#20]:SUBEQ R5,R5,R8:STREQ R5,[R9,#20]
&�A CMP R4,R2:LDREQ R5,[R9,#20]:ADDEQ R5,R5,R8:STREQ R5,[R9,#20]
&�: CMP R4,R3:BLEQ enemy_shell:�Q R0,#0:STREQ R0,[R9,#80]
&� �Q R0,#1:STREQ R0,[R9,#64]
&�
&� LDMFD R13!,{R0-R11,PC}
&�
&�L ;******************************tank fires shell************************
&�
&� .enemy_shell
&� STMFD R13!,{R0-R11,R14}
&� LDR R11,[R12]
&� MOV R10,#0
&� .loop_find_free2
' ADD R10,R10,#1
'H LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
'( CMP R10,#max_objects%:BGE bin_full2
'$C CMP R0,#0:BNE loop_find_free2          ;CHECK � OBJECT IS DEAD
'.H ADD R11,R11,R10,ASL #object_lengthlog%  ;R9 ȒS � BEGINING � OBJECT
'8
'B MOV R0,#2:STR R0,[R11]
'L MOV R0,#0:STR R0,[R11,#16]
'V MOV R0,#0:STR R0,[R11,#20]
'` MOV R0,#0:STR R0,[R11,#24]
'j MOV R0,#0:STR R0,[R11,#40]
't MOV R0,#0:STR R0,[R11,#44]
'~ MOV R0,#0:STR R0,[R11,#48]
'� LDR R7,[R9,#20]
'� RSB R7,R7,#4096
'�0 MOV R1,#0:LDR R3,[R12,#32]:MVN R3,R3,ASL #2
'� MOV R0,#16
'�, BL rotate_y_axis               ;rotates
'� STR R1,[R11,#52]
'� MOV R2,#0
'� STR R2,[R11,#56]
'� STR R3,[R11,#60]
'� MOV R4,#1
'�3 LDR R0,[R9,#4]:MLA R0,R4,R1,R0:STR R0,[R11,#4]
'�" MOV R0,#20*SC:STR R0,[R11,#8]
(5 LDR R0,[R9,#12]:MLA R0,R4,R3,R0:STR R0,[R11,#12]
(
 MOV R0,#1:STR R0,[R11,#64]
(! MOV R0,#123:STR R0,[R11,#68]
(  MOV R0,#71:STR R0,[R11,#72]
((  MOV R0,#53:STR R0,[R11,#76]
(2% MOV R0,#(8*F)^2:STR R0,[R11,#84]
(<
(F MOV R0,#1
(P MVN R1,#3
(Z MOV R2,#0
(d MOV R3,#70
(n SWI "Sound_Control"
(x
(� .bin_full2
(�
(� LDMFD R13!,{R0-R11,PC}
(�
(�M ;******************************turning tank*****************************
(�
(�
 .turning
(� STMFD R13!,{R0-R11,R14}
(�E LDR R1,[R9,#64]                ;r1=number of frames left to turn
(�? SUB R1,R1,#1                   ;decrement number of frames
(�6 STR R1,[R9,#64]                ;store frames left
(�1 CMP R1,#0                      ;end of turn?
(�H BLEQ mov_vec_set               ;if end of turn then set up movement
)J STREQ R1,[R9,#72]              ;if end of turn then set rotation to 0
) LDMFD R13!,{R0-R11,PC}
)
)"N ;*****************************moving tank********************************
),
)6 .moving
)@ STMFD R13!,{R0-R11,R14}
)JE LDR R1,[R9,#64]                ;r1=number of frames left to move
)T? SUB R1,R1,#1                   ;decrement number of frames
)^6 STR R1,[R9,#64]                ;store frames left
)h1 CMP R1,#0                      ;end of move?
)rN STREQ R1,[R9,#80]              ;if end of move then set status to new aim
)|I STREQ R1,[R9,#52]              ;if end of move then set vectors to 0
)� STREQ R1,[R9,#60]
)� LDMFD R13!,{R0-R11,PC}
)�
)�N ;*********************set tank movement vectors**************************
)�
)� .mov_vec_set
)� STMFD R13!,{R0-R11,R14}
)� LDR R7,[R9,#20]
)� LDR R3,[R12,#32]
)� MOV R1,#0
)� MOV R0,#15
)� RSB R7,R7,#4096
)� BL rotate_y_axis
* MVN R1,R1
* MVN R3,R3
* STR R1,[R9,#52]
*& STR R3,[R9,#60]
*0 BL random_number
*: � R1,R0,#255
*D STR R1,[R9,#64]
*N MOV R2,#2
*X STR R2,[R9,#80]
*b LDMFD R13!,{R0-R11,PC}
*l
*vN ;*************************choose random number***************************
*�
*� .random_number
*� STMFD R13!,{R1-R11,R14}
*�B LDR R1,[R12,#40]               ;r1=start address of rnd table
*�A LDR R2,[R12,#44]               ;r2=pointer position in table
*�4 LDR R0,[R1,R2,ASL #2]          ;r0=random value
*�; ADD R2,R2,#1                   ;increase pointer value
*� MOV R3,#4096
*�9 SUB R3,R3,#1                   ;set r3 to clip range
*�< � R2,R2,R3                   ;clip pointer within range
*�< STR R2,[R12,#44]               ;store new pointer value
*� LDMFD R13!,{R1-R11,PC}
*�
+N ;************************detect shell collision**************************
+
+ .hit_shell
+  STMFD R13!,{R0-R11,R14}
+* MOV R8,#1
+4 MOV R3,#0
+> LDR R0,[R12,#52]
+H MVN R1,R0
+R LDR R2,[R9,#4]
+\ CMP R2,R0
+f STRGE R3,[R9]:BLGE explo
+p CMP R2,R1
+z STRLE R3,[R9]:BLLE explo
+� LDR R2,[R9,#12]
+� CMP R2,R0
+� STRGE R3,[R9]:BLGE explo
+� CMP R2,R1
+� STRLE R3,[R9]:BLLE explo
+�
+� BL hit_detect
+� CMP R1,#0
+� BEQ missed
+� MOV R8,#3
+� LDR R2,[R1]
+�2 CMP R2,#1:STREQ R3,[R9]:BLEQ explo:BEQ missed
+�2 CMP R2,#5:STREQ R3,[R9]:BLEQ explo:BEQ missed
,@ CMP R2,#2:STREQ R3,[R9]:STREQ R3,[R1]:BLEQ explo:BEQ missed
,  CMP R2,#7:BNE not_bonus_obj
, LDR R4,[R1,#8]
,$ CMP R4,#100*SC:BGT missed
,.R LDR R4,[R12,#64]:STR R4,[R12,#68]:MOV R8,#15:STR R3,[R9]:STR R3,[R1]:BL explo
,8
 B missed
,B .not_bonus_obj
,L CMP R2,#3:BNE missed
,V0 STR R3,[R9]:STR R3,[R1]:MOV R8,#15:BL explo
,`D CMP R1,R11:LDRNE R4,[R12,#68]:ADDNE R4,R4,#1:STRNE R4,[R12,#68]
,j
,t .missed
,~ LDMFD R13!,{R0-R11,PC}
,�
,�M ;************************detect tank collision**************************
,�
,� .hit_tank
,� STMFD R13!,{R0-R11,R14}
,� LDR R0,[R12,#52]
,� MVN R1,R0
,� LDR R2,[R9,#4]
,� CMP R2,R0
,� BLGE bounce
,� CMP R2,R1
,� BLLE bounce
- LDR R2,[R9,#12]
-
 CMP R2,R0
- BLGE bounce
- CMP R2,R1
-( BLLE bounce
-2
-< BL hit_detect
-F CMP R1,#0
-P BEQ missed2
-Z LDR R2,[R1]
-d CMP R2,#4:BEQ missed2
-n CMP R2,#6:BEQ missed2
-x CMP R2,#2:BEQ missed2
-� CMP R2,#7:BEQ missed2
-� BL bounce
-�
 .missed2
-� LDMFD R13!,{R0-R11,PC}
-�
-�M ;**************************hit bonus************************************
-�
-� .hit_bonus
-� STMFD R13!,{R0-R11,R14}
-� BL hit_detect
-� CMP R1,#0
-� BEQ missed_bonus
-� LDR R2,[R9,#8]
. CMP R2,#100*SC
. BGT missed_bonus
. LDR R3,[R1]
." CMP R3,#7
., BEQ missed_bonus
.6 CMP R3,#4
.@ BEQ missed_bonus
.J CMP R3,#6
.T BEQ missed_bonus
.^ CMP R3,#2
.h BEQ missed_bonus
.r MOV R0,#0
.| STR R0,[R1]
.� MOV R8,#12
.�
 BL explo
.� .missed_bonus
.� LDMFD R13!,{R0-R11,PC}
.�
.�M ;************************bounces tanks off objets***********************
.�
.� .bounce
.� STMFD R13!,{R0-R11,R14}
.� LDR R1,[R9,#4]
.� LDR R2,[R9,#12]
.� LDR R3,[R9,#52]
.� LDR R4,[R9,#60]
/ MOV R5,#5
/ MUL R3,R5,R3
/ MUL R4,R5,R4
/& SUB R1,R1,R3
/0 SUB R2,R2,R4
/: STR R1,[R9,#4]
/D STR R2,[R9,#12]
/N MOV R0,#0
/X STR R0,[R9,#80]
/b STR R0,[R9,#52]
/l STR R0,[R9,#56]
/v STR R0,[R9,#60]
/� LDMFD R13!,{R0-R11,PC}
/�
/�M ;****************************hit detection******************************
/�
/� .hit_detect
/� STMFD R13!,{R0,R2-R11,R14}
/� MVN R10,#0
/� .loop_find_object
/� ADD R10,R10,#1
/�H LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
/�# CMP R10,#max_objects%:BGE miss
/�D CMP R0,#0:BEQ loop_find_object         ;CHECK � OBJECT IS ALIVE
/�G ADD R8,R11,R10,ASL #object_lengthlog%  ;R8 ȒS � BEGINING � OBJECT
0 CMP R8,R9:BEQ self
0 LDR R5,[R8,#84]
0 LDR R6,[R8,#4]
0  LDR R7,[R8,#12]
0*
04 LDR R2,[R9,#84]
0> LDR R3,[R9,#4]
0H LDR R4,[R9,#12]
0R
0\ ADD R2,R2,R5
0f SUB R6,R3,R6
0p SUB R7,R4,R7
0z MOV R6,R6,ASR #8
0� MOV R7,R7,ASR #8
0�
0� MUL R3,R6,R6
0� MLA R4,R7,R7,R3
0�
0� CMP R2,R4
0� MOVGT R1,R8
0� BGT hit
0�
 .self
0� B loop_find_object
0�
 .miss
0� MOV R1,#0
0�	 .hit
1 LDMFD R13!,{R0,R2-R11,PC}
1
1M ;************************** places explosion in bin ********************
1$
1. .explo
18 STMFD R13!,{R0-R11,R14}
1B LDR R1,[R9,#4]
1L LDR R2,[R9,#8]
1V LDR R3,[R9,#12]
1` SUB R9,R8,#3
1j
1t .another_panel
1~ STMFD R13!,{R1-R3}
1� LDR R11,[R12]
1� MOV R10,#0
1� .loop_find_free3
1� ADD R10,R10,#1
1�H LDR R0,[R11,R10,ASL #object_lengthlog%];R0 CONTAINS OBJECT REF CODE
1�( CMP R10,#max_objects%:BGE bin_full3
1�C CMP R0,#0:BNE loop_find_free3          ;CHECK � OBJECT IS DEAD
1�H ADD R11,R11,R10,ASL #object_lengthlog%  ;R9 ȒS � BEGINING � OBJECT
1�
1� BL random_number
1�6 CMP R0,#2048:MOVLE R0,#6:MOVGT R0,#4:STR R0,[R11]
1� STR R1,[R11,#4]
2 STR R2,[R11,#8]
2
 STR R3,[R11,#12]
2& BL random_number:STR R0,[R11,#16]
2& BL random_number:STR R0,[R11,#20]
2(& BL random_number:STR R0,[R11,#24]
22G BL random_number:SUB R0,R0,#2^11:MOV R0,R0,ASL #1:STR R0,[R11,#52]
2<& BL random_number:STR R0,[R11,#56]
2FG BL random_number:SUB R0,R0,#2^11:MOV R0,R0,ASL #1:STR R0,[R11,#60]
2PE BL random_number:MOV R0,R0,ASR #7:ADD R0,R0,#38:STR R0,[R11,#64]
2Z7 BL random_number:MOV R0,R0,ASR #4:STR R0,[R11,#68]
2d7 BL random_number:MOV R0,R0,ASR #4:STR R0,[R11,#72]
2n7 BL random_number:MOV R0,R0,ASR #4:STR R0,[R11,#76]
2x .bin_full3
2� LDMFD R13!,{R1-R3}
2� SUB R8,R8,#1
2�  CMP R8,#0:BGT another_panel
2�
2�. LDR R0,[R12,#72]:CMP R0,#0:BNE skip_sound
2� CMP R9,#3:MOVLT R9,#3
2� MOV R0,#2
2� MVN R1,R9
2� MOV R2,#50
2� MOV R3,#0
2� SWI "Sound_Control"
2� .skip_sound
2� LDMFD R13!,{R0-R11,PC}
3
3N ;*****************************data set up********************************
3
3"N .load_info                    ;load address of start of info table in r12
3, STMFD R13!,{R14}
36 ADR R12,info
3@ LDMFD R13!,{PC}
3J
 .info
3T ]
3^: � loop=1 � 100          :� length of info table = 100
3h [ OPT pass%
3r EQUD 0
3| ]
3� � loop
3�
3� [ OPT pass%
3�
3� ]
3� � pass%
3� �
3�
3� ��_object_set_up
3� � loop=0 � max_objects%-1
3�+ !(object_buffer+loop*object_length%)=0
3� � loop
3�F !(object_buffer+0)=3       :� SETS UP YOUR TANK AS THE FIRST TANK
4 !(object_buffer+4)=0
4 !(object_buffer+8)=20*SC
4 !(object_buffer+12)=0
4& !(object_buffer+16)=0
40 !(object_buffer+20)=0
4: !(object_buffer+24)=0
4D !(object_buffer+52)=0
4N !(object_buffer+56)=0
4X !(object_buffer+60)=0
4b !(object_buffer+64)=0
4l> !(object_buffer+84)=(25*F)^2         :� hit distance:\???
4v
 mem=1
4� � z%=1 � 14
4�I !(object_buffer+(mem*object_length%))=(�(2)-1)*4+1 :� OBJECT COD BIT
4�D !(object_buffer+(mem*object_length%)+4)=(�(6000)-3000)*SC  :� x
4�F !(object_buffer+(mem*object_length%)+8)=0                    :� y
4�D !(object_buffer+(mem*object_length%)+12)=(�(6000)-3000)*SC :� z
4�L !(object_buffer+(mem*object_length%)+16)=4096/2              :� x angle
4�J !(object_buffer+(mem*object_length%)+20)=�(4096)-1         :� y angle
4�L !(object_buffer+(mem*object_length%)+24)=0                   :� z angle
4�M !(object_buffer+(mem*object_length%)+40)=4096/2             :� off x ang
4�M !(object_buffer+(mem*object_length%)+44)=0                  :� off y ang
4�M !(object_buffer+(mem*object_length%)+48)=0                  :� off z ang
4�L !(object_buffer+(mem*object_length%)+52)=0                   :� mov vec
4�J !(object_buffer+(mem*object_length%)+56)=0                   :� x,y,z
5/ !(object_buffer+(mem*object_length%)+60)=0
5L !(object_buffer+(mem*object_length%)+64)=0               :� frame count
5K !(object_buffer+(mem*object_length%)+68)=0               :� spin speed
5 F !(object_buffer+(mem*object_length%)+72)=0               :� x,y,z
5*/ !(object_buffer+(mem*object_length%)+76)=0
54K !(object_buffer+(mem*object_length%)+80)=0               :� status bit
5>J !(object_buffer+(mem*object_length%)+84)=(13*F)^2     :� hit distance
5H mem+=1
5R	 � z%
5\
5f � z%=1 � level%
5pB !(object_buffer+(mem*object_length%))=3     :� OBJECT COD BIT
5zD !(object_buffer+(mem*object_length%)+4)=(�(8000)-4000)*SC  :� x
5�F !(object_buffer+(mem*object_length%)+8)=0                    :� y
5�D !(object_buffer+(mem*object_length%)+12)=(�(8000)-4000)*SC :� z
5�L !(object_buffer+(mem*object_length%)+16)=4096/2              :� x angle
5�K !(object_buffer+(mem*object_length%)+20)=�(4096)-1          :� y angle
5�L !(object_buffer+(mem*object_length%)+24)=0                   :� z angle
5�M !(object_buffer+(mem*object_length%)+40)=4096/2             :� off x ang
5�M !(object_buffer+(mem*object_length%)+44)=0                  :� off y ang
5�M !(object_buffer+(mem*object_length%)+48)=0                  :� off z ang
5�L !(object_buffer+(mem*object_length%)+52)=0                   :� mov vec
5�J !(object_buffer+(mem*object_length%)+56)=0                   :� x,y,z
5�/ !(object_buffer+(mem*object_length%)+60)=0
5�L !(object_buffer+(mem*object_length%)+64)=0               :� frame count
5�K !(object_buffer+(mem*object_length%)+68)=0               :� spin speed
6F !(object_buffer+(mem*object_length%)+72)=0               :� x,y,z
6/ !(object_buffer+(mem*object_length%)+76)=0
6K !(object_buffer+(mem*object_length%)+80)=0               :� status bit
6$J !(object_buffer+(mem*object_length%)+84)=(15*F)^2     :� hit distance
6. mem+=1
68	 � z%
6B �
6L
6VE ��_table_set_up       :� SETS UP A DEMO OBJECT LIST (20 OBJECTS)
6`
6j
 mem=0
6t% � angle=0 � (2.5*�) � (�*2)/4096
6~ !(sin+mem)=�(angle)*2^30
6� mem+=4
6� � angle
6�
6� � loop=1 � 4096*4
6�. !(perspective+(loop*4))=(4096/(loop/700))
6� � loop
6�
6� � num_obj
6� � loop=1 � num_obj
6� mem=(loop-1)*1024
6�
 � num
6� !(cord+mem)=num
7 mem+=16
7
 � loop2=1 � num
7 � X,Y,Z
7 !(cord+mem)=X*F
7( !(cord+mem+4)=Y*F
72 !(cord+mem+8)=Z*F
7< mem+=16
7F � loop2
7P � loop
7Z
7d � 7
7nT � 8, -10,0,10, 10,0,10, 10,0,-10, -10,0,-10, -3,30,3, 3,30,3, 3,30,-3, -3,30,-3
7xL � 8, -4,-4,4, 4,-4,4, 4,-4,-4, -4,-4,-4, -4,4,4, 4,4,4, 4,4,-4, -4,4,-4
7�� � 24, 6,0,14, 6,0,-14, -6,0,-14, -6,0,14, 8,3,17, 8,3,-16, -8,3,-16, -8,3,17, 4,7,0, 4,7,-11, -4,7,-11, -4,7,0, 3,10,-2, 3,11,-10, -3,11,-10, -3,10,-2
7�O �     1,8,15, 1,8,-.5, -1,8,-.5, -1,8,15, 1,9,15, 1,9,-1, -1,9,-1, -1,9,15
7�( � 4, 3,-3,0, 3,3,0, -3,3,0, -3,-3,0
7�P � 8, -9,0,9, 9,0,9, 9,0,-9, -9,0,-9, -9,100,9, 9,100,9, 9,100,-9, -9,100,-9
7�( � 4, 6,-6,0, 3,3,0, -4,4,0, -3,-3,0
7�� � 18, 0,5,13, 11,5,7, 11,5,-7, 0,5,-13, -11,5,-7, -11,5,7, 0,0,6, 5,0,3, 5,0,-3, 0,0,-6, -5,0,-3, -5,0,3, 0,10,6, 5,10,3, 5,10,-3, 0,10,-6, -5,10,-3, -5,10,3
7�
7�
7� � loop=1 � num_obj
7� mem=(loop-1)*1024
7�
 � num
7� !(facet+mem)=num
7� mem+=16
8 � loop2=1 � num
8 � P1,P2,P3,P4
8 !(facet+mem)=P1-1
8" !(facet+mem+4)=P2-1
8, !(facet+mem+8)=P3-1
86 !(facet+mem+12)=P4-1
8@ mem+=16
8J � loop2
8T � loop
8^
8h> � 6, 1,2,3,4, 1,5,6,2, 2,6,7,3, 3,7,8,4, 4,8,5,1, 8,7,6,5
8r> � 6, 1,2,3,4, 1,5,6,2, 2,6,7,3, 3,7,8,4, 4,8,5,1, 8,7,6,5
8|� � 19, 1,2,3,4, 1,5,6,2, 2,6,7,3, 3,7,8,4, 4,8,5,1, 5,9,10,6, 6,10,11,7, 7,11,12,8, 8,12,9,5, 9,13,14,10, 10,14,15,11, 11,15,16,12, 12,16,13,9, 13,16,15,14, 19,23,24,20, 24,23,22,21, 21,22,18,17, 17,18,19,20, 20,24,21,17
8� � 2, 1,2,3,4, 4,3,2,1
8�> � 6, 1,2,3,4, 1,5,6,2, 2,6,7,3, 3,7,8,4, 4,8,5,1, 8,7,6,5
8� � 2, 1,2,3,4, 4,3,2,1
8�� � 16, 7,8,9,10, 10,11,12,7, 1,2,8,7, 2,3,9,8, 3,4,10,9, 4,5,11,10, 5,6,12,11, 6,1,7,12, 1,13,14,2, 2,14,15,3, 3,15,16,4, 4,16,17,5, 5,17,18,6, 6,18,13,1, 16,15,14,13, 18,17,16,13
8�
8� � loop%=0 � 4095
8�# !(rnd_angle+loop%*4)=�(4096)-1
8� � loop%
8�
8� � loop%=0 � 1024-1
8�# !(dots+loop%*4)=(�(8000)-4000)
8� � loop%
8�
9 �
9
9
  ��_SWOP
9&, � screen%=1 screen%=2:�DNy � screen%=1
90
 *FX112,1
9:
 *FX113,2
9D  �
9N
 *FX112,2
9X
 *FX113,1
9b  �
�
00000000  0d 00 0a 0f f4 20 3e 54  68 65 5f 47 61 6d 65 0d  |..... >The_Game.|
00000010  00 14 4b 20 f4 20 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |..K . **********|
00000020  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000050  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 0d 00 1e 4b 20 f4  |**********...K .|
00000060  20 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  | ***************|
00000070  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 20 41 20 49 20  |*********** A I |
00000080  57 20 49 20 44 20 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |W I D **********|
00000090  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000000a0  2a 2a 2a 2a 2a 0d 00 28  4b 20 f4 20 2a 2a 2a 2a  |*****..(K . ****|
000000b0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
000000f0  0d 00 32 4b 20 f4 20 2a  2a 2a 2a 2a 2a 2a 2a 2a  |..2K . *********|
00000100  2a 2a 2a 2a 2a 20 42 79  20 53 74 75 61 72 74 20  |***** By Stuart |
00000110  43 75 70 69 74 20 20 61  6e 64 20 20 53 69 6d 6f  |Cupit  and  Simo|
00000120  6e 20 43 72 75 73 65 20  2a 2a 2a 2a 2a 2a 2a 2a  |n Cruse ********|
00000130  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 0d 00 3c 4b 20  |***********..<K |
00000140  f4 20 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |. **************|
00000150  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000180  2a 2a 2a 2a 2a 2a 0d 00  46 4b 20 f4 20 2a 2a 2a  |******..FK . ***|
00000190  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000001a0  2a 2a 2a 2a 2a 2a 20 28  63 29 20 31 2f 31 31 2f  |****** (c) 1/11/|
000001b0  38 39 20 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |89 *************|
000001c0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000001d0  2a 0d 00 50 4b 20 f4 20  2a 2a 2a 2a 2a 2a 2a 2a  |*..PK . ********|
000001e0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
00000210  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 0d 00 5a 04  |************..Z.|
00000220  0d 00 64 26 ee 20 85 20  ff 22 46 58 31 35 22 3a  |..d&. . ."FX15":|
00000230  eb 31 32 3a f6 3a f1 22  20 61 74 20 6c 69 6e 65  |.12:.:." at line|
00000240  20 22 3b 9e 3a e0 0d 00  6e 09 20 eb 20 31 32 0d  | ";.:...n. . 12.|
00000250  00 78 06 20 87 0d 00 82  09 20 40 25 3d 30 0d 00  |.x. ..... @%=0..|
00000260  8c 09 20 c8 a0 20 32 0d  00 96 1b 20 2a 43 48 41  |.. .. 2.... *CHA|
00000270  4e 4e 45 4c 56 4f 49 43  45 20 31 20 4c 61 75 6e  |NNELVOICE 1 Laun|
00000280  63 68 0d 00 a0 1b 20 2a  43 48 41 4e 4e 45 4c 56  |ch.... *CHANNELV|
00000290  4f 49 43 45 20 32 20 53  70 6c 61 73 68 0d 00 aa  |OICE 2 Splash...|
000002a0  04 0d 00 b4 0b 20 53 43  3d 32 5e 38 0d 00 be 08  |..... SC=2^8....|
000002b0  20 46 3d 35 0d 00 c8 0e  20 6c 69 76 65 73 25 3d  | F=5.... lives%=|
000002c0  39 39 0d 00 d2 1e e8 20  22 53 74 61 72 74 20 6c  |99..... "Start l|
000002d0  65 76 65 6c 25 20 3a 20  22 53 6c 65 76 65 6c 25  |evel% : "Slevel%|
000002e0  0d 00 dc 12 6c 65 76 65  6c 25 3d 53 6c 65 76 65  |....level%=Sleve|
000002f0  6c 25 0d 00 e6 0e 20 73  63 72 65 65 6e 25 3d 31  |l%.... screen%=1|
00000300  0d 00 f0 3e 20 6f 62 6a  65 63 74 5f 6c 65 6e 67  |...> object_leng|
00000310  74 68 25 3d 32 35 36 20  20 20 20 20 20 20 20 20  |th%=256         |
00000320  20 3a f4 20 53 49 5a 45  20 4f 46 20 45 41 43 48  | :. SIZE OF EACH|
00000330  20 4f 42 4a 45 43 54 20  42 55 46 46 45 52 0d 00  | OBJECT BUFFER..|
00000340  fa 4c 20 6d 61 78 5f 6f  62 6a 65 63 74 73 25 3d  |.L max_objects%=|
00000350  32 35 36 20 20 20 20 20  20 20 20 20 20 20 20 3a  |256            :|
00000360  f4 20 4d 41 58 49 4d 55  4d 20 4e 55 4d 42 45 52  |. MAXIMUM NUMBER|
00000370  20 4f 46 20 4f 42 4a 45  43 54 53 20 50 4f 53 53  | OF OBJECTS POSS|
00000380  49 42 4c 45 20 3d 20 32  35 36 0d 01 04 2d 20 6f  |IBLE = 256...- o|
00000390  62 6a 65 63 74 5f 6c 65  6e 67 74 68 6c 6f 67 25  |bject_lengthlog%|
000003a0  3d ab 28 6f 62 6a 65 63  74 5f 6c 65 6e 67 74 68  |=.(object_length|
000003b0  25 29 2f ab 28 32 29 0d  01 0e 3d 20 de 20 63 6f  |%)/.(2)...= . co|
000003c0  64 65 20 31 30 30 30 30  30 20 20 20 20 20 20 20  |de 100000       |
000003d0  20 20 20 20 20 3a f4 20  53 49 5a 45 20 4f 46 20  |     :. SIZE OF |
000003e0  47 41 4d 45 20 43 4f 44  49 4e 47 20 3d 20 31 30  |GAME CODING = 10|
000003f0  30 30 30 30 0d 01 18 30  20 de 20 6f 62 6a 65 63  |0000...0 . objec|
00000400  74 5f 62 75 66 66 65 72  20 6f 62 6a 65 63 74 5f  |t_buffer object_|
00000410  6c 65 6e 67 74 68 25 2a  6d 61 78 5f 6f 62 6a 65  |length%*max_obje|
00000420  63 74 73 25 0d 01 22 11  20 de 20 73 69 6e 20 35  |cts%..". . sin 5|
00000430  31 32 30 2a 34 0d 01 2c  1b 20 de 20 70 65 72 73  |120*4..,. . pers|
00000440  70 65 63 74 69 76 65 20  34 30 39 36 2a 34 2a 34  |pective 4096*4*4|
00000450  0d 01 36 11 20 de 20 63  6f 72 64 20 31 30 30 30  |..6. . cord 1000|
00000460  30 0d 01 40 12 20 de 20  66 61 63 65 74 20 31 30  |0..@. . facet 10|
00000470  30 30 30 0d 01 4a 16 20  de 20 74 65 6d 70 5f 63  |000..J. . temp_c|
00000480  6f 72 64 20 31 30 30 30  30 0d 01 54 17 20 de 20  |ord 10000..T. . |
00000490  72 6e 64 5f 61 6e 67 6c  65 20 34 30 39 36 2a 34  |rnd_angle 4096*4|
000004a0  0d 01 5e 13 20 de 20 64  6f 74 73 20 35 31 32 2a  |..^. . dots 512*|
000004b0  34 2a 32 0d 01 68 11 20  63 6f 73 3d 73 69 6e 2b  |4*2..h. cos=sin+|
000004c0  34 30 39 36 0d 01 72 04  0d 01 7c 0a 20 f2 5f 61  |4096..r...|. ._a|
000004d0  73 73 0d 01 86 04 0d 01  90 30 20 f1 20 8a 32 36  |ss.......0 . .26|
000004e0  2c 31 32 29 22 53 65 74  74 69 6e 67 20 75 70 2e  |,12)"Setting up.|
000004f0  20 20 20 20 20 20 50 6c  65 61 73 65 20 77 61 69  |      Please wai|
00000500  74 2e 2e 2e 22 3b 0d 01  9a 13 20 f2 5f 74 61 62  |t...";.... ._tab|
00000510  6c 65 5f 73 65 74 5f 75  70 0d 01 a4 04 0d 01 ae  |le_set_up.......|
00000520  1a 20 21 28 69 6e 66 6f  29 3d 6f 62 6a 65 63 74  |. !(info)=object|
00000530  5f 62 75 66 66 65 72 0d  01 b8 12 20 21 28 69 6e  |_buffer.... !(in|
00000540  66 6f 2b 34 29 3d 73 69  6e 0d 01 c2 12 20 21 28  |fo+4)=sin.... !(|
00000550  69 6e 66 6f 2b 38 29 3d  63 6f 73 0d 01 cc 1b 20  |info+8)=cos.... |
00000560  21 28 69 6e 66 6f 2b 31  32 29 3d 70 65 72 73 70  |!(info+12)=persp|
00000570  65 63 74 69 76 65 0d 01  d6 14 20 21 28 69 6e 66  |ective.... !(inf|
00000580  6f 2b 31 36 29 3d 63 6f  72 64 0d 01 e0 15 20 21  |o+16)=cord.... !|
00000590  28 69 6e 66 6f 2b 32 30  29 3d 66 61 63 65 74 0d  |(info+20)=facet.|
000005a0  01 ea 19 20 21 28 69 6e  66 6f 2b 32 34 29 3d 74  |... !(info+24)=t|
000005b0  65 6d 70 5f 63 6f 72 64  0d 01 f4 36 20 21 28 69  |emp_cord...6 !(i|
000005c0  6e 66 6f 2b 32 38 29 3d  36 34 20 20 20 20 20 20  |nfo+28)=64      |
000005d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000005e0  20 3a f4 20 53 50 49 4e  20 53 50 45 45 44 0d 01  | :. SPIN SPEED..|
000005f0  fe 39 20 21 28 69 6e 66  6f 2b 33 32 29 3d 36 34  |.9 !(info+32)=64|
00000600  2a 53 43 20 20 20 20 20  20 20 20 20 20 20 20 20  |*SC             |
00000610  20 20 20 20 20 20 20 3a  f4 20 44 52 49 56 49 4e  |       :. DRIVIN|
00000620  47 20 53 50 45 45 44 0d  02 08 11 20 21 28 69 6e  |G SPEED.... !(in|
00000630  66 6f 2b 33 36 29 3d 30  0d 02 12 19 20 21 28 69  |fo+36)=0.... !(i|
00000640  6e 66 6f 2b 34 30 29 3d  72 6e 64 5f 61 6e 67 6c  |nfo+40)=rnd_angl|
00000650  65 0d 02 1c 11 20 21 28  69 6e 66 6f 2b 34 34 29  |e.... !(info+44)|
00000660  3d 30 0d 02 26 14 20 21  28 69 6e 66 6f 2b 34 38  |=0..&. !(info+48|
00000670  29 3d 64 6f 74 73 0d 02  30 17 20 21 28 69 6e 66  |)=dots..0. !(inf|
00000680  6f 2b 35 32 29 3d 34 30  30 30 2a 53 43 0d 02 3a  |o+52)=4000*SC..:|
00000690  11 20 21 28 69 6e 66 6f  2b 35 36 29 3d 30 0d 02  |. !(info+56)=0..|
000006a0  44 11 20 21 28 69 6e 66  6f 2b 36 30 29 3d 30 0d  |D. !(info+60)=0.|
000006b0  02 4e 16 20 21 28 69 6e  66 6f 2b 36 34 29 3d 6c  |.N. !(info+64)=l|
000006c0  65 76 65 6c 25 0d 02 58  11 20 21 28 69 6e 66 6f  |evel%..X. !(info|
000006d0  2b 36 38 29 3d 30 0d 02  62 11 20 21 28 69 6e 66  |+68)=0..b. !(inf|
000006e0  6f 2b 37 32 29 3d 30 0d  02 6c 11 20 21 28 69 6e  |o+72)=0..l. !(in|
000006f0  66 6f 2b 37 36 29 3d 30  0d 02 76 16 20 21 28 69  |fo+76)=0..v. !(i|
00000700  6e 66 6f 2b 38 30 29 3d  6c 69 76 65 73 25 0d 02  |nfo+80)=lives%..|
00000710  80 11 20 21 28 69 6e 66  6f 2b 38 34 29 3d 30 0d  |.. !(info+84)=0.|
00000720  02 8a 04 0d 02 94 0a 20  76 61 6c 3d 30 0d 02 9e  |....... val=0...|
00000730  12 20 e3 20 6c 6f 6f 70  3d 30 20 b8 20 31 31 0d  |. . loop=0 . 11.|
00000740  02 a8 0c 20 76 61 6c 2b  3d 32 31 0d 02 b2 19 20  |... val+=21.... |
00000750  ef 20 31 39 2c 6c 6f 6f  70 2c 31 36 2c 30 2c 76  |. 19,loop,16,0,v|
00000760  61 6c 2c 30 0d 02 bc 0b  20 ed 20 6c 6f 6f 70 0d  |al,0.... . loop.|
00000770  02 c6 17 20 ef 20 31 39  2c 31 32 2c 31 36 2c 32  |... . 19,12,16,2|
00000780  35 35 2c 30 2c 30 0d 02  d0 19 20 ef 20 31 39 2c  |55,0,0.... . 19,|
00000790  31 33 2c 31 36 2c 30 2c  32 35 35 2c 32 35 35 0d  |13,16,0,255,255.|
000007a0  02 da 19 20 ef 20 31 39  2c 31 34 2c 31 36 2c 32  |... . 19,14,16,2|
000007b0  35 35 2c 30 2c 32 35 35  0d 02 e4 19 20 ef 20 31  |55,0,255.... . 1|
000007c0  39 2c 31 35 2c 31 36 2c  32 35 35 2c 32 35 35 2c  |9,15,16,255,255,|
000007d0  30 0d 02 ee 04 0d 02 f8  13 20 6c 65 76 65 6c 25  |0........ level%|
000007e0  3d 53 6c 65 76 65 6c 25  0d 03 02 17 20 21 28 69  |=Slevel%.... !(i|
000007f0  6e 66 6f 2b 36 34 29 3d  53 6c 65 76 65 6c 25 0d  |nfo+64)=Slevel%.|
00000800  03 0c 11 20 21 28 69 6e  66 6f 2b 36 38 29 3d 30  |... !(info+68)=0|
00000810  0d 03 16 16 20 21 28 69  6e 66 6f 2b 38 30 29 3d  |.... !(info+80)=|
00000820  6c 69 76 65 73 25 0d 03  20 10 20 65 6e 64 5f 66  |lives%.. . end_f|
00000830  6c 61 67 25 3d 31 0d 03  2a 11 20 21 28 69 6e 66  |lag%=1..*. !(inf|
00000840  6f 2b 37 32 29 3d 30 0d  03 34 13 20 21 28 69 6e  |o+72)=0..4. !(in|
00000850  66 6f 2b 37 36 29 3d 2d  36 38 0d 03 3e 0c 20 73  |fo+76)=-68..>. s|
00000860  69 67 6e 3d 2d 31 0d 03  48 14 20 f2 5f 6f 62 6a  |ign=-1..H. ._obj|
00000870  65 63 74 5f 73 65 74 5f  75 70 0d 03 52 4a 20 ff  |ect_set_up..RJ .|
00000880  28 22 46 58 31 31 32 2c  22 2b c3 28 73 63 72 65  |("FX112,"+.(scre|
00000890  65 6e 25 20 82 33 29 29  3a ff 28 22 46 58 31 31  |en% .3)):.("FX11|
000008a0  33 2c 22 2b c3 28 73 63  72 65 65 6e 25 29 29 3a  |3,"+.(screen%)):|
000008b0  73 63 72 65 65 6e 25 3d  73 63 72 65 65 6e 25 20  |screen%=screen% |
000008c0  82 33 3a db 0d 03 5c 38  20 21 28 6f 62 6a 65 63  |.3:...\8 !(objec|
000008d0  74 5f 62 75 66 66 65 72  2b 38 29 3d 28 28 21 28  |t_buffer+8)=((!(|
000008e0  69 6e 66 6f 2b 37 36 29  5e 32 29 2a 53 43 2a 73  |info+76)^2)*SC*s|
000008f0  69 67 6e 29 2b 28 34 30  2a 53 43 29 0d 03 66 04  |ign)+(40*SC)..f.|
00000900  0d 03 70 23 20 e7 20 21  28 69 6e 66 6f 2b 37 36  |..p# . !(info+76|
00000910  29 3c 30 20 d6 20 70 61  75 73 65 64 3a e5 20 8d  |)<0 . paused:. .|
00000920  74 6c 43 0d 03 7a 1b 20  e7 20 65 6e 64 5f 66 6c  |tlC..z. . end_fl|
00000930  61 67 25 3d 32 20 d6 20  70 61 75 73 65 64 0d 03  |ag%=2 . paused..|
00000940  84 15 20 63 6f 6c 3d 21  28 69 6e 66 6f 2b 37 36  |.. col=!(info+76|
00000950  29 2f 32 0d 03 8e 14 20  e7 20 63 6f 6c 3e 31 31  |)/2.... . col>11|
00000960  20 63 6f 6c 3d 31 31 0d  03 98 69 20 e7 20 65 6e  | col=11...i . en|
00000970  64 5f 66 6c 61 67 25 3d  32 20 80 20 21 28 69 6e  |d_flag%=2 . !(in|
00000980  66 6f 2b 38 30 29 3c 3d  30 20 fb 20 63 6f 6c 3a  |fo+80)<=0 . col:|
00000990  f1 20 8a 33 32 2c 31 30  29 20 22 47 20 41 20 4d  |. .32,10) "G A M|
000009a0  20 45 20 20 4f 20 56 20  45 20 52 22 3a f1 20 8a  | E  O V E R":. .|
000009b0  31 38 2c 31 32 29 20 22  4f 20 6e 20 20 6c 20 65  |18,12) "O n  l e|
000009c0  20 76 20 65 20 6c 20 20  22 2c 6c 65 76 65 6c 25  | v e l  ",level%|
000009d0  0d 03 a2 19 20 e7 20 65  6e 64 5f 66 6c 61 67 25  |.... . end_flag%|
000009e0  3d 31 20 d6 20 67 61 6d  65 0d 03 ac 09 20 fb 20  |=1 . game.... . |
000009f0  31 32 0d 03 b6 27 20 f1  20 8a 30 2c 31 29 20 22  |12...' . .0,1) "|
00000a00  4c 65 76 65 6c 20 22 3b  3a fb 31 35 3a f1 3b 6c  |Level ";:.15:.;l|
00000a10  65 76 65 6c 25 3a fb 31  32 0d 03 c0 2c 20 f1 20  |evel%:.12..., . |
00000a20  8a 33 30 2c 31 29 20 22  4c 69 76 65 73 20 22 3b  |.30,1) "Lives ";|
00000a30  3a fb 31 35 3a f1 3b 21  28 69 6e 66 6f 2b 38 30  |:.15:.;!(info+80|
00000a40  29 3a fb 31 32 0d 03 ca  41 20 f1 20 8a 36 30 2c  |):.12...A . .60,|
00000a50  31 29 20 22 52 65 6d 61  69 6e 69 6e 67 20 54 61  |1) "Remaining Ta|
00000a60  6e 6b 73 20 22 3b 3a fb  31 35 3a f1 3b 21 28 69  |nks ";:.15:.;!(i|
00000a70  6e 66 6f 2b 36 34 29 2d  21 28 69 6e 66 6f 2b 36  |nfo+64)-!(info+6|
00000a80  38 29 3a fb 31 32 0d 03  d4 16 e7 20 a6 28 2d 39  |8):.12..... .(-9|
00000a90  39 29 20 f5 20 fd 20 a6  28 2d 31 29 0d 03 de 19  |9) . . .(-1)....|
00000aa0  e7 20 a6 28 2d 32 29 20  21 28 69 6e 66 6f 2b 38  |. .(-2) !(info+8|
00000ab0  30 29 2b 3d 31 0d 03 e8  10 21 28 69 6e 66 6f 2b  |0)+=1....!(info+|
00000ac0  33 36 29 3d 30 0d 03 f2  55 20 e7 20 21 28 6f 62  |36)=0...U . !(ob|
00000ad0  6a 65 63 74 5f 62 75 66  66 65 72 29 3d 30 20 80  |ject_buffer)=0 .|
00000ae0  20 65 6e 64 5f 66 6c 61  67 25 3d 31 20 21 28 69  | end_flag%=1 !(i|
00000af0  6e 66 6f 2b 38 30 29 2d  3d 31 3a 21 28 6f 62 6a  |nfo+80)-=1:!(obj|
00000b00  65 63 74 5f 62 75 66 66  65 72 29 3d 33 3a 21 28  |ect_buffer)=3:!(|
00000b10  69 6e 66 6f 2b 38 34 29  3d 31 0d 03 fc 2f 20 e7  |info+84)=1.../ .|
00000b20  20 21 28 69 6e 66 6f 2b  38 34 29 3d 32 3a ef 20  | !(info+84)=2:. |
00000b30  33 30 3a ef 20 31 31 3a  ef 20 31 31 3a 21 28 69  |30:. 11:. 11:!(i|
00000b40  6e 66 6f 2b 38 34 29 3d  30 0d 04 06 2a 20 e7 20  |nfo+84)=0...* . |
00000b50  21 28 69 6e 66 6f 2b 38  34 29 3d 31 3a ef 20 33  |!(info+84)=1:. 3|
00000b60  30 3a ef 20 31 31 3a 21  28 69 6e 66 6f 2b 38 34  |0:. 11:!(info+84|
00000b70  29 3d 32 0d 04 10 5c 20  e7 20 21 28 69 6e 66 6f  |)=2...\ . !(info|
00000b80  2b 38 30 29 3c 3d 30 20  80 20 65 6e 64 5f 66 6c  |+80)<=0 . end_fl|
00000b90  61 67 25 3d 31 20 65 6e  64 5f 66 6c 61 67 25 3d  |ag%=1 end_flag%=|
00000ba0  32 3a 21 28 69 6e 66 6f  2b 37 32 29 3d 2d 32 30  |2:!(info+72)=-20|
00000bb0  30 30 2a 53 43 3a d6 20  67 61 6d 65 5f 6f 76 65  |00*SC:. game_ove|
00000bc0  72 3a d4 20 32 2c 2d 31  35 2c 30 2c 32 35 35 0d  |r:. 2,-15,0,255.|
00000bd0  04 1a 57 20 e7 20 21 28  69 6e 66 6f 2b 36 34 29  |..W . !(info+64)|
00000be0  3d 21 28 69 6e 66 6f 2b  36 38 29 20 8c 20 21 28  |=!(info+68) . !(|
00000bf0  69 6e 66 6f 2b 36 34 29  2b 3d 31 3a 6c 65 76 65  |info+64)+=1:leve|
00000c00  6c 25 3d 21 28 69 6e 66  6f 2b 36 34 29 3a 21 28  |l%=!(info+64):!(|
00000c10  69 6e 66 6f 2b 36 38 29  3d 30 3a 65 6e 64 5f 66  |info+68)=0:end_f|
00000c20  6c 61 67 25 3d 32 0d 04  24 20 20 e7 20 65 6e 64  |lag%=2..$  . end|
00000c30  5f 66 6c 61 67 25 3d 32  20 21 28 69 6e 66 6f 2b  |_flag%=2 !(info+|
00000c40  37 36 29 2b 3d 31 0d 04  2e 2c 20 e7 20 21 28 69  |76)+=1..., . !(i|
00000c50  6e 66 6f 2b 37 36 29 3e  3d 36 38 20 80 20 21 28  |nfo+76)>=68 . !(|
00000c60  69 6e 66 6f 2b 38 30 29  3c 3d 30 20 e5 20 8d 64  |info+80)<=0 . .d|
00000c70  78 42 0d 04 38 1c 20 e7  20 21 28 69 6e 66 6f 2b  |xB..8. . !(info+|
00000c80  37 36 29 3e 3d 36 38 20  e5 20 8d 54 60 43 0d 04  |76)>=68 . .T`C..|
00000c90  42 21 20 e7 20 21 28 69  6e 66 6f 2b 37 36 29 3c  |B! . !(info+76)<|
00000ca0  30 20 21 28 69 6e 66 6f  2b 37 36 29 2b 3d 31 0d  |0 !(info+76)+=1.|
00000cb0  04 4c 24 20 e7 20 21 28  69 6e 66 6f 2b 37 36 29  |.L$ . !(info+76)|
00000cc0  3c 30 20 73 69 67 6e 3d  2d 31 20 8b 20 73 69 67  |<0 sign=-1 . sig|
00000cd0  6e 3d 31 0d 04 56 47 20  e7 20 21 28 69 6e 66 6f  |n=1..VG . !(info|
00000ce0  2b 38 30 29 3e 30 20 21  28 6f 62 6a 65 63 74 5f  |+80)>0 !(object_|
00000cf0  62 75 66 66 65 72 2b 38  29 3d 28 28 21 28 69 6e  |buffer+8)=((!(in|
00000d00  66 6f 2b 37 36 29 5e 32  29 2a 53 43 2a 73 69 67  |fo+76)^2)*SC*sig|
00000d10  6e 29 2b 28 34 30 2a 53  43 29 0d 04 60 4d 20 ff  |n)+(40*SC)..`M .|
00000d20  28 22 46 58 31 31 32 2c  22 2b c3 28 73 63 72 65  |("FX112,"+.(scre|
00000d30  65 6e 25 20 82 33 29 29  3a ff 28 22 46 58 31 31  |en% .3)):.("FX11|
00000d40  33 2c 22 2b c3 28 73 63  72 65 65 6e 25 29 29 3a  |3,"+.(screen%)):|
00000d50  73 63 72 65 65 6e 25 3d  73 63 72 65 65 6e 25 20  |screen%=screen% |
00000d60  82 33 3a c8 96 3a db 0d  04 6a 0b 20 e5 20 8d 44  |.3:..:...j. . .D|
00000d70  66 43 0d 04 74 04 0d 04  7e 04 0d 04 88 06 20 e0  |fC..t...~..... .|
00000d80  0d 04 92 04 0d 04 9c 04  0d 04 a6 0c 20 dd 20 f2  |............ . .|
00000d90  5f 61 73 73 0d 04 b0 16  20 e3 20 70 61 73 73 25  |_ass.... . pass%|
00000da0  3d 30 20 b8 20 32 20 88  20 32 0d 04 ba 0c 20 50  |=0 . 2 . 2.... P|
00000db0  25 3d 63 6f 64 65 0d 04  c4 10 20 5b 20 4f 50 54  |%=code.... [ OPT|
00000dc0  20 70 61 73 73 25 0d 04  ce 32 20 2e 67 61 6d 65  | pass%...2 .game|
00000dd0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000de0  20 20 20 20 20 20 20 20  20 20 3b 73 74 61 72 74  |          ;start|
00000df0  20 6f 66 20 67 61 6d 65  0d 04 d8 15 20 53 54 4d  | of game.... STM|
00000e00  46 44 20 52 31 33 21 2c  7b 52 31 34 7d 0d 04 e2  |FD R13!,{R14}...|
00000e10  4e 20 42 4c 20 6c 6f 61  64 5f 69 6e 66 6f 20 20  |N BL load_info  |
00000e20  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00000e30  3b 70 75 74 73 20 61 64  64 72 65 73 73 20 6f 66  |;puts address of|
00000e40  20 73 74 61 72 74 20 6f  66 20 69 6e 66 6f 20 74  | start of info t|
00000e50  61 62 6c 65 20 69 6e 20  72 31 32 0d 04 ec 04 0d  |able in r12.....|
00000e60  04 f6 15 20 4c 44 52 20  52 30 2c 5b 52 31 32 2c  |... LDR R0,[R12,|
00000e70  23 33 36 5d 0d 05 00 1b  20 43 4d 50 20 52 30 2c  |#36].... CMP R0,|
00000e80  23 30 3a 42 45 51 20 6e  6f 5f 73 68 65 6c 6c 0d  |#0:BEQ no_shell.|
00000e90  05 0a 11 20 41 44 44 20  52 30 2c 52 30 2c 23 31  |... ADD R0,R0,#1|
00000ea0  0d 05 14 15 20 53 54 52  20 52 30 2c 5b 52 31 32  |.... STR R0,[R12|
00000eb0  2c 23 33 36 5d 0d 05 1e  0f 20 43 4d 50 20 52 30  |,#36].... CMP R0|
00000ec0  2c 23 32 30 0d 05 28 11  20 42 4e 45 20 6e 6f 5f  |,#20..(. BNE no_|
00000ed0  73 68 65 6c 6c 0d 05 32  1f 20 4d 4f 56 20 52 30  |shell..2. MOV R0|
00000ee0  2c 23 30 3a 53 54 52 20  52 30 2c 5b 52 31 32 2c  |,#0:STR R0,[R12,|
00000ef0  23 33 36 5d 0d 05 3c 0e  20 2e 6e 6f 5f 73 68 65  |#36]..<. .no_she|
00000f00  6c 6c 0d 05 46 04 0d 05  50 4d 20 3b 2a 2a 2a 2a  |ll..F...PM ;****|
00000f10  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00000f20  2a 2a 2a 2a 2a 2a 2a 2a  20 62 6f 6e 75 73 20 73  |******** bonus s|
00000f30  68 69 70 20 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |hip ************|
00000f40  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00000f50  2a 2a 2a 0d 05 5a 04 0d  05 64 12 20 4c 44 52 20  |***..Z...d. LDR |
00000f60  52 31 31 2c 5b 52 31 32  5d 0d 05 6e 15 20 42 4c  |R11,[R12]..n. BL|
00000f70  20 72 61 6e 64 6f 6d 5f  6e 75 6d 62 65 72 0d 05  | random_number..|
00000f80  78 1a 20 43 4d 50 20 52  30 2c 23 34 3a 42 47 54  |x. CMP R0,#4:BGT|
00000f90  20 6e 6f 5f 73 68 69 70  0d 05 82 0f 20 4d 4f 56  | no_ship.... MOV|
00000fa0  20 52 31 30 2c 23 30 0d  05 8c 15 20 2e 6c 6f 6f  | R10,#0.... .loo|
00000fb0  70 5f 66 69 6e 64 5f 66  72 65 65 34 0d 05 96 13  |p_find_free4....|
00000fc0  20 41 44 44 20 52 31 30  2c 52 31 30 2c 23 31 0d  | ADD R10,R10,#1.|
00000fd0  05 a0 48 20 4c 44 52 20  52 30 2c 5b 52 31 31 2c  |..H LDR R0,[R11,|
00000fe0  52 31 30 2c 41 53 4c 20  23 6f 62 6a 65 63 74 5f  |R10,ASL #object_|
00000ff0  6c 65 6e 67 74 68 6c 6f  67 25 5d 3b 52 30 20 43  |lengthlog%];R0 C|
00001000  4f 4e 54 41 49 4e 53 20  4f 42 4a 45 43 54 20 52  |ONTAINS OBJECT R|
00001010  45 46 20 43 4f 44 45 0d  05 aa 26 20 43 4d 50 20  |EF CODE...& CMP |
00001020  52 31 30 2c 23 6d 61 78  5f 6f 62 6a 65 63 74 73  |R10,#max_objects|
00001030  25 3a 42 47 45 20 6e 6f  5f 73 68 69 70 0d 05 b4  |%:BGE no_ship...|
00001040  43 20 43 4d 50 20 52 30  2c 23 30 3a 42 4e 45 20  |C CMP R0,#0:BNE |
00001050  6c 6f 6f 70 5f 66 69 6e  64 5f 66 72 65 65 34 20  |loop_find_free4 |
00001060  20 20 20 20 20 20 20 20  20 3b 43 48 45 43 4b 20  |         ;CHECK |
00001070  e7 20 4f 42 4a 45 43 54  20 49 53 20 44 45 41 44  |. OBJECT IS DEAD|
00001080  0d 05 be 48 20 41 44 44  20 52 31 31 2c 52 31 31  |...H ADD R11,R11|
00001090  2c 52 31 30 2c 41 53 4c  20 23 6f 62 6a 65 63 74  |,R10,ASL #object|
000010a0  5f 6c 65 6e 67 74 68 6c  6f 67 25 20 20 3b 52 39  |_lengthlog%  ;R9|
000010b0  20 c8 92 53 20 b8 20 42  45 47 49 4e 49 4e 47 20  | ..S . BEGINING |
000010c0  ca 20 4f 42 4a 45 43 54  0d 05 c8 04 0d 05 d2 1b  |. OBJECT........|
000010d0  20 4d 4f 56 20 52 30 2c  23 37 3a 53 54 52 20 52  | MOV R0,#7:STR R|
000010e0  30 2c 5b 52 31 31 5d 0d  05 dc 49 20 42 4c 20 72  |0,[R11]...I BL r|
000010f0  61 6e 64 6f 6d 5f 6e 75  6d 62 65 72 3a 4d 4f 56  |andom_number:MOV|
00001100  20 52 30 2c 52 30 2c 41  53 4c 20 23 39 3a 53 55  | R0,R0,ASL #9:SU|
00001110  42 20 52 30 2c 52 30 2c  23 34 30 39 36 2a 53 43  |B R0,R0,#4096*SC|
00001120  3a 53 54 52 20 52 30 2c  5b 52 31 31 2c 23 34 5d  |:STR R0,[R11,#4]|
00001130  0d 05 e6 24 20 4d 4f 56  20 52 30 2c 23 34 30 30  |...$ MOV R0,#400|
00001140  30 2a 53 43 3a 53 54 52  20 52 30 2c 5b 52 31 31  |0*SC:STR R0,[R11|
00001150  2c 23 38 5d 0d 05 f0 4a  20 42 4c 20 72 61 6e 64  |,#8]...J BL rand|
00001160  6f 6d 5f 6e 75 6d 62 65  72 3a 4d 4f 56 20 52 30  |om_number:MOV R0|
00001170  2c 52 30 2c 41 53 4c 20  23 39 3a 53 55 42 20 52  |,R0,ASL #9:SUB R|
00001180  30 2c 52 30 2c 23 34 30  39 36 2a 53 43 3a 53 54  |0,R0,#4096*SC:ST|
00001190  52 20 52 30 2c 5b 52 31  31 2c 23 31 32 5d 0d 05  |R R0,[R11,#12]..|
000011a0  fa 24 20 4d 4f 56 20 52  30 2c 23 34 30 39 36 2f  |.$ MOV R0,#4096/|
000011b0  32 3a 53 54 52 20 52 30  2c 5b 52 31 31 2c 23 31  |2:STR R0,[R11,#1|
000011c0  36 5d 0d 06 04 26 20 42  4c 20 72 61 6e 64 6f 6d  |6]...& BL random|
000011d0  5f 6e 75 6d 62 65 72 3a  53 54 52 20 52 30 2c 5b  |_number:STR R0,[|
000011e0  52 31 31 2c 23 32 30 5d  0d 06 0e 1f 20 4d 4f 56  |R11,#20].... MOV|
000011f0  20 52 30 2c 23 30 3a 53  54 52 20 52 30 2c 5b 52  | R0,#0:STR R0,[R|
00001200  31 31 2c 23 32 34 5d 0d  06 18 1f 20 4d 4f 56 20  |11,#24].... MOV |
00001210  52 30 2c 23 30 3a 53 54  52 20 52 30 2c 5b 52 31  |R0,#0:STR R0,[R1|
00001220  31 2c 23 35 32 5d 0d 06  22 23 20 4d 56 4e 20 52  |1,#52].."# MVN R|
00001230  30 2c 23 35 30 2a 53 43  3a 53 54 52 20 52 30 2c  |0,#50*SC:STR R0,|
00001240  5b 52 31 31 2c 23 35 36  5d 0d 06 2c 1f 20 4d 4f  |[R11,#56]..,. MO|
00001250  56 20 52 30 2c 23 30 3a  53 54 52 20 52 30 2c 5b  |V R0,#0:STR R0,[|
00001260  52 31 31 2c 23 36 30 5d  0d 06 36 1f 20 4d 4f 56  |R11,#60]..6. MOV|
00001270  20 52 30 2c 23 30 3a 53  54 52 20 52 30 2c 5b 52  | R0,#0:STR R0,[R|
00001280  31 31 2c 23 36 34 5d 0d  06 40 1f 20 4d 4f 56 20  |11,#64]..@. MOV |
00001290  52 30 2c 23 30 3a 53 54  52 20 52 30 2c 5b 52 31  |R0,#0:STR R0,[R1|
000012a0  31 2c 23 36 38 5d 0d 06  4a 20 20 4d 4f 56 20 52  |1,#68]..J  MOV R|
000012b0  30 2c 23 33 32 3a 53 54  52 20 52 30 2c 5b 52 31  |0,#32:STR R0,[R1|
000012c0  31 2c 23 37 32 5d 0d 06  54 1f 20 4d 4f 56 20 52  |1,#72]..T. MOV R|
000012d0  30 2c 23 30 3a 53 54 52  20 52 30 2c 5b 52 31 31  |0,#0:STR R0,[R11|
000012e0  2c 23 37 36 5d 0d 06 5e  25 20 4d 4f 56 20 52 30  |,#76]..^% MOV R0|
000012f0  2c 23 28 38 2a 46 29 5e  32 3a 53 54 52 20 52 30  |,#(8*F)^2:STR R0|
00001300  2c 5b 52 31 31 2c 23 38  34 5d 0d 06 68 04 0d 06  |,[R11,#84]..h...|
00001310  72 0d 20 2e 6e 6f 5f 73  68 69 70 0d 06 7c 04 0d  |r. .no_ship..|..|
00001320  06 86 4d 20 3b 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |..M ;***********|
00001330  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00001340  2a 20 6b 65 79 20 64 65  74 65 63 74 20 66 6f 72  |* key detect for|
00001350  20 6d 6f 76 65 6d 65 6e  74 20 65 74 63 20 2a 2a  | movement etc **|
00001360  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 0d 06 90 04  |************....|
00001370  0d 06 9a 4e 20 4c 44 52  20 52 31 31 2c 5b 52 31  |...N LDR R11,[R1|
00001380  32 5d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |2]              |
00001390  20 20 20 20 3b 6c 6f 61  64 73 20 73 74 61 72 74  |    ;loads start|
000013a0  20 61 64 64 72 65 73 73  20 6f 66 20 6f 62 6a 65  | address of obje|
000013b0  63 74 20 64 61 74 61 20  69 6e 20 72 31 31 0d 06  |ct data in r11..|
000013c0  a4 04 0d 06 ae 33 20 4c  44 52 20 52 31 30 2c 5b  |.....3 LDR R10,[|
000013d0  52 31 32 2c 23 32 38 5d  20 20 20 20 20 20 20 20  |R12,#28]        |
000013e0  20 20 20 20 20 20 3b 6d  6f 76 65 6d 65 6e 74 20  |      ;movement |
000013f0  73 70 65 65 64 0d 06 b8  04 0d 06 c2 0f 20 4d 4f  |speed........ MO|
00001400  56 20 52 39 2c 52 31 31  0d 06 cc 10 20 42 4c 20  |V R9,R11.... BL |
00001410  68 69 74 5f 74 61 6e 6b  0d 06 d6 04 0d 06 e0 2c  |hit_tank.......,|
00001420  20 4d 4f 56 20 52 30 2c  23 31 32 39 20 20 20 20  | MOV R0,#129    |
00001430  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00001440  3b 6f 73 20 62 79 74 65  0d 06 ea 2f 20 4d 56 4e  |;os byte.../ MVN|
00001450  20 52 31 2c 23 37 33 20  20 20 20 20 20 20 20 20  | R1,#73         |
00001460  20 20 20 20 20 20 20 20  20 20 20 20 3b 72 65 74  |            ;ret|
00001470  75 72 6e 20 6b 65 79 0d  06 f4 10 20 4d 4f 56 20  |urn key.... MOV |
00001480  52 32 2c 23 26 46 46 0d  06 fe 12 20 53 57 49 20  |R2,#&FF.... SWI |
00001490  22 4f 53 5f 42 79 74 65  22 0d 07 08 10 20 43 4d  |"OS_Byte".... CM|
000014a0  50 20 52 31 2c 23 26 46  46 0d 07 12 3c 20 42 4c  |P R1,#&FF...< BL|
000014b0  45 51 20 73 68 65 6c 6c  20 20 20 20 20 20 20 20  |EQ shell        |
000014c0  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 73 68  |             ;sh|
000014d0  65 6c 6c 20 69 6e 73 74  61 6c 69 6e 67 20 72 6f  |ell instaling ro|
000014e0  75 74 69 6e 65 0d 07 1c  04 0d 07 26 10 20 4d 4f  |utine......&. MO|
000014f0  56 20 52 30 2c 23 31 32  39 0d 07 30 38 20 4d 56  |V R0,#129..08 MV|
00001500  4e 20 52 31 2c 23 36 36  20 20 20 20 20 20 20 20  |N R1,#66        |
00001510  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 20 5a  |             ; Z|
00001520  20 3d 20 66 61 73 74 20  73 70 69 6e 20 6c 65 66  | = fast spin lef|
00001530  74 0d 07 3a 10 20 4d 4f  56 20 52 32 2c 23 26 46  |t..:. MOV R2,#&F|
00001540  46 0d 07 44 12 20 53 57  49 20 22 4f 53 5f 42 79  |F..D. SWI "OS_By|
00001550  74 65 22 0d 07 4e 10 20  43 4d 50 20 52 31 2c 23  |te"..N. CMP R1,#|
00001560  26 46 46 0d 07 58 3a 20  4c 44 52 45 51 20 52 39  |&FF..X: LDREQ R9|
00001570  2c 5b 52 31 31 2c 23 32  30 5d 3a 41 44 44 45 51  |,[R11,#20]:ADDEQ|
00001580  20 52 39 2c 52 39 2c 52  31 30 3a 53 54 52 45 51  | R9,R9,R10:STREQ|
00001590  20 52 39 2c 5b 52 31 31  2c 23 32 30 5d 0d 07 62  | R9,[R11,#20]..b|
000015a0  04 0d 07 6c 10 20 4d 4f  56 20 52 30 2c 23 31 32  |...l. MOV R0,#12|
000015b0  39 0d 07 76 36 20 4d 56  4e 20 52 31 2c 23 38 31  |9..v6 MVN R1,#81|
000015c0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000015d0  20 20 20 20 20 3b 20 53  20 73 6c 6f 77 20 73 70  |     ; S slow sp|
000015e0  69 6e 20 6c 65 66 74 0d  07 80 10 20 4d 4f 56 20  |in left.... MOV |
000015f0  52 32 2c 23 26 46 46 0d  07 8a 12 20 53 57 49 20  |R2,#&FF.... SWI |
00001600  22 4f 53 5f 42 79 74 65  22 0d 07 94 10 20 43 4d  |"OS_Byte".... CM|
00001610  50 20 52 31 2c 23 26 46  46 0d 07 9e 3a 20 4c 44  |P R1,#&FF...: LD|
00001620  52 45 51 20 52 39 2c 5b  52 31 31 2c 23 32 30 5d  |REQ R9,[R11,#20]|
00001630  3a 53 55 42 45 51 20 52  39 2c 52 39 2c 23 32 30  |:SUBEQ R9,R9,#20|
00001640  3a 53 54 52 45 51 20 52  39 2c 5b 52 31 31 2c 23  |:STREQ R9,[R11,#|
00001650  32 30 5d 0d 07 a8 04 0d  07 b2 04 0d 07 bc 10 20  |20]............ |
00001660  4d 4f 56 20 52 30 2c 23  31 32 39 0d 07 c6 3a 20  |MOV R0,#129...: |
00001670  4d 56 4e 20 52 31 2c 23  39 37 20 20 20 20 20 20  |MVN R1,#97      |
00001680  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00001690  20 20 58 20 3d 20 66 61  73 74 20 73 70 69 6e 20  |  X = fast spin |
000016a0  72 69 67 68 74 0d 07 d0  10 20 4d 4f 56 20 52 32  |right.... MOV R2|
000016b0  2c 23 26 46 46 0d 07 da  12 20 53 57 49 20 22 4f  |,#&FF.... SWI "O|
000016c0  53 5f 42 79 74 65 22 0d  07 e4 10 20 43 4d 50 20  |S_Byte".... CMP |
000016d0  52 31 2c 23 26 46 46 0d  07 ee 3a 20 4c 44 52 45  |R1,#&FF...: LDRE|
000016e0  51 20 52 39 2c 5b 52 31  31 2c 23 32 30 5d 3a 53  |Q R9,[R11,#20]:S|
000016f0  55 42 45 51 20 52 39 2c  52 39 2c 52 31 30 3a 53  |UBEQ R9,R9,R10:S|
00001700  54 52 45 51 20 52 39 2c  5b 52 31 31 2c 23 32 30  |TREQ R9,[R11,#20|
00001710  5d 0d 07 f8 04 0d 08 02  10 20 4d 4f 56 20 52 30  |]........ MOV R0|
00001720  2c 23 31 32 39 0d 08 0c  3a 20 4d 56 4e 20 52 31  |,#129...: MVN R1|
00001730  2c 23 35 30 20 20 20 20  20 20 20 20 20 20 20 20  |,#50            |
00001740  20 20 20 20 20 20 20 20  20 3b 20 20 44 20 3d 20  |         ;  D = |
00001750  73 6c 6f 77 20 73 70 69  6e 20 72 69 67 68 74 0d  |slow spin right.|
00001760  08 16 10 20 4d 4f 56 20  52 32 2c 23 26 46 46 0d  |... MOV R2,#&FF.|
00001770  08 20 12 20 53 57 49 20  22 4f 53 5f 42 79 74 65  |. . SWI "OS_Byte|
00001780  22 0d 08 2a 10 20 43 4d  50 20 52 31 2c 23 26 46  |"..*. CMP R1,#&F|
00001790  46 0d 08 34 3a 20 4c 44  52 45 51 20 52 39 2c 5b  |F..4: LDREQ R9,[|
000017a0  52 31 31 2c 23 32 30 5d  3a 41 44 44 45 51 20 52  |R11,#20]:ADDEQ R|
000017b0  39 2c 52 39 2c 23 32 30  3a 53 54 52 45 51 20 52  |9,R9,#20:STREQ R|
000017c0  39 2c 5b 52 31 31 2c 23  32 30 5d 0d 08 3e 04 0d  |9,[R11,#20]..>..|
000017d0  08 48 04 0d 08 52 10 20  4d 4f 56 20 52 30 2c 23  |.H...R. MOV R0,#|
000017e0  31 32 39 0d 08 5c 34 20  4d 56 4e 20 52 31 2c 23  |129..\4 MVN R1,#|
000017f0  37 39 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |79              |
00001800  20 20 20 20 20 20 20 3b  20 20 22 20 3d 20 66 6f  |       ;  " = fo|
00001810  72 77 61 72 64 73 22 0d  08 66 10 20 4d 4f 56 20  |rwards"..f. MOV |
00001820  52 32 2c 23 26 46 46 0d  08 70 12 20 53 57 49 20  |R2,#&FF..p. SWI |
00001830  22 4f 53 5f 42 79 74 65  22 0d 08 7a 10 20 43 4d  |"OS_Byte"..z. CM|
00001840  50 20 52 31 2c 23 26 46  46 0d 08 84 14 20 42 4e  |P R1,#&FF.... BN|
00001850  45 20 73 6b 69 70 5f 64  72 69 76 65 31 0d 08 8e  |E skip_drive1...|
00001860  15 20 4c 44 52 20 52 37  2c 5b 52 31 31 2c 23 32  |. LDR R7,[R11,#2|
00001870  30 5d 0d 08 98 3b 20 4d  4f 56 20 52 31 2c 23 30  |0]...; MOV R1,#0|
00001880  3a 4c 44 52 20 52 33 2c  5b 52 31 32 2c 23 33 32  |:LDR R3,[R12,#32|
00001890  5d 20 20 20 20 20 3b 73  70 65 65 64 20 6f 66 20  |]     ;speed of |
000018a0  74 72 61 76 65 6c 20 76  65 63 74 6f 72 0d 08 a2  |travel vector...|
000018b0  24 4d 4f 56 20 52 30 2c  52 33 3a 4d 4f 56 20 52  |$MOV R0,R3:MOV R|
000018c0  33 2c 23 32 3a 4d 55 4c  20 52 33 2c 52 30 2c 52  |3,#2:MUL R3,R0,R|
000018d0  33 0d 08 ac 0f 20 4d 4f  56 20 52 30 2c 23 31 36  |3.... MOV R0,#16|
000018e0  0d 08 b6 2c 20 42 4c 20  72 6f 74 61 74 65 5f 79  |..., BL rotate_y|
000018f0  5f 61 78 69 73 20 20 20  20 20 20 20 20 20 20 20  |_axis           |
00001900  20 20 20 20 3b 72 6f 74  61 74 65 73 0d 08 c0 14  |    ;rotates....|
00001910  20 4c 44 52 20 52 34 2c  5b 52 31 31 2c 23 34 5d  | LDR R4,[R11,#4]|
00001920  0d 08 ca 15 20 4c 44 52  20 52 35 2c 5b 52 31 31  |.... LDR R5,[R11|
00001930  2c 23 31 32 5d 0d 08 d4  11 20 41 44 44 20 52 34  |,#12].... ADD R4|
00001940  2c 52 34 2c 52 31 0d 08  de 11 20 41 44 44 20 52  |,R4,R1.... ADD R|
00001950  35 2c 52 35 2c 52 33 0d  08 e8 14 20 53 54 52 20  |5,R5,R3.... STR |
00001960  52 34 2c 5b 52 31 31 2c  23 34 5d 0d 08 f2 15 20  |R4,[R11,#4].... |
00001970  53 54 52 20 52 35 2c 5b  52 31 31 2c 23 31 32 5d  |STR R5,[R11,#12]|
00001980  0d 08 fc 15 20 53 54 52  20 52 31 2c 5b 52 31 31  |.... STR R1,[R11|
00001990  2c 23 35 32 5d 0d 09 06  15 20 53 54 52 20 52 33  |,#52].... STR R3|
000019a0  2c 5b 52 31 31 2c 23 36  30 5d 0d 09 10 11 20 2e  |,[R11,#60].... .|
000019b0  73 6b 69 70 5f 64 72 69  76 65 31 0d 09 1a 04 0d  |skip_drive1.....|
000019c0  09 24 10 20 4d 4f 56 20  52 30 2c 23 31 32 39 0d  |.$. MOV R0,#129.|
000019d0  09 2e 34 20 4d 56 4e 20  52 31 2c 23 31 30 34 20  |..4 MVN R1,#104 |
000019e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000019f0  20 20 20 3b 20 20 3f 20  3d 20 62 61 63 6b 77 61  |   ;  ? = backwa|
00001a00  72 64 73 0d 09 38 10 20  4d 4f 56 20 52 32 2c 23  |rds..8. MOV R2,#|
00001a10  26 46 46 0d 09 42 12 20  53 57 49 20 22 4f 53 5f  |&FF..B. SWI "OS_|
00001a20  42 79 74 65 22 0d 09 4c  10 20 43 4d 50 20 52 31  |Byte"..L. CMP R1|
00001a30  2c 23 26 46 46 0d 09 56  14 20 42 4e 45 20 73 6b  |,#&FF..V. BNE sk|
00001a40  69 70 5f 64 72 69 76 65  32 0d 09 60 15 20 4c 44  |ip_drive2..`. LD|
00001a50  52 20 52 37 2c 5b 52 31  31 2c 23 32 30 5d 0d 09  |R R7,[R11,#20]..|
00001a60  6a 3b 20 4d 4f 56 20 52  31 2c 23 30 3a 4c 44 52  |j; MOV R1,#0:LDR|
00001a70  20 52 33 2c 5b 52 31 32  2c 23 33 32 5d 20 20 20  | R3,[R12,#32]   |
00001a80  20 20 3b 73 70 65 65 64  20 6f 66 20 74 72 61 76  |  ;speed of trav|
00001a90  65 6c 20 76 65 63 74 6f  72 0d 09 74 24 4d 4f 56  |el vector..t$MOV|
00001aa0  20 52 30 2c 52 33 3a 4d  4f 56 20 52 33 2c 23 32  | R0,R3:MOV R3,#2|
00001ab0  3a 4d 55 4c 20 52 33 2c  52 30 2c 52 33 0d 09 7e  |:MUL R3,R0,R3..~|
00001ac0  0f 20 4d 4f 56 20 52 30  2c 23 31 36 0d 09 88 2c  |. MOV R0,#16...,|
00001ad0  20 42 4c 20 72 6f 74 61  74 65 5f 79 5f 61 78 69  | BL rotate_y_axi|
00001ae0  73 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |s               |
00001af0  3b 72 6f 74 61 74 65 73  0d 09 92 14 20 4c 44 52  |;rotates.... LDR|
00001b00  20 52 34 2c 5b 52 31 31  2c 23 34 5d 0d 09 9c 15  | R4,[R11,#4]....|
00001b10  20 4c 44 52 20 52 35 2c  5b 52 31 31 2c 23 31 32  | LDR R5,[R11,#12|
00001b20  5d 0d 09 a6 11 20 53 55  42 20 52 34 2c 52 34 2c  |].... SUB R4,R4,|
00001b30  52 31 0d 09 b0 11 20 53  55 42 20 52 35 2c 52 35  |R1.... SUB R5,R5|
00001b40  2c 52 33 0d 09 ba 14 20  53 54 52 20 52 34 2c 5b  |,R3.... STR R4,[|
00001b50  52 31 31 2c 23 34 5d 0d  09 c4 15 20 53 54 52 20  |R11,#4].... STR |
00001b60  52 35 2c 5b 52 31 31 2c  23 31 32 5d 0d 09 ce 0e  |R5,[R11,#12]....|
00001b70  20 4d 56 4e 20 52 31 2c  52 31 0d 09 d8 0e 20 4d  | MVN R1,R1.... M|
00001b80  56 4e 20 52 33 2c 52 33  0d 09 e2 15 20 53 54 52  |VN R3,R3.... STR|
00001b90  20 52 31 2c 5b 52 31 31  2c 23 35 32 5d 0d 09 ec  | R1,[R11,#52]...|
00001ba0  15 20 53 54 52 20 52 33  2c 5b 52 31 31 2c 23 36  |. STR R3,[R11,#6|
00001bb0  30 5d 0d 09 f6 11 20 2e  73 6b 69 70 5f 64 72 69  |0].... .skip_dri|
00001bc0  76 65 32 0d 0a 00 04 0d  0a 0a 04 0d 0a 14 43 20  |ve2...........C |
00001bd0  4d 4f 56 20 52 31 30 2c  23 34 30 39 36 20 20 20  |MOV R10,#4096   |
00001be0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 72  |              ;r|
00001bf0  61 6e 67 65 20 63 68 65  63 6b 20 79 6f 75 72 20  |ange check your |
00001c00  72 6f 74 61 74 69 6f 6e  20 61 6e 67 6c 65 0d 0a  |rotation angle..|
00001c10  1e 13 20 53 55 42 20 52  31 30 2c 52 31 30 2c 23  |.. SUB R10,R10,#|
00001c20  31 0d 0a 28 32 20 4c 44  52 20 52 39 2c 5b 52 31  |1..(2 LDR R9,[R1|
00001c30  31 2c 23 32 30 5d 3a 80  20 52 39 2c 52 39 2c 52  |1,#20]:. R9,R9,R|
00001c40  31 30 3a 53 54 52 20 52  39 2c 5b 52 31 31 2c 23  |10:STR R9,[R11,#|
00001c50  32 30 5d 0d 0a 32 04 0d  0a 3c 12 20 42 20 73 6b  |20]..2...<. B sk|
00001c60  69 70 5f 70 61 75 73 65  64 0d 0a 46 0c 20 2e 70  |ip_paused..F. .p|
00001c70  61 75 73 65 64 0d 0a 50  15 20 53 54 4d 46 44 20  |aused..P. STMFD |
00001c80  52 31 33 21 2c 7b 52 31  34 7d 0d 0a 5a 4e 20 42  |R13!,{R14}..ZN B|
00001c90  4c 20 6c 6f 61 64 5f 69  6e 66 6f 20 20 20 20 20  |L load_info     |
00001ca0  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 70 75  |             ;pu|
00001cb0  74 73 20 61 64 64 72 65  73 73 20 6f 66 20 73 74  |ts address of st|
00001cc0  61 72 74 20 6f 66 20 69  6e 66 6f 20 74 61 62 6c  |art of info tabl|
00001cd0  65 20 69 6e 20 72 31 32  0d 0a 64 11 20 2e 73 6b  |e in r12..d. .sk|
00001ce0  69 70 5f 70 61 75 73 65  64 0d 0a 6e 04 0d 0a 78  |ip_paused..n...x|
00001cf0  4c 20 3b 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |L ;*************|
00001d00  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 20 64 6f  |************* do|
00001d10  74 73 20 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |ts *************|
00001d20  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00001d30  2a 2a 2a 2a 2a 2a 2a 2a  2a 0d 0a 82 04 0d 0a 8c  |*********.......|
00001d40  36 20 4d 4f 56 20 52 30  2c 23 31 38 3a 53 57 49  |6 MOV R0,#18:SWI|
00001d50  20 30 3a 4d 4f 56 20 52  30 2c 23 30 3a 53 57 49  | 0:MOV R0,#0:SWI|
00001d60  20 30 3a 4d 4f 56 20 52  30 2c 23 31 31 3a 53 57  | 0:MOV R0,#11:SW|
00001d70  49 20 30 0d 0a 96 48 20  4d 4f 56 20 52 30 2c 23  |I 0...H MOV R0,#|
00001d80  36 39 3a 4d 4f 56 20 52  31 2c 23 32 35 36 3a 4d  |69:MOV R1,#256:M|
00001d90  4f 56 20 52 32 2c 23 31  30 32 34 2d 32 35 36 3a  |OV R2,#1024-256:|
00001da0  53 57 49 20 26 34 35 3a  4d 4f 56 20 52 31 2c 23  |SWI &45:MOV R1,#|
00001db0  32 35 34 3a 53 57 49 20  26 34 35 0d 0a a0 12 20  |254:SWI &45.... |
00001dc0  4c 44 52 20 52 31 31 2c  5b 52 31 32 5d 0d 0a aa  |LDR R11,[R12]...|
00001dd0  15 20 4c 44 52 20 52 37  2c 5b 52 31 31 2c 23 32  |. LDR R7,[R11,#2|
00001de0  30 5d 0d 0a b4 25 20 4c  44 52 20 52 34 2c 5b 52  |0]...% LDR R4,[R|
00001df0  31 31 2c 23 34 5d 3a 4d  4f 56 20 52 34 2c 52 34  |11,#4]:MOV R4,R4|
00001e00  2c 41 53 52 20 23 38 0d  0a be 25 20 4c 44 52 20  |,ASR #8...% LDR |
00001e10  52 35 2c 5b 52 31 31 2c  23 38 5d 3a 4d 4f 56 20  |R5,[R11,#8]:MOV |
00001e20  52 35 2c 52 35 2c 41 53  52 20 23 38 0d 0a c8 26  |R5,R5,ASR #8...&|
00001e30  20 4c 44 52 20 52 36 2c  5b 52 31 31 2c 23 31 32  | LDR R6,[R11,#12|
00001e40  5d 3a 4d 4f 56 20 52 36  2c 52 36 2c 41 53 52 20  |]:MOV R6,R6,ASR |
00001e50  23 38 0d 0a d2 16 20 4c  44 52 20 52 31 31 2c 5b  |#8.... LDR R11,[|
00001e60  52 31 32 2c 23 34 38 5d  0d 0a dc 15 20 4c 44 52  |R12,#48].... LDR|
00001e70  20 52 39 2c 5b 52 31 32  2c 23 31 32 5d 0d 0a e6  | R9,[R12,#12]...|
00001e80  0f 20 4d 4f 56 20 52 31  30 2c 23 30 0d 0a f0 0f  |. MOV R10,#0....|
00001e90  20 2e 6c 6f 6f 70 5f 64  6f 74 73 0d 0a fa 14 20  | .loop_dots.... |
00001ea0  4c 44 52 20 52 31 2c 5b  52 31 31 5d 2c 23 34 0d  |LDR R1,[R11],#4.|
00001eb0  0b 04 0e 20 4d 4f 56 20  52 32 2c 23 30 0d 0b 0e  |... MOV R2,#0...|
00001ec0  14 20 4c 44 52 20 52 33  2c 5b 52 31 31 5d 2c 23  |. LDR R3,[R11],#|
00001ed0  34 0d 0b 18 11 20 53 55  42 20 52 31 2c 52 31 2c  |4.... SUB R1,R1,|
00001ee0  52 34 0d 0b 22 11 20 53  55 42 20 52 32 2c 52 32  |R4..". SUB R2,R2|
00001ef0  2c 52 35 0d 0b 2c 11 20  53 55 42 20 52 33 2c 52  |,R5..,. SUB R3,R|
00001f00  33 2c 52 36 0d 0b 36 0f  20 4d 4f 56 20 52 30 2c  |3,R6..6. MOV R0,|
00001f10  23 31 35 0d 0b 40 15 20  42 4c 20 72 6f 74 61 74  |#15..@. BL rotat|
00001f20  65 5f 79 5f 61 78 69 73  0d 0b 4a 1c 20 43 4d 50  |e_y_axis..J. CMP|
00001f30  20 52 33 2c 23 31 3a 42  4c 45 20 64 6f 74 5f 72  | R3,#1:BLE dot_r|
00001f40  61 6e 67 65 0d 0b 54 24  20 43 4d 50 20 52 33 2c  |ange..T$ CMP R3,|
00001f50  23 32 30 34 38 2b 31 30  32 34 3a 42 47 45 20 64  |#2048+1024:BGE d|
00001f60  6f 74 5f 72 61 6e 67 65  0d 0b 5e 1a 20 4c 44 52  |ot_range..^. LDR|
00001f70  20 52 30 2c 5b 52 39 2c  52 33 2c 41 53 4c 20 23  | R0,[R9,R3,ASL #|
00001f80  32 5d 0d 0b 68 11 20 4d  55 4c 20 52 31 2c 52 30  |2]..h. MUL R1,R0|
00001f90  2c 52 31 0d 0b 72 11 20  4d 55 4c 20 52 32 2c 52  |,R1..r. MUL R2,R|
00001fa0  30 2c 52 32 0d 0b 7c 16  20 4d 4f 56 20 52 31 2c  |0,R2..|. MOV R1,|
00001fb0  52 31 2c 41 53 52 20 23  31 32 0d 0b 86 16 20 4d  |R1,ASR #12.... M|
00001fc0  4f 56 20 52 32 2c 52 32  2c 41 53 52 20 23 31 32  |OV R2,R2,ASR #12|
00001fd0  0d 0b 90 13 20 41 44 44  20 52 31 2c 52 31 2c 23  |.... ADD R1,R1,#|
00001fe0  36 34 30 0d 0b 9a 1c 20  43 4d 50 20 52 31 2c 23  |640.... CMP R1,#|
00001ff0  30 3a 42 4c 54 20 64 6f  74 5f 72 61 6e 67 65 0d  |0:BLT dot_range.|
00002000  0b a4 1f 20 43 4d 50 20  52 31 2c 23 31 32 38 30  |... CMP R1,#1280|
00002010  3a 42 47 45 20 64 6f 74  5f 72 61 6e 67 65 0d 0b  |:BGE dot_range..|
00002020  ae 13 20 41 44 44 20 52  32 2c 52 32 2c 23 35 31  |.. ADD R2,R2,#51|
00002030  32 0d 0b b8 0f 20 4d 4f  56 20 52 30 2c 23 36 39  |2.... MOV R0,#69|
00002040  0d 0b c2 0c 20 53 57 49  20 26 34 35 0d 0b cc 0f  |.... SWI &45....|
00002050  20 2e 64 6f 74 5f 72 61  6e 67 65 0d 0b d6 13 20  | .dot_range.... |
00002060  41 44 44 20 52 31 30 2c  52 31 30 2c 23 31 0d 0b  |ADD R10,R10,#1..|
00002070  e0 13 20 43 4d 50 20 52  31 30 2c 23 32 35 36 2a  |.. CMP R10,#256*|
00002080  32 0d 0b ea 12 20 42 4c  54 20 6c 6f 6f 70 5f 64  |2.... BLT loop_d|
00002090  6f 74 73 0d 0b f4 04 0d  0b fe 31 20 20 20 20 20  |ots.......1     |
000020a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
*
000020c0  20 20 20 3b 64 61 74 61  0d 0c 08 4d 20 3b 2a 2a  |   ;data...M ;**|
000020d0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000020e0  2a 2a 2a 2a 2a 2a 2a 2a  2a 64 65 74 65 63 74 20  |*********detect |
000020f0  68 69 74 73 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |hits************|
00002100  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00002110  2a 2a 2a 2a 2a 0d 0c 12  04 0d 0c 1c 12 20 4c 44  |*****........ LD|
00002120  52 20 52 31 31 2c 5b 52  31 32 5d 0d 0c 26 4e 20  |R R11,[R12]..&N |
00002130  4d 4f 56 20 52 31 30 2c  23 31 20 20 20 20 20 20  |MOV R10,#1      |
00002140  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 72  |              ;r|
00002150  31 30 20 69 73 20 75 73  65 64 20 61 73 20 63 6f  |10 is used as co|
00002160  75 6e 74 65 72 20 28 31  20 74 6f 20 6d 61 78 5f  |unter (1 to max_|
00002170  6f 62 6a 65 63 74 73 25  29 0d 0c 30 10 20 2e 6c  |objects%)..0. .l|
00002180  6f 6f 70 5f 62 75 66 66  32 0d 0c 3a 48 20 4c 44  |oop_buff2..:H LD|
00002190  52 20 52 30 2c 5b 52 31  31 2c 52 31 30 2c 41 53  |R R0,[R11,R10,AS|
000021a0  4c 20 23 6f 62 6a 65 63  74 5f 6c 65 6e 67 74 68  |L #object_length|
000021b0  6c 6f 67 25 5d 3b 72 30  20 63 6f 6e 74 61 69 6e  |log%];r0 contain|
000021c0  73 20 6f 62 6a 65 63 74  20 72 65 66 20 63 6f 64  |s object ref cod|
000021d0  65 0d 0c 44 45 20 43 4d  50 20 52 30 2c 23 30 3a  |e..DE CMP R0,#0:|
000021e0  42 45 51 20 64 65 61 64  5f 6f 62 6a 32 20 20 20  |BEQ dead_obj2   |
000021f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 63  |              ;c|
00002200  68 65 63 6b 20 69 66 20  6f 62 6a 65 63 74 20 69  |heck if object i|
00002210  73 20 64 65 61 64 0d 0c  4e 4c 20 41 44 44 20 52  |s dead..NL ADD R|
00002220  39 2c 52 31 31 2c 52 31  30 2c 41 53 4c 20 23 6f  |9,R11,R10,ASL #o|
00002230  62 6a 65 63 74 5f 6c 65  6e 67 74 68 6c 6f 67 25  |bject_lengthlog%|
00002240  20 20 3b 72 39 20 70 6f  69 6e 74 73 20 74 6f 20  |  ;r9 points to |
00002250  62 65 67 69 6e 69 6e 67  20 6f 66 20 6f 62 6a 65  |begining of obje|
00002260  63 74 0d 0c 58 04 0d 0c  62 0e 20 43 4d 50 20 52  |ct..X...b. CMP R|
00002270  30 2c 23 32 0d 0c 6c 13  20 42 4c 45 51 20 68 69  |0,#2..l. BLEQ hi|
00002280  74 5f 73 68 65 6c 6c 0d  0c 76 04 0d 0c 80 4b 20  |t_shell..v....K |
00002290  43 4d 50 20 52 30 2c 23  33 20 20 20 20 20 20 20  |CMP R0,#3       |
000022a0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000022b0  20 20 20 20 20 20 3b 69  66 20 6f 62 6a 65 63 74  |      ;if object|
000022c0  20 69 73 20 61 20 74 61  6e 6b 2c 20 69 74 20 66  | is a tank, it f|
000022d0  6f 6c 6c 6f 77 73 0d 0c  8a 46 20 42 4c 45 51 20  |ollows...F BLEQ |
000022e0  68 69 74 5f 74 61 6e 6b  20 20 20 20 20 20 20 20  |hit_tank        |
000022f0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002300  20 3b 74 65 73 74 73 20  69 66 20 74 61 6e 6b 20  | ;tests if tank |
00002310  68 61 73 20 63 6f 6c 6c  69 64 65 64 0d 0c 94 3b  |has collided...;|
00002320  20 42 4c 45 51 20 74 61  6e 6b 5f 64 72 69 76 65  | BLEQ tank_drive|
00002330  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002340  20 20 20 20 20 20 20 3b  64 72 69 76 69 6e 67 20  |       ;driving |
00002350  70 61 74 74 65 72 6e 0d  0c 9e 04 0d 0c a8 0e 20  |pattern........ |
00002360  43 4d 50 20 52 30 2c 23  34 0d 0c b2 15 20 42 45  |CMP R0,#4.... BE|
00002370  51 20 65 78 70 6c 6f 5f  70 61 6e 6e 65 6c 0d 0c  |Q explo_pannel..|
00002380  bc 0e 20 43 4d 50 20 52  30 2c 23 36 0d 0c c6 15  |.. CMP R0,#6....|
00002390  20 42 45 51 20 65 78 70  6c 6f 5f 70 61 6e 6e 65  | BEQ explo_panne|
000023a0  6c 0d 0c d0 10 20 42 20  6e 6f 74 5f 65 78 70 6c  |l.... B not_expl|
000023b0  6f 0d 0c da 12 20 2e 65  78 70 6c 6f 5f 70 61 6e  |o.... .explo_pan|
000023c0  6e 65 6c 0d 0c e4 14 20  4c 44 52 20 52 31 2c 5b  |nel.... LDR R1,[|
000023d0  52 39 2c 23 35 36 5d 0d  0c ee 15 20 53 55 42 20  |R9,#56].... SUB |
000023e0  52 31 2c 52 31 2c 23 2e  38 2a 53 43 0d 0c f8 13  |R1,R1,#.8*SC....|
000023f0  20 4c 44 52 20 52 32 2c  5b 52 39 2c 23 38 5d 0d  | LDR R2,[R9,#8].|
00002400  0d 02 15 20 4c 44 52 20  52 33 2c 5b 52 31 32 2c  |... LDR R3,[R12,|
00002410  23 37 32 5d 0d 0d 0c 21  20 43 4d 50 20 52 32 2c  |#72]...! CMP R2,|
00002420  52 33 3a 4d 56 4e 4c 45  20 52 31 2c 52 31 2c 41  |R3:MVNLE R1,R1,A|
00002430  53 52 20 23 31 0d 0d 16  14 20 53 54 52 20 52 31  |SR #1.... STR R1|
00002440  2c 5b 52 39 2c 23 35 36  5d 0d 0d 20 14 20 4c 44  |,[R9,#56].. . LD|
00002450  52 20 52 31 2c 5b 52 39  2c 23 36 34 5d 0d 0d 2a  |R R1,[R9,#64]..*|
00002460  11 20 53 55 42 20 52 31  2c 52 31 2c 23 31 0d 0d  |. SUB R1,R1,#1..|
00002470  34 14 20 53 54 52 20 52  31 2c 5b 52 39 2c 23 36  |4. STR R1,[R9,#6|
00002480  34 5d 0d 0d 3e 0e 20 43  4d 50 20 52 31 2c 23 30  |4]..>. CMP R1,#0|
00002490  0d 0d 48 1e 20 4d 4f 56  4c 45 20 52 31 2c 23 30  |..H. MOVLE R1,#0|
000024a0  3a 53 54 52 4c 45 20 52  31 2c 5b 52 39 5d 0d 0d  |:STRLE R1,[R9]..|
000024b0  52 0f 20 2e 6e 6f 74 5f  65 78 70 6c 6f 0d 0d 5c  |R. .not_explo..\|
000024c0  04 0d 0d 66 1c 20 43 4d  50 20 52 30 2c 23 37 3a  |...f. CMP R0,#7:|
000024d0  42 4e 45 20 6e 6f 74 5f  62 6f 6e 75 73 0d 0d 70  |BNE not_bonus..p|
000024e0  11 20 42 4c 20 68 69 74  5f 62 6f 6e 75 73 0d 0d  |. BL hit_bonus..|
000024f0  7a 13 20 4c 44 52 20 52  31 2c 5b 52 39 2c 23 38  |z. LDR R1,[R9,#8|
00002500  5d 0d 0d 84 3c 20 43 4d  50 20 52 31 2c 23 34 30  |]...< CMP R1,#40|
00002510  39 36 2a 53 43 3a 4d 4f  56 47 45 20 52 30 2c 23  |96*SC:MOVGE R0,#|
00002520  30 3a 53 54 52 47 45 20  52 30 2c 5b 52 39 5d 3a  |0:STRGE R0,[R9]:|
00002530  42 47 45 20 6e 6f 74 5f  62 6f 6e 75 73 0d 0d 8e  |BGE not_bonus...|
00002540  0f 20 43 4d 50 20 52 31  2c 23 36 30 0d 0d 98 12  |. CMP R1,#60....|
00002550  20 42 47 54 20 6e 6f 74  5f 62 6f 6e 75 73 0d 0d  | BGT not_bonus..|
00002560  a2 1e 20 4d 4f 56 20 52  32 2c 23 30 3a 53 54 52  |.. MOV R2,#0:STR|
00002570  20 52 32 2c 5b 52 39 2c  23 35 36 5d 0d 0d ac 14  | R2,[R9,#56]....|
00002580  20 4c 44 52 20 52 31 2c  5b 52 39 2c 23 36 34 5d  | LDR R1,[R9,#64]|
00002590  0d 0d b6 0e 20 43 4d 50  20 52 31 2c 23 30 0d 0d  |.... CMP R1,#0..|
000025a0  c0 0d 20 ec 51 20 52 30  2c 23 31 0d 0d ca 16 20  |.. .Q R0,#1.... |
000025b0  53 54 52 45 51 20 52 30  2c 5b 52 39 2c 23 36 34  |STREQ R0,[R9,#64|
000025c0  5d 0d 0d d4 11 20 41 44  44 20 52 31 2c 52 31 2c  |].... ADD R1,R1,|
000025d0  23 31 0d 0d de 14 20 53  54 52 20 52 31 2c 5b 52  |#1.... STR R1,[R|
000025e0  39 2c 23 36 34 5d 0d 0d  e8 43 20 43 4d 50 20 52  |9,#64]...C CMP R|
000025f0  31 2c 23 31 32 38 3a 4d  4f 56 47 45 20 52 32 2c  |1,#128:MOVGE R2,|
00002600  23 35 30 2a 53 43 3a 53  54 52 47 45 20 52 32 2c  |#50*SC:STRGE R2,|
00002610  5b 52 39 2c 23 35 36 5d  3a 53 54 52 47 45 20 52  |[R9,#56]:STRGE R|
00002620  32 2c 5b 52 39 2c 23 38  5d 0d 0d f2 2a 20 80 20  |2,[R9,#8]...* . |
00002630  52 32 2c 52 31 2c 23 37  3a 43 4d 50 20 52 32 2c  |R2,R1,#7:CMP R2,|
00002640  23 30 3a 42 4c 45 51 20  65 6e 65 6d 79 5f 73 68  |#0:BLEQ enemy_sh|
00002650  65 6c 6c 0d 0d fc 0f 20  2e 6e 6f 74 5f 62 6f 6e  |ell.... .not_bon|
00002660  75 73 0d 0e 06 04 0d 0e  10 0f 20 2e 64 65 61 64  |us........ .dead|
00002670  5f 6f 62 6a 32 0d 0e 1a  3b 20 41 44 44 20 52 31  |_obj2...; ADD R1|
00002680  30 2c 52 31 30 2c 23 31  20 20 20 20 20 20 20 20  |0,R10,#1        |
00002690  20 20 20 20 20 20 20 20  20 3b 69 6e 63 72 65 6d  |         ;increm|
000026a0  65 6e 74 20 63 6f 75 6e  74 20 6f 6e 20 72 31 30  |ent count on r10|
000026b0  0d 0e 24 43 20 43 4d 50  20 52 31 30 2c 23 6d 61  |..$C CMP R10,#ma|
000026c0  78 5f 6f 62 6a 65 63 74  73 25 20 20 20 20 20 20  |x_objects%      |
000026d0  20 20 20 20 3b 63 68 65  63 6b 20 66 6f 72 20 65  |    ;check for e|
000026e0  6e 64 20 6f 66 20 63 6f  75 6e 74 20 72 65 61 63  |nd of count reac|
000026f0  68 65 64 0d 0e 2e 13 20  42 4c 54 20 6c 6f 6f 70  |hed.... BLT loop|
00002700  5f 62 75 66 66 32 0d 0e  38 04 0d 0e 42 4e 20 3b  |_buff2..8...BN ;|
00002710  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00002720  2a 2a 2a 2a 2a 20 6c 6f  6f 70 20 74 6f 20 72 6f  |***** loop to ro|
00002730  74 61 74 65 20 61 6e 64  20 6f 66 66 73 65 74 20  |tate and offset |
00002740  6f 62 6a 65 63 74 73 20  2a 2a 2a 2a 2a 2a 2a 2a  |objects ********|
00002750  2a 2a 2a 2a 2a 2a 2a 2a  0d 0e 4c 04 0d 0e 56 12  |********..L...V.|
00002760  20 4c 44 52 20 52 31 31  2c 5b 52 31 32 5d 0d 0e  | LDR R11,[R12]..|
00002770  60 4e 20 4d 4f 56 20 52  31 30 2c 23 31 20 20 20  |`N MOV R10,#1   |
00002780  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002790  20 3b 72 31 30 20 69 73  20 75 73 65 64 20 61 73  | ;r10 is used as|
000027a0  20 63 6f 75 6e 74 65 72  20 28 31 20 74 6f 20 6d  | counter (1 to m|
000027b0  61 78 5f 6f 62 6a 65 63  74 73 25 29 0d 0e 6a 04  |ax_objects%)..j.|
000027c0  0d 0e 74 3a 20 4c 44 52  20 52 34 2c 5b 52 31 31  |..t: LDR R4,[R11|
000027d0  2c 23 34 5d 20 20 20 20  20 20 20 20 20 20 20 20  |,#4]            |
000027e0  20 20 20 20 3b 72 34 20  68 6f 6c 64 73 20 79 6f  |    ;r4 holds yo|
000027f0  75 72 20 78 20 63 6f 6f  72 64 0d 0e 7e 3a 20 4c  |ur x coord..~: L|
00002800  44 52 20 52 35 2c 5b 52  31 31 2c 23 38 5d 20 20  |DR R5,[R11,#8]  |
00002810  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 72  |              ;r|
00002820  35 20 68 6f 6c 64 73 20  79 6f 75 72 20 79 20 63  |5 holds your y c|
00002830  6f 6f 72 64 0d 0e 88 3a  20 4c 44 52 20 52 36 2c  |oord...: LDR R6,|
00002840  5b 52 31 31 2c 23 31 32  5d 20 20 20 20 20 20 20  |[R11,#12]       |
00002850  20 20 20 20 20 20 20 20  3b 72 36 20 68 6f 6c 64  |        ;r6 hold|
00002860  73 20 79 6f 75 72 20 7a  20 63 6f 6f 72 64 0d 0e  |s your z coord..|
00002870  92 48 20 4c 44 52 20 52  37 2c 5b 52 31 31 2c 23  |.H LDR R7,[R11,#|
00002880  32 30 5d 20 20 20 20 20  20 20 20 20 20 20 20 20  |20]             |
00002890  20 20 3b 72 37 20 68 6f  6c 64 73 20 79 6f 75 72  |  ;r7 holds your|
000028a0  20 66 61 63 69 6e 67 20  61 6e 67 6c 65 20 28 79  | facing angle (y|
000028b0  20 61 78 69 73 29 0d 0e  9c 04 0d 0e a6 0f 20 2e  | axis)........ .|
000028c0  6c 6f 6f 70 5f 62 75 66  66 0d 0e b0 48 20 4c 44  |loop_buff...H LD|
000028d0  52 20 52 30 2c 5b 52 31  31 2c 52 31 30 2c 41 53  |R R0,[R11,R10,AS|
000028e0  4c 20 23 6f 62 6a 65 63  74 5f 6c 65 6e 67 74 68  |L #object_length|
000028f0  6c 6f 67 25 5d 3b 72 30  20 63 6f 6e 74 61 69 6e  |log%];r0 contain|
00002900  73 20 6f 62 6a 65 63 74  20 72 65 66 20 63 6f 64  |s object ref cod|
00002910  65 0d 0e ba 44 20 43 4d  50 20 52 30 2c 23 30 3a  |e...D CMP R0,#0:|
00002920  42 45 51 20 64 65 61 64  5f 6f 62 6a 20 20 20 20  |BEQ dead_obj    |
00002930  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 63 68  |             ;ch|
00002940  65 63 6b 20 69 66 20 6f  62 6a 65 63 74 20 69 73  |eck if object is|
00002950  20 64 65 61 64 0d 0e c4  4c 20 41 44 44 20 52 39  | dead...L ADD R9|
00002960  2c 52 31 31 2c 52 31 30  2c 41 53 4c 20 23 6f 62  |,R11,R10,ASL #ob|
00002970  6a 65 63 74 5f 6c 65 6e  67 74 68 6c 6f 67 25 20  |ject_lengthlog% |
00002980  20 3b 72 39 20 70 6f 69  6e 74 73 20 74 6f 20 62  | ;r9 points to b|
00002990  65 67 69 6e 69 6e 67 20  6f 66 20 6f 62 6a 65 63  |egining of objec|
000029a0  74 0d 0e ce 0e 20 4d 4f  56 20 52 38 2c 52 30 0d  |t.... MOV R8,R0.|
000029b0  0e d8 04 0d 0e e2 11 20  4d 4f 56 20 52 32 2c 23  |....... MOV R2,#|
000029c0  34 30 39 36 0d 0e ec 38  20 53 55 42 20 52 32 2c  |4096...8 SUB R2,|
000029d0  52 32 2c 23 31 20 20 20  20 20 20 20 20 20 20 20  |R2,#1           |
000029e0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000029f0  3b 73 65 74 20 72 32 3d  34 30 39 35 0d 0e f6 04  |;set r2=4095....|
00002a00  0d 0f 00 46 20 4c 44 52  20 52 31 2c 5b 52 39 2c  |...F LDR R1,[R9,|
00002a10  23 31 36 5d 20 20 20 20  20 20 20 20 20 20 20 20  |#16]            |
00002a20  20 20 20 20 20 20 20 20  20 20 20 20 3b 69 6e 63  |            ;inc|
00002a30  20 78 20 61 6e 67 20 62  79 20 61 6e 67 20 76 65  | x ang by ang ve|
00002a40  6c 6f 63 69 74 79 0d 0f  0a 14 20 4c 44 52 20 52  |locity.... LDR R|
00002a50  33 2c 5b 52 39 2c 23 36  38 5d 0d 0f 14 11 20 41  |3,[R9,#68].... A|
00002a60  44 44 20 52 31 2c 52 31  2c 52 33 0d 0f 1e 36 20  |DD R1,R1,R3...6 |
00002a70  80 20 52 31 2c 52 31 2c  52 32 20 20 20 20 20 20  |. R1,R1,R2      |
00002a80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002a90  20 20 20 20 20 3b 72 61  6e 67 65 20 63 68 65 65  |     ;range chee|
00002aa0  6b 0d 0f 28 14 20 53 54  52 20 52 31 2c 5b 52 39  |k..(. STR R1,[R9|
00002ab0  2c 23 31 36 5d 0d 0f 32  04 0d 0f 3c 48 20 4c 44  |,#16]..2...<H LD|
00002ac0  52 20 52 31 2c 5b 52 39  2c 23 32 30 5d 20 20 20  |R R1,[R9,#20]   |
00002ad0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002ae0  20 20 20 20 20 3b 72 65  70 65 61 74 20 61 62 6f  |     ;repeat abo|
00002af0  76 65 20 66 6f 72 20 79  2c 78 20 61 6e 67 6c 65  |ve for y,x angle|
00002b00  73 0d 0f 46 14 20 4c 44  52 20 52 33 2c 5b 52 39  |s..F. LDR R3,[R9|
00002b10  2c 23 37 32 5d 0d 0f 50  11 20 41 44 44 20 52 31  |,#72]..P. ADD R1|
00002b20  2c 52 31 2c 52 33 0d 0f  5a 0f 20 80 20 52 31 2c  |,R1,R3..Z. . R1,|
00002b30  52 31 2c 52 32 0d 0f 64  14 20 53 54 52 20 52 31  |R1,R2..d. STR R1|
00002b40  2c 5b 52 39 2c 23 32 30  5d 0d 0f 6e 04 0d 0f 78  |,[R9,#20]..n...x|
00002b50  14 20 4c 44 52 20 52 31  2c 5b 52 39 2c 23 32 34  |. LDR R1,[R9,#24|
00002b60  5d 0d 0f 82 14 20 4c 44  52 20 52 33 2c 5b 52 39  |].... LDR R3,[R9|
00002b70  2c 23 37 36 5d 0d 0f 8c  11 20 41 44 44 20 52 31  |,#76].... ADD R1|
00002b80  2c 52 31 2c 52 33 0d 0f  96 0f 20 80 20 52 31 2c  |,R1,R3.... . R1,|
00002b90  52 31 2c 52 32 0d 0f a0  14 20 53 54 52 20 52 31  |R1,R2.... STR R1|
00002ba0  2c 5b 52 39 2c 23 32 34  5d 0d 0f aa 04 0d 0f b4  |,[R9,#24].......|
00002bb0  4d 20 4c 44 52 20 52 31  2c 5b 52 39 2c 23 31 36  |M LDR R1,[R9,#16|
00002bc0  5d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |]               |
00002bd0  20 20 20 20 20 20 20 20  20 3b 63 6f 70 79 20 78  |         ;copy x|
00002be0  20 61 6e 67 20 69 6e 74  6f 20 74 65 6d 70 20 78  | ang into temp x|
00002bf0  20 61 6e 67 20 73 74 6f  72 65 0d 0f be 0f 20 80  | ang store.... .|
00002c00  20 52 31 2c 52 31 2c 52  32 0d 0f c8 14 20 53 54  | R1,R1,R2.... ST|
00002c10  52 20 52 31 2c 5b 52 39  2c 23 34 30 5d 0d 0f d2  |R R1,[R9,#40]...|
00002c20  04 0d 0f dc 4d 20 4c 44  52 20 52 31 2c 5b 52 39  |....M LDR R1,[R9|
00002c30  2c 23 32 30 5d 20 20 20  20 20 20 20 20 20 20 20  |,#20]           |
00002c40  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 63 6f  |             ;co|
00002c50  70 79 20 79 20 61 6e 67  20 69 6e 74 6f 20 74 65  |py y ang into te|
00002c60  6d 70 20 79 20 61 6e 67  20 73 74 6f 72 65 0d 0f  |mp y ang store..|
00002c70  e6 4c 20 41 44 44 20 52  31 2c 52 31 2c 52 37 20  |.L ADD R1,R1,R7 |
00002c80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002c90  20 20 3b 65 78 63 65 70  74 69 6f 6e 20 6f 66 66  |  ;exception off|
00002ca0  73 65 74 20 61 6e 67 20  62 79 20 79 6f 75 72 20  |set ang by your |
00002cb0  79 20 61 78 69 73 20 61  6e 67 0d 0f f0 0f 20 80  |y axis ang.... .|
00002cc0  20 52 31 2c 52 31 2c 52  32 0d 0f fa 14 20 53 54  | R1,R1,R2.... ST|
00002cd0  52 20 52 31 2c 5b 52 39  2c 23 34 34 5d 0d 10 04  |R R1,[R9,#44]...|
00002ce0  04 0d 10 0e 4d 20 4c 44  52 20 52 31 2c 5b 52 39  |....M LDR R1,[R9|
00002cf0  2c 23 32 34 5d 20 20 20  20 20 20 20 20 20 20 20  |,#24]           |
00002d00  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 63 6f  |             ;co|
00002d10  70 79 20 7a 20 61 6e 67  20 69 6e 74 6f 20 74 65  |py z ang into te|
00002d20  6d 70 20 7a 20 61 6e 67  20 73 74 6f 72 65 0d 10  |mp z ang store..|
00002d30  18 0f 20 80 20 52 31 2c  52 31 2c 52 32 0d 10 22  |.. . R1,R1,R2.."|
00002d40  14 20 53 54 52 20 52 31  2c 5b 52 39 2c 23 34 38  |. STR R1,[R9,#48|
00002d50  5d 0d 10 2c 04 0d 10 36  43 20 4c 44 52 20 52 31  |]..,...6C LDR R1|
00002d60  2c 5b 52 39 2c 23 34 5d  20 20 20 20 20 20 20 20  |,[R9,#4]        |
00002d70  20 20 20 20 20 20 20 20  20 3b 6c 6f 61 64 73 20  |         ;loads |
00002d80  72 31 20 77 69 74 68 20  6f 72 69 67 69 6e 61 6c  |r1 with original|
00002d90  20 78 20 63 6f 6f 72 64  0d 10 40 43 20 4c 44 52  | x coord..@C LDR|
00002da0  20 52 32 2c 5b 52 39 2c  23 38 5d 20 20 20 20 20  | R2,[R9,#8]     |
00002db0  20 20 20 20 20 20 20 20  20 20 20 20 3b 6c 6f 61  |            ;loa|
00002dc0  64 73 20 72 32 20 77 69  74 68 20 6f 72 69 67 69  |ds r2 with origi|
00002dd0  6e 61 6c 20 79 20 63 6f  6f 72 64 0d 10 4a 43 20  |nal y coord..JC |
00002de0  4c 44 52 20 52 33 2c 5b  52 39 2c 23 31 32 5d 20  |LDR R3,[R9,#12] |
00002df0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00002e00  6c 6f 61 64 73 20 72 33  20 77 69 74 68 20 6f 72  |loads r3 with or|
00002e10  69 67 69 6e 61 6c 20 7a  20 63 6f 6f 72 64 0d 10  |iginal z coord..|
00002e20  54 04 0d 10 5e 3b 20 4c  44 52 20 52 30 2c 5b 52  |T...^; LDR R0,[R|
00002e30  39 2c 23 35 32 5d 20 20  20 20 20 20 20 20 20 20  |9,#52]          |
00002e40  20 20 20 20 20 20 3b 6f  66 66 73 65 74 20 70 6f  |      ;offset po|
00002e50  73 20 62 79 20 76 65 6c  6f 63 69 74 79 0d 10 68  |s by velocity..h|
00002e60  26 20 41 44 44 20 52 31  2c 52 31 2c 52 30 20 20  |& ADD R1,R1,R0  |
00002e70  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00002e80  20 3b 78 0d 10 72 14 20  4c 44 52 20 52 30 2c 5b  | ;x..r. LDR R0,[|
00002e90  52 39 2c 23 35 36 5d 0d  10 7c 26 20 41 44 44 20  |R9,#56]..|& ADD |
00002ea0  52 32 2c 52 32 2c 52 30  20 20 20 20 20 20 20 20  |R2,R2,R0        |
00002eb0  20 20 20 20 20 20 20 20  20 20 20 3b 79 0d 10 86  |           ;y...|
00002ec0  14 20 4c 44 52 20 52 30  2c 5b 52 39 2c 23 36 30  |. LDR R0,[R9,#60|
00002ed0  5d 0d 10 90 26 20 41 44  44 20 52 33 2c 52 33 2c  |]...& ADD R3,R3,|
00002ee0  52 30 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |R0              |
00002ef0  20 20 20 20 20 3b 7a 0d  10 9a 04 0d 10 a4 44 20  |     ;z.......D |
00002f00  53 54 52 20 52 31 2c 5b  52 39 2c 23 34 5d 20 20  |STR R1,[R9,#4]  |
00002f10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00002f20  73 74 6f 72 65 73 20 72  31 20 77 69 74 68 20 6f  |stores r1 with o|
00002f30  72 69 67 69 6e 61 6c 20  78 20 63 6f 6f 72 64 0d  |riginal x coord.|
00002f40  10 ae 44 20 53 54 52 20  52 32 2c 5b 52 39 2c 23  |..D STR R2,[R9,#|
00002f50  38 5d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |8]              |
00002f60  20 20 20 3b 73 74 6f 72  65 73 20 72 32 20 77 69  |   ;stores r2 wi|
00002f70  74 68 20 6f 72 69 67 69  6e 61 6c 20 79 20 63 6f  |th original y co|
00002f80  6f 72 64 0d 10 b8 44 20  53 54 52 20 52 33 2c 5b  |ord...D STR R3,[|
00002f90  52 39 2c 23 31 32 5d 20  20 20 20 20 20 20 20 20  |R9,#12]         |
00002fa0  20 20 20 20 20 20 20 3b  73 74 6f 72 65 73 20 72  |       ;stores r|
00002fb0  33 20 77 69 74 68 20 6f  72 69 67 69 6e 61 6c 20  |3 with original |
00002fc0  7a 20 63 6f 6f 72 64 0d  10 c2 04 0d 10 cc 4a 20  |z coord.......J |
00002fd0  53 55 42 20 52 31 2c 52  31 2c 52 34 20 20 20 20  |SUB R1,R1,R4    |
00002fe0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00002ff0  70 6c 61 63 65 73 20 6f  62 6a 65 63 74 73 20 63  |places objects c|
00003000  6f 6f 72 64 73 20 72 65  6c 61 74 69 76 65 20 74  |oords relative t|
00003010  6f 20 79 6f 75 0d 10 d6  11 20 53 55 42 20 52 32  |o you.... SUB R2|
00003020  2c 52 32 2c 52 35 0d 10  e0 11 20 53 55 42 20 52  |,R2,R5.... SUB R|
00003030  33 2c 52 33 2c 52 36 0d  10 ea 04 0d 10 f4 15 20  |3,R3,R6........ |
00003040  4d 4f 56 20 52 31 2c 52  31 2c 41 53 52 20 23 38  |MOV R1,R1,ASR #8|
00003050  0d 10 fe 15 20 4d 4f 56  20 52 32 2c 52 32 2c 41  |.... MOV R2,R2,A|
00003060  53 52 20 23 38 0d 11 08  15 20 4d 4f 56 20 52 33  |SR #8.... MOV R3|
00003070  2c 52 33 2c 41 53 52 20  23 38 0d 11 12 04 0d 11  |,R3,ASR #8......|
00003080  1c 3c 20 4d 4f 56 20 52  30 2c 23 31 37 20 20 20  |.< MOV R0,#17   |
00003090  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000030a0  20 20 3b 73 63 61 6c 65  20 6f 66 20 69 6e 70 75  |  ;scale of inpu|
000030b0  74 20 72 65 67 69 73 74  6f 72 0d 11 26 3e 20 42  |t registor..&> B|
000030c0  4c 20 72 6f 74 61 74 65  5f 79 5f 61 78 69 73 20  |L rotate_y_axis |
000030d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 72  |              ;r|
000030e0  6f 74 61 74 65 73 20 6f  62 6a 65 63 74 20 61 72  |otates object ar|
000030f0  6f 75 6e 64 20 79 6f 75  0d 11 30 04 0d 11 3a 4b  |ound you..0...:K|
00003100  20 53 54 52 20 52 31 2c  5b 52 39 2c 23 32 38 5d  | STR R1,[R9,#28]|
00003110  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003120  3b 73 74 6f 72 65 73 20  78 2c 79 2c 78 20 69 6e  |;stores x,y,x in|
00003130  20 74 65 6d 70 20 72 6f  74 61 74 65 64 20 6c 6f  | temp rotated lo|
00003140  63 61 74 69 6f 6e 73 0d  11 44 14 20 53 54 52 20  |cations..D. STR |
00003150  52 32 2c 5b 52 39 2c 23  33 32 5d 0d 11 4e 14 20  |R2,[R9,#32]..N. |
00003160  53 54 52 20 52 33 2c 5b  52 39 2c 23 33 36 5d 0d  |STR R3,[R9,#36].|
00003170  11 58 04 0d 11 62 04 0d  11 6c 15 20 4d 4f 56 20  |.X...b...l. MOV |
00003180  52 31 2c 52 31 2c 41 53  52 20 23 35 0d 11 76 15  |R1,R1,ASR #5..v.|
00003190  20 4d 4f 56 20 52 33 2c  52 33 2c 41 53 52 20 23  | MOV R3,R3,ASR #|
000031a0  35 0d 11 80 13 20 41 44  44 20 52 31 2c 52 31 2c  |5.... ADD R1,R1,|
000031b0  23 32 35 36 0d 11 8a 18  20 41 44 44 20 52 32 2c  |#256.... ADD R2,|
000031c0  52 33 2c 23 31 30 32 34  2d 32 35 36 0d 11 94 43  |R3,#1024-256...C|
000031d0  20 43 4d 50 20 52 38 2c  23 31 3a ec 51 20 52 30  | CMP R8,#1:.Q R0|
000031e0  2c 23 31 38 3a 53 57 49  45 51 20 30 3a ec 51 20  |,#18:SWIEQ 0:.Q |
000031f0  52 30 2c 23 30 3a 53 57  49 45 51 20 30 3a ec 51  |R0,#0:SWIEQ 0:.Q|
00003200  20 52 30 2c 23 31 33 3a  53 57 49 45 51 20 30 0d  | R0,#13:SWIEQ 0.|
00003210  11 9e 43 20 43 4d 50 20  52 38 2c 23 32 3a ec 51  |..C CMP R8,#2:.Q|
00003220  20 52 30 2c 23 31 38 3a  53 57 49 45 51 20 30 3a  | R0,#18:SWIEQ 0:|
00003230  ec 51 20 52 30 2c 23 30  3a 53 57 49 45 51 20 30  |.Q R0,#0:SWIEQ 0|
00003240  3a ec 51 20 52 30 2c 23  31 34 3a 53 57 49 45 51  |:.Q R0,#14:SWIEQ|
00003250  20 30 0d 11 a8 43 20 43  4d 50 20 52 38 2c 23 33  | 0...C CMP R8,#3|
00003260  3a ec 51 20 52 30 2c 23  31 38 3a 53 57 49 45 51  |:.Q R0,#18:SWIEQ|
00003270  20 30 3a ec 51 20 52 30  2c 23 30 3a 53 57 49 45  | 0:.Q R0,#0:SWIE|
00003280  51 20 30 3a ec 51 20 52  30 2c 23 31 32 3a 53 57  |Q 0:.Q R0,#12:SW|
00003290  49 45 51 20 30 0d 11 b2  43 20 43 4d 50 20 52 38  |IEQ 0...C CMP R8|
000032a0  2c 23 34 3a ec 51 20 52  30 2c 23 31 38 3a 53 57  |,#4:.Q R0,#18:SW|
000032b0  49 45 51 20 30 3a ec 51  20 52 30 2c 23 30 3a 53  |IEQ 0:.Q R0,#0:S|
000032c0  57 49 45 51 20 30 3a ec  51 20 52 30 2c 23 31 35  |WIEQ 0:.Q R0,#15|
000032d0  3a 53 57 49 45 51 20 30  0d 11 bc 43 20 43 4d 50  |:SWIEQ 0...C CMP|
000032e0  20 52 38 2c 23 35 3a ec  51 20 52 30 2c 23 31 38  | R8,#5:.Q R0,#18|
000032f0  3a 53 57 49 45 51 20 30  3a ec 51 20 52 30 2c 23  |:SWIEQ 0:.Q R0,#|
00003300  30 3a 53 57 49 45 51 20  30 3a ec 51 20 52 30 2c  |0:SWIEQ 0:.Q R0,|
00003310  23 31 33 3a 53 57 49 45  51 20 30 0d 11 c6 43 20  |#13:SWIEQ 0...C |
00003320  43 4d 50 20 52 38 2c 23  36 3a ec 51 20 52 30 2c  |CMP R8,#6:.Q R0,|
00003330  23 31 38 3a 53 57 49 45  51 20 30 3a ec 51 20 52  |#18:SWIEQ 0:.Q R|
00003340  30 2c 23 30 3a 53 57 49  45 51 20 30 3a ec 51 20  |0,#0:SWIEQ 0:.Q |
00003350  52 30 2c 23 31 35 3a 53  57 49 45 51 20 30 0d 11  |R0,#15:SWIEQ 0..|
00003360  d0 69 20 43 4d 50 20 52  38 2c 23 37 3a ec 51 20  |.i CMP R8,#7:.Q |
00003370  52 30 2c 23 31 38 3a 53  57 49 45 51 20 30 3a ec  |R0,#18:SWIEQ 0:.|
00003380  51 20 52 30 2c 23 30 3a  53 57 49 45 51 20 30 3a  |Q R0,#0:SWIEQ 0:|
00003390  42 4c 45 51 20 72 61 6e  64 6f 6d 5f 6e 75 6d 62  |BLEQ random_numb|
000033a0  65 72 3a 80 45 51 20 52  30 2c 52 30 2c 23 33 3a  |er:.EQ R0,R0,#3:|
000033b0  41 44 44 45 51 20 52 30  2c 52 30 2c 23 31 32 3a  |ADDEQ R0,R0,#12:|
000033c0  53 57 49 45 51 20 30 0d  11 da 0f 20 4d 4f 56 20  |SWIEQ 0.... MOV |
000033d0  52 30 2c 23 36 39 0d 11  e4 0c 20 53 57 49 20 26  |R0,#69.... SWI &|
000033e0  34 35 0d 11 ee 04 0d 11  f8 0e 20 2e 64 65 61 64  |45........ .dead|
000033f0  5f 6f 62 6a 0d 12 02 0f  5c 3f 3f 3f 3f 3f 3f 3f  |_obj....\???????|
00003400  3f 3f 3f 0d 12 0c 3b 20  41 44 44 20 52 31 30 2c  |???...; ADD R10,|
00003410  52 31 30 2c 23 31 20 20  20 20 20 20 20 20 20 20  |R10,#1          |
00003420  20 20 20 20 20 20 20 3b  69 6e 63 72 65 6d 65 6e  |       ;incremen|
00003430  74 20 63 6f 75 6e 74 20  6f 6e 20 72 31 30 0d 12  |t count on r10..|
00003440  16 43 20 43 4d 50 20 52  31 30 2c 23 6d 61 78 5f  |.C CMP R10,#max_|
00003450  6f 62 6a 65 63 74 73 25  20 20 20 20 20 20 20 20  |objects%        |
00003460  20 20 3b 63 68 65 63 6b  20 66 6f 72 20 65 6e 64  |  ;check for end|
00003470  20 6f 66 20 63 6f 75 6e  74 20 72 65 61 63 68 65  | of count reache|
00003480  64 0d 12 20 12 20 42 4c  54 20 6c 6f 6f 70 5f 62  |d.. . BLT loop_b|
00003490  75 66 66 0d 12 2a 04 0d  12 34 4e 20 3b 2a 2a 2a  |uff..*...4N ;***|
000034a0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 20  |*************** |
000034b0  73 6f 72 74 20 6f 75 74  20 2b 7a 20 6f 62 6a 65  |sort out +z obje|
000034c0  63 74 73 20 61 6e 64 20  63 61 6c 6c 20 64 72 61  |cts and call dra|
000034d0  77 20 72 6f 75 74 69 6e  65 73 20 2a 2a 2a 2a 2a  |w routines *****|
000034e0  2a 2a 2a 2a 2a 0d 12 3e  04 0d 12 48 0f 20 4d 4f  |*****..>...H. MO|
000034f0  56 20 52 31 30 2c 23 31  0d 12 52 0e 20 4d 4f 56  |V R10,#1..R. MOV|
00003500  20 52 30 2c 23 30 0d 12  5c 15 20 53 54 52 20 52  | R0,#0..\. STR R|
00003510  30 2c 5b 52 31 32 2c 23  36 30 5d 0d 12 66 0f 20  |0,[R12,#60]..f. |
00003520  2e 6c 6f 6f 70 5f 64 72  61 77 0d 12 70 48 20 4c  |.loop_draw..pH L|
00003530  44 52 20 52 30 2c 5b 52  31 31 2c 52 31 30 2c 41  |DR R0,[R11,R10,A|
00003540  53 4c 20 23 6f 62 6a 65  63 74 5f 6c 65 6e 67 74  |SL #object_lengt|
00003550  68 6c 6f 67 25 5d 3b 72  30 20 63 6f 6e 74 61 69  |hlog%];r0 contai|
00003560  6e 73 20 6f 62 6a 65 63  74 20 72 65 66 20 63 6f  |ns object ref co|
00003570  64 65 0d 12 7a 44 20 43  4d 50 20 52 30 2c 23 30  |de..zD CMP R0,#0|
00003580  3a 42 45 51 20 64 65 61  64 5f 6f 62 6a 31 20 20  |:BEQ dead_obj1  |
00003590  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 63  |              ;c|
000035a0  68 65 63 6b 20 69 66 20  6f 62 6a 65 63 74 20 69  |heck if object i|
000035b0  73 20 64 65 61 64 0d 12  84 4c 20 41 44 44 20 52  |s dead...L ADD R|
000035c0  39 2c 52 31 31 2c 52 31  30 2c 41 53 4c 20 23 6f  |9,R11,R10,ASL #o|
000035d0  62 6a 65 63 74 5f 6c 65  6e 67 74 68 6c 6f 67 25  |bject_lengthlog%|
000035e0  20 20 3b 72 39 20 70 6f  69 6e 74 73 20 74 6f 20  |  ;r9 points to |
000035f0  62 65 67 69 6e 69 6e 67  20 6f 66 20 6f 62 6a 65  |begining of obje|
00003600  63 74 0d 12 8e 31 20 20  20 20 20 20 20 20 20 20  |ct...1          |
00003610  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003620  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 64  |              ;d|
00003630  61 74 61 0d 12 98 43 20  4c 44 52 20 52 34 2c 5b  |ata...C LDR R4,[|
00003640  52 39 2c 23 32 38 5d 20  20 20 20 20 20 20 20 20  |R9,#28]         |
00003650  20 20 20 20 20 20 20 20  3b 6c 6f 61 64 73 20 72  |        ;loads r|
00003660  34 20 77 69 74 68 20 72  6f 74 61 74 65 64 20 78  |4 with rotated x|
00003670  20 63 6f 6f 72 64 0d 12  a2 43 20 4c 44 52 20 52  | coord...C LDR R|
00003680  35 2c 5b 52 39 2c 23 33  32 5d 20 20 20 20 20 20  |5,[R9,#32]      |
00003690  20 20 20 20 20 20 20 20  20 20 20 3b 6c 6f 61 64  |           ;load|
000036a0  73 20 72 35 20 77 69 74  68 20 72 6f 74 61 74 65  |s r5 with rotate|
000036b0  64 20 79 20 63 6f 6f 72  64 0d 12 ac 43 20 4c 44  |d y coord...C LD|
000036c0  52 20 52 36 2c 5b 52 39  2c 23 33 36 5d 20 20 20  |R R6,[R9,#36]   |
000036d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 6c  |              ;l|
000036e0  6f 61 64 73 20 72 36 20  77 69 74 68 20 72 6f 74  |oads r6 with rot|
000036f0  61 74 65 64 20 7a 20 63  6f 6f 72 64 0d 12 b6 04  |ated z coord....|
00003700  0d 12 c0 1b 20 43 4d 50  20 52 36 2c 23 28 28 34  |.... CMP R6,#((4|
00003710  30 39 36 2a 34 29 2d 35  31 32 29 0d 12 ca 12 20  |096*4)-512).... |
00003720  42 47 54 20 64 65 61 64  5f 6f 62 6a 31 0d 12 d4  |BGT dead_obj1...|
00003730  11 20 43 4d 50 20 52 36  2c 23 34 35 2a 46 0d 12  |. CMP R6,#45*F..|
00003740  de 12 20 42 4c 54 20 64  65 61 64 5f 6f 62 6a 31  |.. BLT dead_obj1|
00003750  0d 12 e8 04 0d 12 f2 48  20 42 4c 20 76 65 72 74  |.......H BL vert|
00003760  65 78 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |ex              |
00003770  20 20 20 20 20 20 20 20  3b 73 70 69 6e 73 20 74  |        ;spins t|
00003780  68 65 20 76 65 72 74 69  63 69 65 73 20 62 79 20  |he verticies by |
00003790  78 2c 79 2c 7a 20 61 6e  67 6c 65 73 0d 12 fc 43  |x,y,z angles...C|
000037a0  20 42 4c 20 64 72 61 77  5f 66 61 63 65 74 73 20  | BL draw_facets |
000037b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000037c0  3b 64 72 61 77 73 20 76  69 73 61 62 6c 65 20 66  |;draws visable f|
000037d0  61 63 65 74 73 20 74 6f  20 73 63 72 65 65 6e 0d  |acets to screen.|
000037e0  13 06 04 0d 13 10 19 20  43 4d 50 20 52 30 2c 23  |....... CMP R0,#|
000037f0  33 3a 42 45 51 20 64 65  74 65 63 74 0d 13 1a 19  |3:BEQ detect....|
00003800  20 43 4d 50 20 52 30 2c  23 37 3a 42 45 51 20 64  | CMP R0,#7:BEQ d|
00003810  65 74 65 63 74 0d 13 24  10 20 42 20 64 65 61 64  |etect..$. B dead|
00003820  5f 6f 62 6a 31 0d 13 2e  0c 20 2e 64 65 74 65 63  |_obj1.... .detec|
00003830  74 0d 13 38 0e 20 4d 4f  56 20 52 30 2c 23 31 0d  |t..8. MOV R0,#1.|
00003840  13 42 0e 20 43 4d 50 20  52 34 2c 23 30 0d 13 4c  |.B. CMP R4,#0..L|
00003850  10 20 4d 56 4e 4c 54 20  52 37 2c 52 34 0d 13 56  |. MVNLT R7,R4..V|
00003860  10 20 4d 4f 56 47 45 20  52 37 2c 52 34 0d 13 60  |. MOVGE R7,R4..`|
00003870  0f 20 43 4d 50 20 52 37  2c 23 35 30 0d 13 6a 17  |. CMP R7,#50..j.|
00003880  20 53 54 52 4c 45 20 52  30 2c 5b 52 31 32 2c 23  | STRLE R0,[R12,#|
00003890  36 30 5d 0d 13 74 04 0d  13 7e 0f 20 2e 64 65 61  |60]..t...~. .dea|
000038a0  64 5f 6f 62 6a 31 0d 13  88 3b 20 41 44 44 20 52  |d_obj1...; ADD R|
000038b0  31 30 2c 52 31 30 2c 23  31 20 20 20 20 20 20 20  |10,R10,#1       |
000038c0  20 20 20 20 20 20 20 20  20 20 3b 69 6e 63 72 65  |          ;incre|
000038d0  6d 65 6e 74 20 63 6f 75  6e 74 20 6f 6e 20 72 31  |ment count on r1|
000038e0  30 0d 13 92 43 20 43 4d  50 20 52 31 30 2c 23 6d  |0...C CMP R10,#m|
000038f0  61 78 5f 6f 62 6a 65 63  74 73 25 20 20 20 20 20  |ax_objects%     |
00003900  20 20 20 20 20 3b 63 68  65 63 6b 20 66 6f 72 20  |     ;check for |
00003910  65 6e 64 20 6f 66 20 63  6f 75 6e 74 20 72 65 61  |end of count rea|
00003920  63 68 65 64 0d 13 9c 12  20 42 4c 54 20 6c 6f 6f  |ched.... BLT loo|
00003930  70 5f 64 72 61 77 0d 13  a6 04 0d 13 b0 36 20 4d  |p_draw.......6 M|
00003940  4f 56 20 52 30 2c 23 31  38 3a 53 57 49 20 30 3a  |OV R0,#18:SWI 0:|
00003950  4d 4f 56 20 52 30 2c 23  30 3a 53 57 49 20 30 3a  |MOV R0,#0:SWI 0:|
00003960  4d 4f 56 20 52 30 2c 23  31 32 3a 53 57 49 20 30  |MOV R0,#12:SWI 0|
00003970  0d 13 ba 04 0d 13 c4 15  20 4c 44 52 20 52 30 2c  |........ LDR R0,|
00003980  5b 52 31 32 2c 23 36 30  5d 0d 13 ce 0e 20 43 4d  |[R12,#60].... CM|
00003990  50 20 52 30 2c 23 30 0d  13 d8 15 20 5c f4 20 42  |P R0,#0.... \. B|
000039a0  47 54 20 6f 6e 5f 74 61  72 67 65 74 0d 13 e2 0e  |GT on_target....|
000039b0  20 4d 4f 56 20 52 30 2c  23 34 0d 13 ec 10 20 4d  | MOV R0,#4.... M|
000039c0  4f 56 20 52 31 2c 23 36  30 30 0d 13 f6 10 20 4d  |OV R1,#600.... M|
000039d0  4f 56 20 52 32 2c 23 34  39 32 0d 14 00 0c 20 53  |OV R2,#492.... S|
000039e0  57 49 20 26 34 35 0d 14  0a 0e 20 4d 4f 56 20 52  |WI &45.... MOV R|
000039f0  30 2c 23 35 0d 14 14 10  20 4d 4f 56 20 52 32 2c  |0,#5.... MOV R2,|
00003a00  23 34 37 32 0d 14 1e 0c  20 53 57 49 20 26 34 35  |#472.... SWI &45|
00003a10  0d 14 28 10 20 4d 4f 56  20 52 31 2c 23 36 32 30  |..(. MOV R1,#620|
00003a20  0d 14 32 0c 20 53 57 49  20 26 34 35 0d 14 3c 0e  |..2. SWI &45..<.|
00003a30  20 4d 4f 56 20 52 30 2c  23 34 0d 14 46 10 20 4d  | MOV R0,#4..F. M|
00003a40  4f 56 20 52 31 2c 23 36  36 30 0d 14 50 0c 20 53  |OV R1,#660..P. S|
00003a50  57 49 20 26 34 35 0d 14  5a 0e 20 4d 4f 56 20 52  |WI &45..Z. MOV R|
00003a60  30 2c 23 35 0d 14 64 10  20 4d 4f 56 20 52 31 2c  |0,#5..d. MOV R1,|
00003a70  23 36 38 30 0d 14 6e 0c  20 53 57 49 20 26 34 35  |#680..n. SWI &45|
00003a80  0d 14 78 10 20 4d 4f 56  20 52 32 2c 23 34 39 32  |..x. MOV R2,#492|
00003a90  0d 14 82 0c 20 53 57 49  20 26 34 35 0d 14 8c 0e  |.... SWI &45....|
00003aa0  20 4d 4f 56 20 52 30 2c  23 34 0d 14 96 10 20 4d  | MOV R0,#4.... M|
00003ab0  4f 56 20 52 32 2c 23 35  33 32 0d 14 a0 0c 20 53  |OV R2,#532.... S|
00003ac0  57 49 20 26 34 35 0d 14  aa 0e 20 4d 4f 56 20 52  |WI &45.... MOV R|
00003ad0  30 2c 23 35 0d 14 b4 10  20 4d 4f 56 20 52 32 2c  |0,#5.... MOV R2,|
00003ae0  23 35 35 32 0d 14 be 0c  20 53 57 49 20 26 34 35  |#552.... SWI &45|
00003af0  0d 14 c8 10 20 4d 4f 56  20 52 31 2c 23 36 36 30  |.... MOV R1,#660|
00003b00  0d 14 d2 0c 20 53 57 49  20 26 34 35 0d 14 dc 0e  |.... SWI &45....|
00003b10  20 4d 4f 56 20 52 30 2c  23 34 0d 14 e6 10 20 4d  | MOV R0,#4.... M|
00003b20  4f 56 20 52 31 2c 23 36  32 30 0d 14 f0 0c 20 53  |OV R1,#620.... S|
00003b30  57 49 20 26 34 35 0d 14  fa 0e 20 4d 4f 56 20 52  |WI &45.... MOV R|
00003b40  30 2c 23 35 0d 15 04 10  20 4d 4f 56 20 52 31 2c  |0,#5.... MOV R1,|
00003b50  23 36 30 30 0d 15 0e 0c  20 53 57 49 20 26 34 35  |#600.... SWI &45|
00003b60  0d 15 18 10 20 4d 4f 56  20 52 32 2c 23 35 33 32  |.... MOV R2,#532|
00003b70  0d 15 22 0c 20 53 57 49  20 26 34 35 0d 15 2c 14  |..". SWI &45..,.|
00003b80  20 5c f4 20 42 20 6f 66  66 5f 74 61 72 67 65 74  | \. B off_target|
00003b90  0d 15 36 3f 20 42 4c 45  20 6f 66 66 5f 74 61 72  |..6? BLE off_tar|
00003ba0  67 65 74 20 20 20 3b 20  6b 69 6c 6c 20 74 68 69  |get   ; kill thi|
00003bb0  73 20 74 6f 20 72 65 74  75 72 6e 20 74 6f 20 6f  |s to return to o|
00003bc0  72 69 67 69 6e 61 6c 20  70 72 6f 67 72 61 6d 0d  |riginal program.|
00003bd0  15 40 04 0d 15 4a 12 20  5c f4 20 2e 6f 6e 5f 74  |.@...J. \. .on_t|
00003be0  61 72 67 65 74 0d 15 54  0e 20 4d 4f 56 20 52 30  |arget..T. MOV R0|
00003bf0  2c 23 34 0d 15 5e 10 20  4d 4f 56 20 52 31 2c 23  |,#4..^. MOV R1,#|
00003c00  36 30 30 0d 15 68 10 20  4d 4f 56 20 52 32 2c 23  |600..h. MOV R2,#|
00003c10  34 37 32 0d 15 72 0c 20  53 57 49 20 26 34 35 0d  |472..r. SWI &45.|
00003c20  15 7c 0e 20 4d 4f 56 20  52 30 2c 23 35 0d 15 86  |.|. MOV R0,#5...|
00003c30  10 20 4d 4f 56 20 52 31  2c 23 36 32 30 0d 15 90  |. MOV R1,#620...|
00003c40  10 20 4d 4f 56 20 52 32  2c 23 34 39 32 0d 15 9a  |. MOV R2,#492...|
00003c50  0c 20 53 57 49 20 26 34  35 0d 15 a4 0e 20 4d 4f  |. SWI &45.... MO|
00003c60  56 20 52 30 2c 23 34 0d  15 ae 10 20 4d 4f 56 20  |V R0,#4.... MOV |
00003c70  52 31 2c 23 36 36 30 0d  15 b8 0c 20 53 57 49 20  |R1,#660.... SWI |
00003c80  26 34 35 0d 15 c2 0e 20  4d 4f 56 20 52 30 2c 23  |&45.... MOV R0,#|
00003c90  35 0d 15 cc 10 20 4d 4f  56 20 52 31 2c 23 36 38  |5.... MOV R1,#68|
00003ca0  30 0d 15 d6 10 20 4d 4f  56 20 52 32 2c 23 34 37  |0.... MOV R2,#47|
00003cb0  32 0d 15 e0 0c 20 53 57  49 20 26 34 35 0d 15 ea  |2.... SWI &45...|
00003cc0  0e 20 4d 4f 56 20 52 30  2c 23 34 0d 15 f4 10 20  |. MOV R0,#4.... |
00003cd0  4d 4f 56 20 52 32 2c 23  35 35 32 0d 15 fe 0c 20  |MOV R2,#552.... |
00003ce0  53 57 49 20 26 34 35 0d  16 08 0e 20 4d 4f 56 20  |SWI &45.... MOV |
00003cf0  52 30 2c 23 35 0d 16 12  10 20 4d 4f 56 20 52 31  |R0,#5.... MOV R1|
00003d00  2c 23 36 36 30 0d 16 1c  10 20 4d 4f 56 20 52 32  |,#660.... MOV R2|
00003d10  2c 23 35 33 32 0d 16 26  0c 20 53 57 49 20 26 34  |,#532..&. SWI &4|
00003d20  35 0d 16 30 0e 20 4d 4f  56 20 52 30 2c 23 34 0d  |5..0. MOV R0,#4.|
00003d30  16 3a 10 20 4d 4f 56 20  52 31 2c 23 36 32 30 0d  |.:. MOV R1,#620.|
00003d40  16 44 0c 20 53 57 49 20  26 34 35 0d 16 4e 0e 20  |.D. SWI &45..N. |
00003d50  4d 4f 56 20 52 30 2c 23  35 0d 16 58 10 20 4d 4f  |MOV R0,#5..X. MO|
00003d60  56 20 52 31 2c 23 36 30  30 0d 16 62 10 20 4d 4f  |V R1,#600..b. MO|
00003d70  56 20 52 32 2c 23 35 35  32 0d 16 6c 0c 20 53 57  |V R2,#552..l. SW|
00003d80  49 20 26 34 35 0d 16 76  04 0d 16 80 10 20 2e 6f  |I &45..v..... .o|
00003d90  66 66 5f 74 61 72 67 65  74 0d 16 8a 14 20 4c 44  |ff_target.... LD|
00003da0  4d 46 44 20 52 31 33 21  2c 7b 50 43 7d 0d 16 94  |MFD R13!,{PC}...|
00003db0  04 0d 16 9e 4e 20 3b 2a  2a 2a 2a 2a 2a 2a 2a 2a  |....N ;*********|
00003dc0  2a 2a 2a 2a 2a 2a 2a 2a  2a 20 72 6f 74 61 74 65  |********* rotate|
00003dd0  20 79 2c 7a 20 61 62 6f  75 74 20 78 20 61 78 69  | y,z about x axi|
00003de0  73 20 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |s **************|
00003df0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 0d  |***************.|
00003e00  16 a8 04 0d 16 b2 4e 20  2e 72 6f 74 61 74 65 5f  |......N .rotate_|
00003e10  78 5f 61 78 69 73 20 20  20 20 20 20 20 20 20 20  |x_axis          |
00003e20  20 20 20 3b 72 65 71 75  69 72 65 73 20 72 37 3d  |   ;requires r7=|
00003e30  61 6e 67 20 6f 66 20 72  6f 74 2c 72 32 3d 79 2c  |ang of rot,r2=y,|
00003e40  72 33 3d 7a 2c 72 30 3d  70 72 65 20 73 68 69 66  |r3=z,r0=pre shif|
00003e50  74 0d 16 bc 1c 20 53 54  4d 46 44 20 52 31 33 21  |t.... STMFD R13!|
00003e60  2c 7b 52 34 2d 52 31 31  2c 52 31 34 7d 0d 16 c6  |,{R4-R11,R14}...|
00003e70  45 20 4c 44 52 20 52 31  30 2c 5b 52 31 32 2c 23  |E LDR R10,[R12,#|
00003e80  34 5d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |4]              |
00003e90  20 3b 72 31 30 20 70 6f  69 6e 74 73 20 74 6f 20  | ;r10 points to |
00003ea0  73 74 61 72 74 20 6f 66  20 73 69 6e 20 74 61 62  |start of sin tab|
00003eb0  6c 65 0d 16 d0 45 20 4c  44 52 20 52 31 31 2c 5b  |le...E LDR R11,[|
00003ec0  52 31 32 2c 23 38 5d 20  20 20 20 20 20 20 20 20  |R12,#8]         |
00003ed0  20 20 20 20 20 20 3b 72  31 31 20 70 6f 69 6e 74  |      ;r11 point|
00003ee0  73 20 74 6f 20 73 74 61  72 74 20 6f 66 20 63 6f  |s to start of co|
00003ef0  73 20 74 61 62 6c 65 0d  16 da 43 20 4c 44 52 20  |s table...C LDR |
00003f00  52 34 2c 5b 52 31 30 2c  52 37 2c 41 53 4c 20 23  |R4,[R10,R7,ASL #|
00003f10  32 5d 20 20 20 20 20 20  20 20 20 3b 72 31 20 63  |2]         ;r1 c|
00003f20  6f 6e 74 61 69 6e 73 20  27 73 68 69 66 74 65 64  |ontains 'shifted|
00003f30  27 20 73 69 6e 20 28 72  37 29 0d 16 e4 43 20 4c  |' sin (r7)...C L|
00003f40  44 52 20 52 35 2c 5b 52  31 31 2c 52 37 2c 41 53  |DR R5,[R11,R7,AS|
00003f50  4c 20 23 32 5d 20 20 20  20 20 20 20 20 20 3b 72  |L #2]         ;r|
00003f60  32 20 63 6f 6e 74 61 69  6e 73 20 27 73 68 69 66  |2 contains 'shif|
00003f70  74 65 64 27 20 63 6f 73  20 28 72 37 29 0d 16 ee  |ted' cos (r7)...|
00003f80  3c 20 4d 4f 56 20 52 34  2c 52 34 2c 41 53 52 20  |< MOV R4,R4,ASR |
00003f90  52 30 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |R0              |
00003fa0  20 3b 73 63 61 6c 65 20  73 69 6e 20 61 6e 64 20  | ;scale sin and |
00003fb0  63 6f 73 20 62 79 20 72  30 0d 16 f8 15 20 4d 4f  |cos by r0.... MO|
00003fc0  56 20 52 35 2c 52 35 2c  41 53 52 20 52 30 0d 17  |V R5,R5,ASR R0..|
00003fd0  02 45 20 52 53 42 20 52  30 2c 52 30 2c 23 33 30  |.E RSB R0,R0,#30|
00003fe0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00003ff0  20 20 3b 73 65 74 20 72  30 20 74 6f 20 72 65 6d  |  ;set r0 to rem|
00004000  61 6e 69 6e 67 20 62 69  74 73 20 6f 66 20 73 68  |aning bits of sh|
00004010  69 66 74 0d 17 0c 4b 20  4d 55 4c 20 52 36 2c 52  |ift...K MUL R6,R|
00004020  32 2c 52 34 20 20 20 20  20 20 20 20 20 20 20 20  |2,R4            |
00004030  20 20 20 20 20 20 20 3b  72 6f 74 61 74 69 6f 6e  |       ;rotation|
00004040  20 65 71 75 61 74 69 6f  6e 73 20 6f 6e 20 78 2c  | equations on x,|
00004050  7a 20 61 62 6f 75 74 20  79 20 61 78 69 73 0d 17  |z about y axis..|
00004060  16 11 20 4d 55 4c 20 52  37 2c 52 33 2c 52 35 0d  |.. MUL R7,R3,R5.|
00004070  17 20 11 20 53 55 42 20  52 38 2c 52 36 2c 52 37  |. . SUB R8,R6,R7|
00004080  0d 17 2a 11 20 4d 55 4c  20 52 36 2c 52 33 2c 52  |..*. MUL R6,R3,R|
00004090  34 0d 17 34 11 20 4d 55  4c 20 52 37 2c 52 32 2c  |4..4. MUL R7,R2,|
000040a0  52 35 0d 17 3e 11 20 41  44 44 20 52 37 2c 52 36  |R5..>. ADD R7,R6|
000040b0  2c 52 37 0d 17 48 45 20  4d 4f 56 20 52 32 2c 52  |,R7..HE MOV R2,R|
000040c0  37 2c 41 53 52 20 52 30  20 20 20 20 20 20 20 20  |7,ASR R0        |
000040d0  20 20 20 20 20 20 20 3b  73 63 61 6c 65 20 72 65  |       ;scale re|
000040e0  73 75 6c 74 20 62 79 20  72 65 6d 61 6e 69 6e 67  |sult by remaning|
000040f0  20 72 30 20 62 69 74 73  0d 17 52 15 20 4d 4f 56  | r0 bits..R. MOV|
00004100  20 52 33 2c 52 38 2c 41  53 52 20 52 30 0d 17 5c  | R3,R8,ASR R0..\|
00004110  1b 20 4c 44 4d 46 44 20  52 31 33 21 2c 7b 52 34  |. LDMFD R13!,{R4|
00004120  2d 52 31 31 2c 50 43 7d  0d 17 66 04 0d 17 70 4e  |-R11,PC}..f...pN|
00004130  20 3b 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  | ;**************|
00004140  2a 2a 2a 2a 20 72 6f 74  61 74 65 20 78 2c 7a 20  |**** rotate x,z |
00004150  61 62 6f 75 74 20 79 20  61 78 69 73 20 2a 2a 2a  |about y axis ***|
00004160  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00004170  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 0d 17 7a 04 0d 17  |**********..z...|
00004180  84 13 20 2e 72 6f 74 61  74 65 5f 79 5f 61 78 69  |.. .rotate_y_axi|
00004190  73 0d 17 8e 4d 20 53 54  4d 46 44 20 52 31 33 21  |s...M STMFD R13!|
000041a0  2c 7b 52 34 2d 52 31 31  2c 52 31 34 7d 20 20 20  |,{R4-R11,R14}   |
000041b0  20 20 20 20 20 20 20 3b  20 72 65 70 65 61 74 20  |       ; repeat |
000041c0  61 73 20 61 62 6f 75 65  20 72 6f 75 74 69 6e 65  |as aboue routine|
000041d0  20 65 78 63 65 70 74 20  79 20 61 78 69 73 0d 17  | except y axis..|
000041e0  98 15 20 4c 44 52 20 52  31 30 2c 5b 52 31 32 2c  |.. LDR R10,[R12,|
000041f0  23 34 5d 0d 17 a2 15 20  4c 44 52 20 52 31 31 2c  |#4].... LDR R11,|
00004200  5b 52 31 32 2c 23 38 5d  0d 17 ac 1b 20 4c 44 52  |[R12,#8].... LDR|
00004210  20 52 34 2c 5b 52 31 30  2c 52 37 2c 41 53 4c 20  | R4,[R10,R7,ASL |
00004220  23 32 5d 0d 17 b6 1b 20  4c 44 52 20 52 35 2c 5b  |#2].... LDR R5,[|
00004230  52 31 31 2c 52 37 2c 41  53 4c 20 23 32 5d 0d 17  |R11,R7,ASL #2]..|
00004240  c0 15 20 4d 4f 56 20 52  34 2c 52 34 2c 41 53 52  |.. MOV R4,R4,ASR|
00004250  20 52 30 0d 17 ca 15 20  4d 4f 56 20 52 35 2c 52  | R0.... MOV R5,R|
00004260  35 2c 41 53 52 20 52 30  0d 17 d4 12 20 52 53 42  |5,ASR R0.... RSB|
00004270  20 52 30 2c 52 30 2c 23  33 30 0d 17 de 11 20 4d  | R0,R0,#30.... M|
00004280  55 4c 20 52 36 2c 52 31  2c 52 34 0d 17 e8 11 20  |UL R6,R1,R4.... |
00004290  4d 55 4c 20 52 37 2c 52  33 2c 52 35 0d 17 f2 11  |MUL R7,R3,R5....|
000042a0  20 53 55 42 20 52 38 2c  52 36 2c 52 37 0d 17 fc  | SUB R8,R6,R7...|
000042b0  11 20 4d 55 4c 20 52 36  2c 52 33 2c 52 34 0d 18  |. MUL R6,R3,R4..|
000042c0  06 11 20 4d 55 4c 20 52  37 2c 52 31 2c 52 35 0d  |.. MUL R7,R1,R5.|
000042d0  18 10 11 20 41 44 44 20  52 37 2c 52 36 2c 52 37  |... ADD R7,R6,R7|
000042e0  0d 18 1a 15 20 4d 4f 56  20 52 31 2c 52 37 2c 41  |.... MOV R1,R7,A|
000042f0  53 52 20 52 30 0d 18 24  15 20 4d 4f 56 20 52 33  |SR R0..$. MOV R3|
00004300  2c 52 38 2c 41 53 52 20  52 30 0d 18 2e 1b 20 4c  |,R8,ASR R0.... L|
00004310  44 4d 46 44 20 52 31 33  21 2c 7b 52 34 2d 52 31  |DMFD R13!,{R4-R1|
00004320  31 2c 50 43 7d 0d 18 38  04 0d 18 42 4e 20 3b 2a  |1,PC}..8...BN ;*|
00004330  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00004340  2a 20 72 6f 74 61 74 65  20 78 2c 79 20 61 62 6f  |* rotate x,y abo|
00004350  75 74 20 7a 20 61 78 69  73 20 2a 2a 2a 2a 2a 2a  |ut z axis ******|
00004360  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00004370  2a 2a 2a 2a 2a 2a 2a 0d  18 4c 04 0d 18 56 13 20  |*******..L...V. |
00004380  2e 72 6f 74 61 74 65 5f  7a 5f 61 78 69 73 0d 18  |.rotate_z_axis..|
00004390  60 4d 20 53 54 4d 46 44  20 52 31 33 21 2c 7b 52  |`M STMFD R13!,{R|
000043a0  34 2d 52 31 31 2c 52 31  34 7d 20 20 20 20 20 20  |4-R11,R14}      |
000043b0  20 20 20 20 3b 20 72 65  70 65 61 74 20 61 73 20  |    ; repeat as |
000043c0  61 62 6f 75 65 20 72 6f  75 74 69 6e 65 20 65 78  |aboue routine ex|
000043d0  63 65 70 74 20 7a 20 61  78 69 73 0d 18 6a 15 20  |cept z axis..j. |
000043e0  4c 44 52 20 52 31 30 2c  5b 52 31 32 2c 23 34 5d  |LDR R10,[R12,#4]|
000043f0  0d 18 74 15 20 4c 44 52  20 52 31 31 2c 5b 52 31  |..t. LDR R11,[R1|
00004400  32 2c 23 38 5d 0d 18 7e  1b 20 4c 44 52 20 52 34  |2,#8]..~. LDR R4|
00004410  2c 5b 52 31 30 2c 52 37  2c 41 53 4c 20 23 32 5d  |,[R10,R7,ASL #2]|
00004420  0d 18 88 1b 20 4c 44 52  20 52 35 2c 5b 52 31 31  |.... LDR R5,[R11|
00004430  2c 52 37 2c 41 53 4c 20  23 32 5d 0d 18 92 15 20  |,R7,ASL #2].... |
00004440  4d 4f 56 20 52 34 2c 52  34 2c 41 53 52 20 52 30  |MOV R4,R4,ASR R0|
00004450  0d 18 9c 15 20 4d 4f 56  20 52 35 2c 52 35 2c 41  |.... MOV R5,R5,A|
00004460  53 52 20 52 30 0d 18 a6  12 20 52 53 42 20 52 30  |SR R0.... RSB R0|
00004470  2c 52 30 2c 23 33 30 0d  18 b0 11 20 4d 55 4c 20  |,R0,#30.... MUL |
00004480  52 36 2c 52 31 2c 52 34  0d 18 ba 11 20 4d 55 4c  |R6,R1,R4.... MUL|
00004490  20 52 37 2c 52 32 2c 52  35 0d 18 c4 11 20 53 55  | R7,R2,R5.... SU|
000044a0  42 20 52 38 2c 52 36 2c  52 37 0d 18 ce 11 20 4d  |B R8,R6,R7.... M|
000044b0  55 4c 20 52 36 2c 52 32  2c 52 34 0d 18 d8 11 20  |UL R6,R2,R4.... |
000044c0  4d 55 4c 20 52 37 2c 52  31 2c 52 35 0d 18 e2 11  |MUL R7,R1,R5....|
000044d0  20 41 44 44 20 52 37 2c  52 36 2c 52 37 0d 18 ec  | ADD R7,R6,R7...|
000044e0  15 20 4d 4f 56 20 52 31  2c 52 37 2c 41 53 52 20  |. MOV R1,R7,ASR |
000044f0  52 30 0d 18 f6 15 20 4d  4f 56 20 52 32 2c 52 38  |R0.... MOV R2,R8|
00004500  2c 41 53 52 20 52 30 0d  19 00 1b 20 4c 44 4d 46  |,ASR R0.... LDMF|
00004510  44 20 52 31 33 21 2c 7b  52 34 2d 52 31 31 2c 50  |D R13!,{R4-R11,P|
00004520  43 7d 0d 19 0a 04 0d 19  14 4d 20 3b 2a 2a 2a 2a  |C}.......M ;****|
00004530  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 20 72  |************** r|
00004540  6f 75 74 69 6e 65 20 74  6f 20 65 78 70 6c 6f 64  |outine to explod|
00004550  65 20 61 6c 6c 20 6f 62  6a 65 63 74 73 20 2a 2a  |e all objects **|
00004560  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00004570  2a 2a 2a 0d 19 1e 04 0d  19 28 0f 20 2e 67 61 6d  |***......(. .gam|
00004580  65 5f 6f 76 65 72 0d 19  32 15 20 53 54 4d 46 44  |e_over..2. STMFD|
00004590  20 52 31 33 21 2c 7b 52  31 34 7d 0d 19 3c 11 20  | R13!,{R14}..<. |
000045a0  42 4c 20 6c 6f 61 64 5f  69 6e 66 6f 0d 19 46 12  |BL load_info..F.|
000045b0  20 4c 44 52 20 52 31 31  2c 5b 52 31 32 5d 0d 19  | LDR R11,[R12]..|
000045c0  50 0f 20 4d 56 4e 20 52  31 30 2c 23 30 0d 19 5a  |P. MVN R10,#0..Z|
000045d0  17 20 2e 6c 6f 6f 70 5f  66 69 6e 64 5f 6f 62 6a  |. .loop_find_obj|
000045e0  65 63 74 32 0d 19 64 13  20 41 44 44 20 52 31 30  |ect2..d. ADD R10|
000045f0  2c 52 31 30 2c 23 31 0d  19 6e 48 20 4c 44 52 20  |,R10,#1..nH LDR |
00004600  52 30 2c 5b 52 31 31 2c  52 31 30 2c 41 53 4c 20  |R0,[R11,R10,ASL |
00004610  23 6f 62 6a 65 63 74 5f  6c 65 6e 67 74 68 6c 6f  |#object_lengthlo|
00004620  67 25 5d 3b 52 30 20 43  4f 4e 54 41 49 4e 53 20  |g%];R0 CONTAINS |
00004630  4f 42 4a 45 43 54 20 52  45 46 20 43 4f 44 45 0d  |OBJECT REF CODE.|
00004640  19 78 28 20 43 4d 50 20  52 31 30 2c 23 6d 61 78  |.x( CMP R10,#max|
00004650  5f 6f 62 6a 65 63 74 73  25 3a 42 47 45 20 66 69  |_objects%:BGE fi|
00004660  6e 6e 69 73 68 65 64 0d  19 82 45 20 43 4d 50 20  |nnished...E CMP |
00004670  52 30 2c 23 30 3a 42 45  51 20 6c 6f 6f 70 5f 66  |R0,#0:BEQ loop_f|
00004680  69 6e 64 5f 6f 62 6a 65  63 74 32 20 20 20 20 20  |ind_object2     |
00004690  20 20 20 20 3b 43 48 45  43 4b 20 e7 20 4f 42 4a  |    ;CHECK . OBJ|
000046a0  45 43 54 20 49 53 20 41  4c 49 56 45 0d 19 8c 47  |ECT IS ALIVE...G|
000046b0  20 41 44 44 20 52 39 2c  52 31 31 2c 52 31 30 2c  | ADD R9,R11,R10,|
000046c0  41 53 4c 20 23 6f 62 6a  65 63 74 5f 6c 65 6e 67  |ASL #object_leng|
000046d0  74 68 6c 6f 67 25 20 20  3b 52 38 20 c8 92 53 20  |thlog%  ;R8 ..S |
000046e0  b8 20 42 45 47 49 4e 49  4e 47 20 ca 20 4f 42 4a  |. BEGINING . OBJ|
000046f0  45 43 54 0d 19 96 1a 20  4d 4f 56 20 52 37 2c 23  |ECT.... MOV R7,#|
00004700  30 3a 53 54 52 20 52 37  2c 5b 52 39 5d 0d 19 a0  |0:STR R7,[R9]...|
00004710  0e 20 4d 4f 56 20 52 38  2c 23 32 0d 19 aa 0d 20  |. MOV R8,#2.... |
00004720  42 4c 20 65 78 70 6c 6f  0d 19 b4 18 20 42 20 6c  |BL explo.... B l|
00004730  6f 6f 70 5f 66 69 6e 64  5f 6f 62 6a 65 63 74 32  |oop_find_object2|
00004740  0d 19 be 0f 20 2e 66 69  6e 6e 69 73 68 65 64 0d  |.... .finnished.|
00004750  19 c8 14 20 4c 44 4d 46  44 20 52 31 33 21 2c 7b  |... LDMFD R13!,{|
00004760  50 43 7d 0d 19 d2 04 0d  19 dc 4e 20 3b 2a 2a 2a  |PC}.......N ;***|
00004770  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 20 72 6f  |************* ro|
00004780  75 74 69 6e 65 20 74 6f  20 61 64 6a 75 73 74 20  |utine to adjust |
00004790  76 65 72 74 69 63 65 73  20 6f 66 20 6f 62 6a 65  |vertices of obje|
000047a0  63 74 20 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |ct *************|
000047b0  2a 2a 2a 2a 2a 0d 19 e6  04 0d 19 f0 0c 20 2e 76  |*****........ .v|
000047c0  65 72 74 65 78 0d 19 fa  1c 20 53 54 4d 46 44 20  |ertex.... STMFD |
000047d0  52 31 33 21 2c 7b 52 30  2d 52 31 31 2c 52 31 34  |R13!,{R0-R11,R14|
000047e0  7d 0d 1a 04 4b 20 4c 44  52 20 52 31 31 2c 5b 52  |}...K LDR R11,[R|
000047f0  31 32 2c 23 31 36 5d 20  20 20 20 20 20 20 20 20  |12,#16]         |
00004800  20 20 20 20 20 3b 72 31  31 3d 61 64 64 72 65 73  |     ;r11=addres|
00004810  73 20 6f 66 20 73 74 61  72 74 20 6f 66 20 76 65  |s of start of ve|
00004820  72 74 69 63 69 65 73 20  64 61 74 61 0d 1a 0e 39  |rticies data...9|
00004830  20 53 55 42 20 52 30 2c  52 30 2c 23 31 20 20 20  | SUB R0,R0,#1   |
00004840  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00004850  3b 72 30 3d 6f 62 6a 65  63 74 20 72 65 66 20 6e  |;r0=object ref n|
00004860  75 6d 62 65 72 0d 1a 18  49 20 41 44 44 20 52 31  |umber...I ADD R1|
00004870  31 2c 52 31 31 2c 52 30  2c 41 53 4c 20 23 31 30  |1,R11,R0,ASL #10|
00004880  20 20 20 20 20 20 20 20  20 3b 6f 66 66 73 65 74  |         ;offset|
00004890  73 20 62 61 73 65 20 63  6f 6f 72 64 20 61 64 64  |s base coord add|
000048a0  72 65 73 73 20 62 79 20  6f 62 6a 65 63 74 0d 1a  |ress by object..|
000048b0  22 47 20 4c 44 52 20 52  31 30 2c 5b 52 31 31 5d  |"G LDR R10,[R11]|
000048c0  2c 23 31 36 20 20 20 20  20 20 20 20 20 20 20 20  |,#16            |
000048d0  20 20 3b 72 31 30 3d 6e  75 6d 62 65 72 20 6f 66  |  ;r10=number of|
000048e0  20 76 65 72 74 69 63 69  65 73 20 74 6f 20 62 65  | verticies to be|
000048f0  20 73 70 75 6e 0d 1a 2c  43 20 4c 44 52 20 52 38  | spun..,C LDR R8|
00004900  2c 5b 52 31 32 2c 23 32  34 5d 20 20 20 20 20 20  |,[R12,#24]      |
00004910  20 20 20 20 20 20 20 20  20 3b 72 38 3d 73 74 61  |         ;r8=sta|
00004920  72 74 20 61 64 64 72 65  73 73 20 6f 66 20 74 65  |rt address of te|
00004930  6d 70 20 73 74 6f 72 65  0d 1a 36 04 0d 1a 40 11  |mp store..6...@.|
00004940  20 2e 6c 6f 6f 70 5f 76  65 72 74 65 78 0d 1a 4a  | .loop_vertex..J|
00004950  43 20 4c 44 52 20 52 31  2c 5b 52 31 31 5d 2c 23  |C LDR R1,[R11],#|
00004960  34 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |4               |
00004970  20 3b 6c 6f 61 64 73 20  78 2c 79 2c 7a 20 63 6f  | ;loads x,y,z co|
00004980  6f 72 64 73 20 6f 66 20  76 65 72 74 69 63 69 65  |ords of verticie|
00004990  0d 1a 54 14 20 4c 44 52  20 52 32 2c 5b 52 31 31  |..T. LDR R2,[R11|
000049a0  5d 2c 23 34 0d 1a 5e 14  20 4c 44 52 20 52 33 2c  |],#4..^. LDR R3,|
000049b0  5b 52 31 31 5d 2c 23 38  0d 1a 68 04 0d 1a 72 3f  |[R11],#8..h...r?|
000049c0  20 4c 44 52 20 52 37 2c  5b 52 39 2c 23 34 30 5d  | LDR R7,[R9,#40]|
000049d0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
000049e0  3b 72 37 3d 75 70 64 61  74 65 64 20 61 6e 67 6c  |;r7=updated angl|
000049f0  65 20 6f 66 20 6f 62 6a  65 63 74 0d 1a 7c 43 20  |e of object..|C |
00004a00  4d 4f 56 20 52 30 2c 23  31 30 20 20 20 20 20 20  |MOV R0,#10      |
00004a10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00004a20  72 30 3d 73 68 69 66 74  20 66 61 63 74 6f 72 20  |r0=shift factor |
00004a30  66 6f 72 20 72 6f 74 20  6f 66 20 32 35 36 0d 1a  |for rot of 256..|
00004a40  86 15 20 42 4c 20 72 6f  74 61 74 65 5f 78 5f 61  |.. BL rotate_x_a|
00004a50  78 69 73 0d 1a 90 04 0d  1a 9a 3f 20 4c 44 52 20  |xis.......? LDR |
00004a60  52 37 2c 5b 52 39 2c 23  34 34 5d 20 20 20 20 20  |R7,[R9,#44]     |
00004a70  20 20 20 20 20 20 20 20  20 20 20 3b 72 37 3d 75  |           ;r7=u|
00004a80  70 64 61 74 65 64 20 61  6e 67 6c 65 20 6f 66 20  |pdated angle of |
00004a90  6f 62 6a 65 63 74 0d 1a  a4 43 20 4d 4f 56 20 52  |object...C MOV R|
00004aa0  30 2c 23 31 30 20 20 20  20 20 20 20 20 20 20 20  |0,#10           |
00004ab0  20 20 20 20 20 20 20 20  20 20 3b 72 30 3d 73 68  |          ;r0=sh|
00004ac0  69 66 74 20 66 61 63 74  6f 72 20 66 6f 72 20 72  |ift factor for r|
00004ad0  6f 74 20 6f 66 20 32 35  36 0d 1a ae 15 20 42 4c  |ot of 256.... BL|
00004ae0  20 72 6f 74 61 74 65 5f  79 5f 61 78 69 73 0d 1a  | rotate_y_axis..|
00004af0  b8 04 0d 1a c2 3f 20 4c  44 52 20 52 37 2c 5b 52  |.....? LDR R7,[R|
00004b00  39 2c 23 34 38 5d 20 20  20 20 20 20 20 20 20 20  |9,#48]          |
00004b10  20 20 20 20 20 20 3b 72  37 3d 75 70 64 61 74 65  |      ;r7=update|
00004b20  64 20 61 6e 67 6c 65 20  6f 66 20 6f 62 6a 65 63  |d angle of objec|
00004b30  74 0d 1a cc 43 20 4d 4f  56 20 52 30 2c 23 31 30  |t...C MOV R0,#10|
00004b40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00004b50  20 20 20 20 20 3b 72 30  3d 73 68 69 66 74 20 66  |     ;r0=shift f|
00004b60  61 63 74 6f 72 20 66 6f  72 20 72 6f 74 20 6f 66  |actor for rot of|
00004b70  20 32 35 36 0d 1a d6 15  20 42 4c 20 72 6f 74 61  | 256.... BL rota|
00004b80  74 65 5f 7a 5f 61 78 69  73 0d 1a e0 04 0d 1a ea  |te_z_axis.......|
00004b90  49 20 41 44 44 20 52 31  2c 52 31 2c 52 34 20 20  |I ADD R1,R1,R4  |
00004ba0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00004bb0  20 3b 6f 66 66 73 65 74  20 76 65 72 74 69 63 69  | ;offset vertici|
00004bc0  65 20 62 79 20 63 65 6e  74 72 61 6c 20 63 6f 6f  |e by central coo|
00004bd0  72 64 73 20 6f 66 0d 1a  f4 2b 20 41 44 44 20 52  |rds of...+ ADD R|
00004be0  32 2c 52 32 2c 52 35 20  20 20 20 20 20 20 20 20  |2,R2,R5         |
00004bf0  20 20 20 20 20 20 20 20  20 20 3b 6f 62 6a 65 63  |          ;objec|
00004c00  74 0d 1a fe 11 20 41 44  44 20 52 33 2c 52 33 2c  |t.... ADD R3,R3,|
00004c10  52 36 0d 1b 08 04 0d 1b  12 4a 20 4c 44 52 20 52  |R6.......J LDR R|
00004c20  30 2c 5b 52 31 32 2c 23  31 32 5d 20 20 20 20 20  |0,[R12,#12]     |
00004c30  20 20 20 20 20 20 20 20  20 20 3b 72 30 3d 73 74  |          ;r0=st|
00004c40  61 72 74 20 61 64 64 72  65 73 73 20 6f 66 20 70  |art address of p|
00004c50  65 72 73 70 65 63 74 69  76 65 20 74 61 62 6c 65  |erspective table|
00004c60  0d 1b 1c 4d 20 4c 44 52  20 52 30 2c 5b 52 30 2c  |...M LDR R0,[R0,|
00004c70  52 33 2c 41 53 4c 20 23  32 5d 20 20 20 20 20 20  |R3,ASL #2]      |
00004c80  20 20 20 20 3b 72 30 3d  70 65 72 73 70 65 63 74  |    ;r0=perspect|
00004c90  69 76 65 20 76 61 6c 75  65 20 72 65 6c 61 74 69  |ive value relati|
00004ca0  76 65 20 74 6f 20 7a 20  63 6f 6f 72 64 0d 1b 26  |ve to z coord..&|
00004cb0  11 20 4d 55 4c 20 52 31  2c 52 30 2c 52 31 0d 1b  |. MUL R1,R0,R1..|
00004cc0  30 47 20 4d 55 4c 20 52  32 2c 52 30 2c 52 32 20  |0G MUL R2,R0,R2 |
00004cd0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00004ce0  20 20 3b 73 63 61 6c 65  20 78 2c 79 20 61 63 63  |  ;scale x,y acc|
00004cf0  6f 72 64 69 6e 67 20 74  6f 20 70 65 72 73 70 65  |ording to perspe|
00004d00  63 74 69 76 65 0d 1b 3a  2a 20 4d 4f 56 20 52 31  |ctive..:* MOV R1|
00004d10  2c 52 31 2c 41 53 52 20  23 31 32 20 20 20 20 20  |,R1,ASR #12     |
00004d20  20 20 20 20 20 20 20 20  20 3b 76 61 6c 75 65 0d  |         ;value.|
00004d30  1b 44 16 20 4d 4f 56 20  52 32 2c 52 32 2c 41 53  |.D. MOV R2,R2,AS|
00004d40  52 20 23 31 32 0d 1b 4e  04 0d 1b 58 44 20 53 54  |R #12..N...XD ST|
00004d50  52 20 52 31 2c 5b 52 38  5d 2c 23 34 20 20 20 20  |R R1,[R8],#4    |
00004d60  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 73 74  |             ;st|
00004d70  6f 72 65 73 20 76 65 72  74 65 63 69 65 20 69 6e  |ores vertecie in|
00004d80  74 6f 20 74 65 6d 70 20  73 74 6f 72 65 0d 1b 62  |to temp store..b|
00004d90  13 20 53 54 52 20 52 32  2c 5b 52 38 5d 2c 23 34  |. STR R2,[R8],#4|
00004da0  0d 1b 6c 13 20 53 54 52  20 52 33 2c 5b 52 38 5d  |..l. STR R3,[R8]|
00004db0  2c 23 38 0d 1b 76 04 0d  1b 80 44 20 53 55 42 20  |,#8..v....D SUB |
00004dc0  52 31 30 2c 52 31 30 2c  23 31 20 20 20 20 20 20  |R10,R10,#1      |
00004dd0  20 20 20 20 20 20 20 20  20 20 20 3b 63 68 65 63  |           ;chec|
00004de0  6b 20 66 6f 72 20 65 6e  64 20 6f 66 20 76 65 72  |k for end of ver|
00004df0  74 65 63 69 65 20 74 61  62 6c 65 0d 1b 8a 44 20  |tecie table...D |
00004e00  43 4d 50 20 52 31 30 2c  23 30 20 20 20 20 20 20  |CMP R10,#0      |
00004e10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00004e20  61 6e 64 20 63 6f 6e 74  69 6e 75 65 20 6c 6f 6f  |and continue loo|
00004e30  70 20 69 66 20 75 6e 66  69 6e 69 73 68 65 64 0d  |p if unfinished.|
00004e40  1b 94 14 20 42 47 45 20  6c 6f 6f 70 5f 76 65 72  |... BGE loop_ver|
00004e50  74 65 78 0d 1b 9e 1b 20  4c 44 4d 46 44 20 52 31  |tex.... LDMFD R1|
00004e60  33 21 2c 7b 52 30 2d 52  31 31 2c 50 43 7d 0d 1b  |3!,{R0-R11,PC}..|
00004e70  a8 04 0d 1b b2 4e 20 3b  2a 2a 2a 2a 2a 2a 2a 2a  |.....N ;********|
00004e80  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 20 72 6f 75 74  |*********** rout|
00004e90  69 6e 65 20 74 6f 20 64  72 61 77 20 6f 62 6a 65  |ine to draw obje|
00004ea0  63 74 73 20 66 61 63 65  74 73 20 2a 2a 2a 2a 2a  |cts facets *****|
00004eb0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00004ec0  0d 1b bc 04 0d 1b c6 11  20 2e 64 72 61 77 5f 66  |........ .draw_f|
00004ed0  61 63 65 74 73 0d 1b d0  1c 20 53 54 4d 46 44 20  |acets.... STMFD |
00004ee0  52 31 33 21 2c 7b 52 30  2d 52 31 31 2c 52 31 34  |R13!,{R0-R11,R14|
00004ef0  7d 0d 1b da 0f 20 4d 4f  56 20 52 31 2c 23 31 31  |}.... MOV R1,#11|
00004f00  0d 1b e4 17 20 43 4d 50  20 52 30 2c 23 34 3a 42  |.... CMP R0,#4:B|
00004f10  45 51 20 66 61 64 65 0d  1b ee 17 20 43 4d 50 20  |EQ fade.... CMP |
00004f20  52 30 2c 23 36 3a 42 45  51 20 66 61 64 65 0d 1b  |R0,#6:BEQ fade..|
00004f30  f8 10 20 42 20 73 6b 69  70 5f 66 61 64 65 0d 1c  |.. B skip_fade..|
00004f40  02 0a 20 2e 66 61 64 65  0d 1c 0c 3f 20 4c 44 52  |.. .fade...? LDR|
00004f50  20 52 31 2c 5b 52 39 2c  23 36 34 5d 3a 43 4d 50  | R1,[R9,#64]:CMP|
00004f60  20 52 31 2c 23 32 34 3a  4d 4f 56 47 45 20 52 31  | R1,#24:MOVGE R1|
00004f70  2c 23 31 31 3a 4d 4f 56  4c 54 20 52 31 2c 52 31  |,#11:MOVLT R1,R1|
00004f80  2c 41 53 52 20 23 31 0d  1c 16 0f 20 2e 73 6b 69  |,ASR #1.... .ski|
00004f90  70 5f 66 61 64 65 0d 1c  20 16 20 4c 44 52 20 52  |p_fade.. . LDR R|
00004fa0  31 31 2c 5b 52 31 32 2c  23 32 30 5d 0d 1c 2a 11  |11,[R12,#20]..*.|
00004fb0  20 53 55 42 20 52 30 2c  52 30 2c 23 31 0d 1c 34  | SUB R0,R0,#1..4|
00004fc0  1b 20 41 44 44 20 52 31  31 2c 52 31 31 2c 52 30  |. ADD R11,R11,R0|
00004fd0  2c 41 53 4c 20 23 31 30  0d 1c 3e 16 20 4c 44 52  |,ASL #10..>. LDR|
00004fe0  20 52 31 30 2c 5b 52 31  31 5d 2c 23 31 36 0d 1c  | R10,[R11],#16..|
00004ff0  48 15 20 4c 44 52 20 52  38 2c 5b 52 31 32 2c 23  |H. LDR R8,[R12,#|
00005000  32 34 5d 0d 1c 52 04 0d  1c 5c 35 20 4d 4f 56 20  |24]..R...\5 MOV |
00005010  52 30 2c 23 31 38 3a 53  57 49 20 30 3a 4d 4f 56  |R0,#18:SWI 0:MOV|
00005020  20 52 30 2c 23 30 3a 53  57 49 20 30 3a 4d 4f 56  | R0,#0:SWI 0:MOV|
00005030  20 52 30 2c 52 31 3a 53  57 49 20 30 0d 1c 66 04  | R0,R1:SWI 0..f.|
00005040  0d 1c 70 11 20 2e 6c 6f  6f 70 5f 66 61 63 65 74  |..p. .loop_facet|
00005050  73 0d 1c 7a 04 0d 1c 84  14 20 4c 44 52 20 52 33  |s..z..... LDR R3|
00005060  2c 5b 52 31 31 5d 2c 23  34 0d 1c 8e 18 20 41 44  |,[R11],#4.... AD|
00005070  44 20 52 37 2c 52 38 2c  52 33 2c 41 53 4c 20 23  |D R7,R8,R3,ASL #|
00005080  34 0d 1c 98 10 20 4c 44  52 20 52 31 2c 5b 52 37  |4.... LDR R1,[R7|
00005090  5d 0d 1c a2 13 20 41 44  44 20 52 31 2c 52 31 2c  |].... ADD R1,R1,|
000050a0  23 36 34 30 0d 1c ac 13  20 4c 44 52 20 52 32 2c  |#640.... LDR R2,|
000050b0  5b 52 37 2c 23 34 5d 0d  1c b6 13 20 41 44 44 20  |[R7,#4].... ADD |
000050c0  52 32 2c 52 32 2c 23 35  31 32 0d 1c c0 04 0d 1c  |R2,R2,#512......|
000050d0  ca 14 20 4c 44 52 20 52  33 2c 5b 52 31 31 5d 2c  |.. LDR R3,[R11],|
000050e0  23 34 0d 1c d4 18 20 41  44 44 20 52 37 2c 52 38  |#4.... ADD R7,R8|
000050f0  2c 52 33 2c 41 53 4c 20  23 34 0d 1c de 10 20 4c  |,R3,ASL #4.... L|
00005100  44 52 20 52 34 2c 5b 52  37 5d 0d 1c e8 13 20 41  |DR R4,[R7].... A|
00005110  44 44 20 52 34 2c 52 34  2c 23 36 34 30 0d 1c f2  |DD R4,R4,#640...|
00005120  13 20 4c 44 52 20 52 35  2c 5b 52 37 2c 23 34 5d  |. LDR R5,[R7,#4]|
00005130  0d 1c fc 13 20 41 44 44  20 52 35 2c 52 35 2c 23  |.... ADD R5,R5,#|
00005140  35 31 32 0d 1d 06 04 0d  1d 10 14 20 4c 44 52 20  |512........ LDR |
00005150  52 33 2c 5b 52 31 31 5d  2c 23 34 0d 1d 1a 18 20  |R3,[R11],#4.... |
00005160  41 44 44 20 52 37 2c 52  38 2c 52 33 2c 41 53 4c  |ADD R7,R8,R3,ASL|
00005170  20 23 34 0d 1d 24 10 20  4c 44 52 20 52 36 2c 5b  | #4..$. LDR R6,[|
00005180  52 37 5d 0d 1d 2e 13 20  41 44 44 20 52 36 2c 52  |R7].... ADD R6,R|
00005190  36 2c 23 36 34 30 0d 1d  38 13 20 4c 44 52 20 52  |6,#640..8. LDR R|
000051a0  39 2c 5b 52 37 2c 23 34  5d 0d 1d 42 13 20 41 44  |9,[R7,#4]..B. AD|
000051b0  44 20 52 39 2c 52 39 2c  23 35 31 32 0d 1d 4c 04  |D R9,R9,#512..L.|
000051c0  0d 1d 56 15 20 42 4c 20  68 69 64 64 65 6e 5f 66  |..V. BL hidden_f|
000051d0  61 63 65 74 73 0d 1d 60  0e 20 43 4d 50 20 52 30  |acets..`. CMP R0|
000051e0  2c 23 30 0d 1d 6a 15 20  41 44 44 4c 54 20 52 31  |,#0..j. ADDLT R1|
000051f0  31 2c 52 31 31 2c 23 34  0d 1d 74 10 20 42 4c 54  |1,R11,#4..t. BLT|
00005200  20 6e 6f 5f 70 6c 6f 74  0d 1d 7e 04 0d 1d 88 0e  | no_plot..~.....|
00005210  20 4d 4f 56 20 52 30 2c  23 34 0d 1d 92 0c 20 53  | MOV R0,#4.... S|
00005220  57 49 20 26 34 35 0d 1d  9c 04 0d 1d a6 0e 20 4d  |WI &45........ M|
00005230  4f 56 20 52 30 2c 23 35  0d 1d b0 0e 20 4d 4f 56  |OV R0,#5.... MOV|
00005240  20 52 31 2c 52 34 0d 1d  ba 0e 20 4d 4f 56 20 52  | R1,R4.... MOV R|
00005250  32 2c 52 35 0d 1d c4 0c  20 53 57 49 20 26 34 35  |2,R5.... SWI &45|
00005260  0d 1d ce 04 0d 1d d8 0e  20 4d 4f 56 20 52 31 2c  |........ MOV R1,|
00005270  52 36 0d 1d e2 0e 20 4d  4f 56 20 52 32 2c 52 39  |R6.... MOV R2,R9|
00005280  0d 1d ec 0c 20 53 57 49  20 26 34 35 0d 1d f6 04  |.... SWI &45....|
00005290  0d 1e 00 14 20 4c 44 52  20 52 33 2c 5b 52 31 31  |.... LDR R3,[R11|
000052a0  5d 2c 23 34 0d 1e 0a 18  20 41 44 44 20 52 37 2c  |],#4.... ADD R7,|
000052b0  52 38 2c 52 33 2c 41 53  4c 20 23 34 0d 1e 14 10  |R8,R3,ASL #4....|
000052c0  20 4c 44 52 20 52 31 2c  5b 52 37 5d 0d 1e 1e 13  | LDR R1,[R7]....|
000052d0  20 41 44 44 20 52 31 2c  52 31 2c 23 36 34 30 0d  | ADD R1,R1,#640.|
000052e0  1e 28 13 20 4c 44 52 20  52 32 2c 5b 52 37 2c 23  |.(. LDR R2,[R7,#|
000052f0  34 5d 0d 1e 32 13 20 41  44 44 20 52 32 2c 52 32  |4]..2. ADD R2,R2|
00005300  2c 23 35 31 32 0d 1e 3c  0e 20 4d 4f 56 20 52 30  |,#512..<. MOV R0|
00005310  2c 23 35 0d 1e 46 0c 20  53 57 49 20 26 34 35 0d  |,#5..F. SWI &45.|
00005320  1e 50 04 0d 1e 5a 16 20  4c 44 52 20 52 33 2c 5b  |.P...Z. LDR R3,[|
00005330  52 31 31 2c 23 2d 31 36  5d 0d 1e 64 18 20 41 44  |R11,#-16]..d. AD|
00005340  44 20 52 37 2c 52 38 2c  52 33 2c 41 53 4c 20 23  |D R7,R8,R3,ASL #|
00005350  34 0d 1e 6e 10 20 4c 44  52 20 52 31 2c 5b 52 37  |4..n. LDR R1,[R7|
00005360  5d 0d 1e 78 13 20 41 44  44 20 52 31 2c 52 31 2c  |]..x. ADD R1,R1,|
00005370  23 36 34 30 0d 1e 82 13  20 4c 44 52 20 52 32 2c  |#640.... LDR R2,|
00005380  5b 52 37 2c 23 34 5d 0d  1e 8c 13 20 41 44 44 20  |[R7,#4].... ADD |
00005390  52 32 2c 52 32 2c 23 35  31 32 0d 1e 96 0e 20 4d  |R2,R2,#512.... M|
000053a0  4f 56 20 52 30 2c 23 35  0d 1e a0 0c 20 53 57 49  |OV R0,#5.... SWI|
000053b0  20 26 34 35 0d 1e aa 04  0d 1e b4 0d 20 2e 6e 6f  | &45........ .no|
000053c0  5f 70 6c 6f 74 0d 1e be  13 20 53 55 42 20 52 31  |_plot.... SUB R1|
000053d0  30 2c 52 31 30 2c 23 31  0d 1e c8 0f 20 43 4d 50  |0,R10,#1.... CMP|
000053e0  20 52 31 30 2c 23 30 0d  1e d2 14 20 42 47 54 20  | R10,#0.... BGT |
000053f0  6c 6f 6f 70 5f 66 61 63  65 74 73 0d 1e dc 1b 20  |loop_facets.... |
00005400  4c 44 4d 46 44 20 52 31  33 21 2c 7b 52 30 2d 52  |LDMFD R13!,{R0-R|
00005410  31 31 2c 50 43 7d 0d 1e  e6 04 0d 1e f0 13 20 2e  |11,PC}........ .|
00005420  68 69 64 64 65 6e 5f 66  61 63 65 74 73 0d 1e fa  |hidden_facets...|
00005430  1c 20 53 54 4d 46 44 20  52 31 33 21 2c 7b 52 31  |. STMFD R13!,{R1|
00005440  2d 52 31 31 2c 52 31 34  7d 0d 1f 04 11 20 53 55  |-R11,R14}.... SU|
00005450  42 20 52 33 2c 52 31 2c  52 34 0d 1f 0e 11 20 53  |B R3,R1,R4.... S|
00005460  55 42 20 52 37 2c 52 32  2c 52 35 0d 1f 18 11 20  |UB R7,R2,R5.... |
00005470  53 55 42 20 52 38 2c 52  36 2c 52 34 0d 1f 22 12  |SUB R8,R6,R4..".|
00005480  20 53 55 42 20 52 31 30  2c 52 39 2c 52 35 0d 1f  | SUB R10,R9,R5..|
00005490  2c 12 20 4d 55 4c 20 52  33 2c 52 31 30 2c 52 33  |,. MUL R3,R10,R3|
000054a0  0d 1f 36 11 20 4d 55 4c  20 52 37 2c 52 38 2c 52  |..6. MUL R7,R8,R|
000054b0  37 0d 1f 40 11 20 53 55  42 20 52 30 2c 52 33 2c  |7..@. SUB R0,R3,|
000054c0  52 37 0d 1f 4a 1b 20 4c  44 4d 46 44 20 52 31 33  |R7..J. LDMFD R13|
000054d0  21 2c 7b 52 31 2d 52 31  31 2c 50 43 7d 0d 1f 54  |!,{R1-R11,PC}..T|
000054e0  04 0d 1f 5e 04 0d 1f 68  0b 20 2e 73 68 65 6c 6c  |...^...h. .shell|
000054f0  0d 1f 72 1c 20 53 54 4d  46 44 20 52 31 33 21 2c  |..r. STMFD R13!,|
00005500  7b 52 31 2d 52 31 31 2c  52 31 34 7d 0d 1f 7c 15  |{R1-R11,R14}..|.|
00005510  20 4c 44 52 20 52 30 2c  5b 52 31 32 2c 23 33 36  | LDR R0,[R12,#36|
00005520  5d 0d 1f 86 0e 20 43 4d  50 20 52 30 2c 23 30 0d  |].... CMP R0,#0.|
00005530  1f 90 12 20 42 4e 45 20  62 69 6e 5f 66 75 6c 6c  |... BNE bin_full|
00005540  31 0d 1f 9a 0e 20 4d 4f  56 20 52 30 2c 23 31 0d  |1.... MOV R0,#1.|
00005550  1f a4 15 20 53 54 52 20  52 30 2c 5b 52 31 32 2c  |... STR R0,[R12,|
00005560  23 33 36 5d 0d 1f ae 04  0d 1f b8 0f 20 4d 4f 56  |#36]........ MOV|
00005570  20 52 31 30 2c 23 30 0d  1f c2 15 20 2e 6c 6f 6f  | R10,#0.... .loo|
00005580  70 5f 66 69 6e 64 5f 66  72 65 65 31 0d 1f cc 13  |p_find_free1....|
00005590  20 41 44 44 20 52 31 30  2c 52 31 30 2c 23 31 0d  | ADD R10,R10,#1.|
000055a0  1f d6 48 20 4c 44 52 20  52 30 2c 5b 52 31 31 2c  |..H LDR R0,[R11,|
000055b0  52 31 30 2c 41 53 4c 20  23 6f 62 6a 65 63 74 5f  |R10,ASL #object_|
000055c0  6c 65 6e 67 74 68 6c 6f  67 25 5d 3b 52 30 20 43  |lengthlog%];R0 C|
000055d0  4f 4e 54 41 49 4e 53 20  4f 42 4a 45 43 54 20 52  |ONTAINS OBJECT R|
000055e0  45 46 20 43 4f 44 45 0d  1f e0 28 20 43 4d 50 20  |EF CODE...( CMP |
000055f0  52 31 30 2c 23 6d 61 78  5f 6f 62 6a 65 63 74 73  |R10,#max_objects|
00005600  25 3a 42 47 45 20 62 69  6e 5f 66 75 6c 6c 31 0d  |%:BGE bin_full1.|
00005610  1f ea 43 20 43 4d 50 20  52 30 2c 23 30 3a 42 4e  |..C CMP R0,#0:BN|
00005620  45 20 6c 6f 6f 70 5f 66  69 6e 64 5f 66 72 65 65  |E loop_find_free|
00005630  31 20 20 20 20 20 20 20  20 20 20 3b 43 48 45 43  |1          ;CHEC|
00005640  4b 20 e7 20 4f 42 4a 45  43 54 20 49 53 20 44 45  |K . OBJECT IS DE|
00005650  41 44 0d 1f f4 47 20 41  44 44 20 52 39 2c 52 31  |AD...G ADD R9,R1|
00005660  31 2c 52 31 30 2c 41 53  4c 20 23 6f 62 6a 65 63  |1,R10,ASL #objec|
00005670  74 5f 6c 65 6e 67 74 68  6c 6f 67 25 20 20 3b 52  |t_lengthlog%  ;R|
00005680  39 20 c8 92 53 20 b8 20  42 45 47 49 4e 49 4e 47  |9 ..S . BEGINING|
00005690  20 ca 20 4f 42 4a 45 43  54 0d 1f fe 04 0d 20 08  | . OBJECT..... .|
000056a0  1a 20 4d 4f 56 20 52 30  2c 23 32 3a 53 54 52 20  |. MOV R0,#2:STR |
000056b0  52 30 2c 5b 52 39 5d 0d  20 12 1e 20 4d 4f 56 20  |R0,[R9]. .. MOV |
000056c0  52 30 2c 23 30 3a 53 54  52 20 52 30 2c 5b 52 39  |R0,#0:STR R0,[R9|
000056d0  2c 23 31 36 5d 0d 20 1c  1e 20 4d 4f 56 20 52 30  |,#16]. .. MOV R0|
000056e0  2c 23 30 3a 53 54 52 20  52 30 2c 5b 52 39 2c 23  |,#0:STR R0,[R9,#|
000056f0  32 30 5d 0d 20 26 1e 20  4d 4f 56 20 52 30 2c 23  |20]. &. MOV R0,#|
00005700  30 3a 53 54 52 20 52 30  2c 5b 52 39 2c 23 32 34  |0:STR R0,[R9,#24|
00005710  5d 0d 20 30 1e 20 4d 4f  56 20 52 30 2c 23 30 3a  |]. 0. MOV R0,#0:|
00005720  53 54 52 20 52 30 2c 5b  52 39 2c 23 34 30 5d 0d  |STR R0,[R9,#40].|
00005730  20 3a 1e 20 4d 4f 56 20  52 30 2c 23 30 3a 53 54  | :. MOV R0,#0:ST|
00005740  52 20 52 30 2c 5b 52 39  2c 23 34 34 5d 0d 20 44  |R R0,[R9,#44]. D|
00005750  1e 20 4d 4f 56 20 52 30  2c 23 30 3a 53 54 52 20  |. MOV R0,#0:STR |
00005760  52 30 2c 5b 52 39 2c 23  34 38 5d 0d 20 4e 15 20  |R0,[R9,#48]. N. |
00005770  4c 44 52 20 52 37 2c 5b  52 31 31 2c 23 32 30 5d  |LDR R7,[R11,#20]|
00005780  0d 20 58 30 20 4d 4f 56  20 52 31 2c 23 30 3a 4c  |. X0 MOV R1,#0:L|
00005790  44 52 20 52 33 2c 5b 52  31 32 2c 23 33 32 5d 3a  |DR R3,[R12,#32]:|
000057a0  4d 4f 56 20 52 33 2c 52  33 2c 41 53 4c 20 23 32  |MOV R3,R3,ASL #2|
000057b0  0d 20 62 0f 20 4d 4f 56  20 52 30 2c 23 31 36 0d  |. b. MOV R0,#16.|
000057c0  20 6c 2c 20 42 4c 20 72  6f 74 61 74 65 5f 79 5f  | l, BL rotate_y_|
000057d0  61 78 69 73 20 20 20 20  20 20 20 20 20 20 20 20  |axis            |
000057e0  20 20 20 3b 72 6f 74 61  74 65 73 0d 20 76 14 20  |   ;rotates. v. |
000057f0  53 54 52 20 52 31 2c 5b  52 39 2c 23 35 32 5d 0d  |STR R1,[R9,#52].|
00005800  20 80 0e 20 4d 4f 56 20  52 32 2c 23 30 0d 20 8a  | .. MOV R2,#0. .|
00005810  14 20 53 54 52 20 52 32  2c 5b 52 39 2c 23 35 36  |. STR R2,[R9,#56|
00005820  5d 0d 20 94 14 20 53 54  52 20 52 33 2c 5b 52 39  |]. .. STR R3,[R9|
00005830  2c 23 36 30 5d 0d 20 9e  0e 20 4d 4f 56 20 52 34  |,#60]. .. MOV R4|
00005840  2c 23 32 0d 20 a8 33 20  4c 44 52 20 52 30 2c 5b  |,#2. .3 LDR R0,[|
00005850  52 31 31 2c 23 34 5d 3a  4d 4c 41 20 52 30 2c 52  |R11,#4]:MLA R0,R|
00005860  34 2c 52 31 2c 52 30 3a  53 54 52 20 52 30 2c 5b  |4,R1,R0:STR R0,[|
00005870  52 39 2c 23 34 5d 0d 20  b2 33 20 4c 44 52 20 52  |R9,#4]. .3 LDR R|
00005880  30 2c 5b 52 31 31 2c 23  38 5d 3a 4d 4c 41 20 52  |0,[R11,#8]:MLA R|
00005890  30 2c 52 34 2c 52 32 2c  52 30 3a 53 54 52 20 52  |0,R4,R2,R0:STR R|
000058a0  30 2c 5b 52 39 2c 23 38  5d 0d 20 bc 35 20 4c 44  |0,[R9,#8]. .5 LD|
000058b0  52 20 52 30 2c 5b 52 31  31 2c 23 31 32 5d 3a 4d  |R R0,[R11,#12]:M|
000058c0  4c 41 20 52 30 2c 52 34  2c 52 33 2c 52 30 3a 53  |LA R0,R4,R3,R0:S|
000058d0  54 52 20 52 30 2c 5b 52  39 2c 23 31 32 5d 0d 20  |TR R0,[R9,#12]. |
000058e0  c6 1e 20 4d 4f 56 20 52  30 2c 23 31 3a 53 54 52  |.. MOV R0,#1:STR|
000058f0  20 52 30 2c 5b 52 39 2c  23 36 34 5d 0d 20 d0 20  | R0,[R9,#64]. . |
00005900  20 4d 4f 56 20 52 30 2c  23 31 32 33 3a 53 54 52  | MOV R0,#123:STR|
00005910  20 52 30 2c 5b 52 39 2c  23 36 38 5d 0d 20 da 1f  | R0,[R9,#68]. ..|
00005920  20 4d 4f 56 20 52 30 2c  23 37 31 3a 53 54 52 20  | MOV R0,#71:STR |
00005930  52 30 2c 5b 52 39 2c 23  37 32 5d 0d 20 e4 1f 20  |R0,[R9,#72]. .. |
00005940  4d 4f 56 20 52 30 2c 23  35 33 3a 53 54 52 20 52  |MOV R0,#53:STR R|
00005950  30 2c 5b 52 39 2c 23 37  36 5d 0d 20 ee 37 20 4d  |0,[R9,#76]. .7 M|
00005960  4f 56 20 52 30 2c 23 28  38 2a 46 29 5e 32 3a 41  |OV R0,#(8*F)^2:A|
00005970  44 44 20 52 30 2c 52 30  2c 23 28 31 2a 46 29 5e  |DD R0,R0,#(1*F)^|
00005980  32 3a 53 54 52 20 52 30  2c 5b 52 39 2c 23 38 34  |2:STR R0,[R9,#84|
00005990  5d 0d 20 f8 04 0d 21 02  0e 20 4d 4f 56 20 52 30  |]. ...!.. MOV R0|
000059a0  2c 23 31 0d 21 0c 0e 20  4d 56 4e 20 52 31 2c 23  |,#1.!.. MVN R1,#|
000059b0  33 0d 21 16 0e 20 4d 4f  56 20 52 32 2c 23 30 0d  |3.!.. MOV R2,#0.|
000059c0  21 20 0f 20 4d 4f 56 20  52 33 2c 23 37 30 0d 21  |! . MOV R3,#70.!|
000059d0  2a 18 20 53 57 49 20 22  53 6f 75 6e 64 5f 43 6f  |*. SWI "Sound_Co|
000059e0  6e 74 72 6f 6c 22 0d 21  34 04 0d 21 3e 0f 20 2e  |ntrol".!4..!>. .|
000059f0  62 69 6e 5f 66 75 6c 6c  31 0d 21 48 1b 20 4c 44  |bin_full1.!H. LD|
00005a00  4d 46 44 20 52 31 33 21  2c 7b 52 31 2d 52 31 31  |MFD R13!,{R1-R11|
00005a10  2c 50 43 7d 0d 21 52 04  0d 21 5c 4e 20 3b 2a 2a  |,PC}.!R..!\N ;**|
00005a20  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00005a30  2a 2a 2a 2a 2a 2a 2a 2a  64 72 69 76 65 20 74 61  |********drive ta|
00005a40  6e 6b 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |nk**************|
00005a50  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00005a60  2a 2a 2a 2a 2a 2a 0d 21  66 10 20 2e 74 61 6e 6b  |******.!f. .tank|
00005a70  5f 64 72 69 76 65 0d 21  70 1c 20 53 54 4d 46 44  |_drive.!p. STMFD|
00005a80  20 52 31 33 21 2c 7b 52  30 2d 52 31 31 2c 52 31  | R13!,{R0-R11,R1|
00005a90  34 7d 0d 21 7a 14 20 4c  44 52 20 52 30 2c 5b 52  |4}.!z. LDR R0,[R|
00005aa0  39 2c 23 38 30 5d 0d 21  84 0e 20 43 4d 50 20 52  |9,#80].!.. CMP R|
00005ab0  30 2c 23 30 0d 21 8e 11  20 42 4c 45 51 20 6e 65  |0,#0.!.. BLEQ ne|
00005ac0  77 5f 61 69 6d 0d 21 98  0e 20 43 4d 50 20 52 30  |w_aim.!.. CMP R0|
00005ad0  2c 23 31 0d 21 a2 10 20  42 4c 45 51 20 61 74 74  |,#1.!.. BLEQ att|
00005ae0  61 63 6b 0d 21 ac 0e 20  43 4d 50 20 52 30 2c 23  |ack.!.. CMP R0,#|
00005af0  32 0d 21 b6 10 20 42 4c  45 51 20 6d 6f 76 69 6e  |2.!.. BLEQ movin|
00005b00  67 0d 21 c0 0e 20 43 4d  50 20 52 30 2c 23 33 0d  |g.!.. CMP R0,#3.|
00005b10  21 ca 11 20 42 4c 45 51  20 74 75 72 6e 69 6e 67  |!.. BLEQ turning|
00005b20  0d 21 d4 1b 20 4c 44 4d  46 44 20 52 31 33 21 2c  |.!.. LDMFD R13!,|
00005b30  7b 52 30 2d 52 31 31 2c  50 43 7d 0d 21 de 04 0d  |{R0-R11,PC}.!...|
00005b40  21 e8 4e 20 3b 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |!.N ;***********|
00005b50  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 67 69  |**************gi|
00005b60  76 65 20 74 61 6e 6b 20  6e 65 77 20 61 69 6d 2a  |ve tank new aim*|
00005b70  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00005b80  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 0d 21 f2  |*************.!.|
00005b90  04 0d 21 fc 0d 20 2e 6e  65 77 5f 61 69 6d 0d 22  |..!.. .new_aim."|
00005ba0  06 1c 20 53 54 4d 46 44  20 52 31 33 21 2c 7b 52  |.. STMFD R13!,{R|
00005bb0  30 2d 52 31 31 2c 52 31  34 7d 0d 22 10 15 20 4c  |0-R11,R14}.".. L|
00005bc0  44 52 20 52 30 2c 5b 52  31 32 2c 23 37 36 5d 0d  |DR R0,[R12,#76].|
00005bd0  22 1a 0e 20 43 4d 50 20  52 30 2c 23 30 0d 22 24  |".. CMP R0,#0."$|
00005be0  10 20 42 4c 54 20 65 6e  64 5f 61 69 6d 0d 22 2e  |. BLT end_aim.".|
00005bf0  3c 20 42 4c 20 72 61 6e  64 6f 6d 5f 6e 75 6d 62  |< BL random_numb|
00005c00  65 72 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |er              |
00005c10  20 3b 72 30 3d 72 61 6e  64 6f 6d 20 6e 75 6d 62  | ;r0=random numb|
00005c20  65 72 20 30 2d 34 30 39  35 0d 22 38 38 20 80 20  |er 0-4095."88 . |
00005c30  52 31 2c 52 30 2c 23 31  20 20 20 20 20 20 20 20  |R1,R0,#1        |
00005c40  20 20 20 20 20 20 20 20  20 20 20 3b 6d 61 6b 65  |           ;make|
00005c50  20 72 31 20 65 69 74 68  65 72 20 31 20 6f 72 20  | r1 either 1 or |
00005c60  30 0d 22 42 0e 20 43 4d  50 20 52 31 2c 23 30 0d  |0."B. CMP R1,#0.|
00005c70  22 4c 48 20 42 45 51 20  6e 65 77 5f 61 74 74 61  |"LH BEQ new_atta|
00005c80  63 6b 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |ck              |
00005c90  20 20 20 3b 69 66 20 72  31 3d 30 20 74 68 65 6e  |   ;if r1=0 then|
00005ca0  20 74 61 6e 6b 20 63 68  6f 6f 73 65 73 20 74 6f  | tank chooses to|
00005cb0  20 61 74 74 61 63 6b 0d  22 56 47 20 20 20 20 20  | attack."VG     |
00005cc0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005cd0  20 20 20 20 20 20 20 20  20 20 20 3b 6f 74 68 65  |           ;othe|
00005ce0  72 77 69 73 65 20 74 61  6e 6b 20 63 68 6f 6f 73  |rwise tank choos|
00005cf0  65 73 20 74 6f 20 6d 6f  76 65 20 6f 66 66 0d 22  |es to move off."|
00005d00  60 3c 20 80 20 52 31 2c  52 30 2c 23 33 31 20 20  |`< . R1,R0,#31  |
00005d10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00005d20  3b 6d 61 6b 65 20 72 31  20 77 69 74 68 69 6e 20  |;make r1 within |
00005d30  72 61 6e 67 65 20 30 2d  36 34 0d 22 6a 4c 20 53  |range 0-64."jL S|
00005d40  54 52 20 52 31 2c 5b 52  39 2c 23 36 34 5d 20 20  |TR R1,[R9,#64]  |
00005d50  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 73  |              ;s|
00005d60  74 6f 72 65 20 72 31 20  61 73 20 6e 75 6d 62 65  |tore r1 as numbe|
00005d70  72 20 6f 66 20 66 72 61  6d 65 73 20 74 61 6e 6b  |r of frames tank|
00005d80  20 74 75 72 6e 73 0d 22  74 3c 20 42 4c 20 72 61  | turns."t< BL ra|
00005d90  6e 64 6f 6d 5f 6e 75 6d  62 65 72 20 20 20 20 20  |ndom_number     |
00005da0  20 20 20 20 20 20 20 20  20 20 3b 72 30 3d 72 61  |          ;r0=ra|
00005db0  6e 64 6f 6d 20 6e 75 6d  62 65 72 20 30 2d 34 30  |ndom number 0-40|
00005dc0  39 35 0d 22 7e 38 20 80  20 52 31 2c 52 30 2c 23  |95."~8 . R1,R0,#|
00005dd0  31 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |1               |
00005de0  20 20 20 20 3b 6d 61 6b  65 20 72 31 20 65 69 74  |    ;make r1 eit|
00005df0  68 65 72 20 31 20 6f 72  20 30 0d 22 88 31 20 43  |her 1 or 0.".1 C|
00005e00  4d 50 20 52 31 2c 23 30  20 20 20 20 20 20 20 20  |MP R1,#0        |
00005e10  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 69  |              ;i|
00005e20  66 20 72 31 3d 30 20 74  68 65 6e 0d 22 92 37 20  |f r1=0 then.".7 |
00005e30  53 55 42 45 51 20 52 31  2c 52 31 2c 23 31 20 20  |SUBEQ R1,R1,#1  |
00005e40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00005e50  20 20 20 20 20 20 20 20  20 20 20 20 20 72 31 3d  |             r1=|
00005e60  2d 31 0d 22 9c 42 20 4c  44 52 20 52 32 2c 5b 52  |-1.".B LDR R2,[R|
00005e70  31 32 2c 23 32 38 5d 20  20 20 20 20 20 20 20 20  |12,#28]         |
00005e80  20 20 20 20 20 20 3b 72  32 3d 73 74 61 6e 64 61  |      ;r2=standa|
00005e90  72 64 20 74 61 6e 6b 20  74 75 72 6e 69 6e 67 20  |rd tank turning |
00005ea0  72 61 74 65 0d 22 a6 47  20 4d 55 4c 20 52 33 2c  |rate.".G MUL R3,|
00005eb0  52 32 2c 52 31 20 20 20  20 20 20 20 20 20 20 20  |R2,R1           |
00005ec0  20 20 20 20 20 20 20 20  3b 72 33 3d 74 75 72 6e  |        ;r3=turn|
00005ed0  20 6c 65 66 74 20 6f 72  20 72 69 67 68 74 20 62  | left or right b|
00005ee0  79 20 74 75 72 6e 20 72  61 74 65 0d 22 b0 4d 20  |y turn rate.".M |
00005ef0  53 54 52 20 52 33 2c 5b  52 39 2c 23 37 32 5d 20  |STR R3,[R9,#72] |
00005f00  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00005f10  6e 65 77 20 74 75 72 6e  20 72 61 74 65 20 69 73  |new turn rate is|
00005f20  20 73 74 6f 72 65 64 20  66 6f 72 20 6c 61 74 65  | stored for late|
00005f30  72 20 75 73 65 2e 2e 2e  0d 22 ba 0e 20 4d 4f 56  |r use....".. MOV|
00005f40  20 52 30 2c 23 33 0d 22  c4 42 20 53 54 52 20 52  | R0,#3.".B STR R|
00005f50  30 2c 5b 52 39 2c 23 38  30 5d 20 20 20 20 20 20  |0,[R9,#80]      |
00005f60  20 20 20 20 20 20 20 20  20 20 3b 74 61 6e 6b 20  |          ;tank |
00005f70  73 74 61 74 75 73 20 69  73 20 73 65 74 20 74 6f  |status is set to|
00005f80  20 74 75 72 6e 69 6e 67  0d 22 ce 38 20 42 20 65  | turning.".8 B e|
00005f90  6e 64 5f 61 69 6d 20 20  20 20 20 20 20 20 20 20  |nd_aim          |
00005fa0  20 20 20 20 20 20 20 20  20 20 20 20 3b 65 6e 64  |            ;end|
00005fb0  20 6f 66 20 74 75 72 6e  20 73 65 74 20 75 70 2e  | of turn set up.|
00005fc0  0d 22 d8 04 0d 22 e2 10  20 2e 6e 65 77 5f 61 74  |."...".. .new_at|
00005fd0  74 61 63 6b 0d 22 ec 14  20 4c 44 52 20 52 31 2c  |tack.".. LDR R1,|
00005fe0  5b 52 39 2c 23 36 34 5d  0d 22 f6 0e 20 43 4d 50  |[R9,#64].".. CMP|
00005ff0  20 52 31 2c 23 30 0d 23  00 10 20 42 47 54 20 65  | R1,#0.#.. BGT e|
00006000  6e 64 5f 61 69 6d 0d 23  0a 0e 20 4d 4f 56 20 52  |nd_aim.#.. MOV R|
00006010  31 2c 23 31 0d 23 14 14  20 53 54 52 20 52 31 2c  |1,#1.#.. STR R1,|
00006020  5b 52 39 2c 23 38 30 5d  0d 23 1e 0d 20 2e 65 6e  |[R9,#80].#.. .en|
00006030  64 5f 61 69 6d 0d 23 28  04 0d 23 32 1b 20 4c 44  |d_aim.#(..#2. LD|
00006040  4d 46 44 20 52 31 33 21  2c 7b 52 30 2d 52 31 31  |MFD R13!,{R0-R11|
00006050  2c 50 43 7d 0d 23 3c 4e  20 3b 2a 2a 2a 2a 2a 2a  |,PC}.#<N ;******|
00006060  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00006070  2a 2a 2a 2a 2a 2a 2a 2a  20 61 74 74 61 63 6b 20  |******** attack |
00006080  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
*
000060a0  2a 2a 0d 23 46 04 0d 23  50 0c 20 2e 61 74 74 61  |**.#F..#P. .atta|
000060b0  63 6b 0d 23 5a 1c 20 53  54 4d 46 44 20 52 31 33  |ck.#Z. STMFD R13|
000060c0  21 2c 7b 52 30 2d 52 31  31 2c 52 31 34 7d 0d 23  |!,{R0-R11,R14}.#|
000060d0  64 14 20 4c 44 52 20 52  37 2c 5b 52 39 2c 23 32  |d. LDR R7,[R9,#2|
000060e0  30 5d 0d 23 6e 12 20 4c  44 52 20 52 31 31 2c 5b  |0].#n. LDR R11,[|
000060f0  52 31 32 5d 0d 23 78 04  0d 23 82 14 20 52 53 42  |R12].#x..#.. RSB|
00006100  20 52 37 2c 52 37 2c 23  34 30 39 36 0d 23 8c 0e  | R7,R7,#4096.#..|
00006110  20 4d 4f 56 20 52 31 2c  23 30 0d 23 96 13 20 4d  | MOV R1,#0.#.. M|
00006120  4f 56 20 52 33 2c 23 34  30 30 2a 53 43 0d 23 a0  |OV R3,#400*SC.#.|
00006130  0f 20 4d 4f 56 20 52 30  2c 23 31 38 0d 23 aa 15  |. MOV R0,#18.#..|
00006140  20 42 4c 20 72 6f 74 61  74 65 5f 79 5f 61 78 69  | BL rotate_y_axi|
00006150  73 0d 23 b4 13 20 4c 44  52 20 52 32 2c 5b 52 39  |s.#.. LDR R2,[R9|
00006160  2c 23 34 5d 0d 23 be 14  20 4c 44 52 20 52 34 2c  |,#4].#.. LDR R4,|
00006170  5b 52 39 2c 23 31 32 5d  0d 23 c8 11 20 53 55 42  |[R9,#12].#.. SUB|
00006180  20 52 31 2c 52 32 2c 52  31 0d 23 d2 11 20 53 55  | R1,R2,R1.#.. SU|
00006190  42 20 52 32 2c 52 34 2c  52 33 0d 23 dc 14 20 4c  |B R2,R4,R3.#.. L|
000061a0  44 52 20 52 33 2c 5b 52  31 31 2c 23 34 5d 0d 23  |DR R3,[R11,#4].#|
000061b0  e6 15 20 4c 44 52 20 52  34 2c 5b 52 31 31 2c 23  |.. LDR R4,[R11,#|
000061c0  31 32 5d 0d 23 f0 11 20  53 55 42 20 52 31 2c 52  |12].#.. SUB R1,R|
000061d0  31 2c 52 33 0d 23 fa 11  20 53 55 42 20 52 32 2c  |1,R3.#.. SUB R2,|
000061e0  52 32 2c 52 34 0d 24 04  15 20 4d 4f 56 20 52 31  |R2,R4.$.. MOV R1|
000061f0  2c 52 31 2c 41 53 52 20  23 38 0d 24 0e 15 20 4d  |,R1,ASR #8.$.. M|
00006200  4f 56 20 52 32 2c 52 32  2c 41 53 52 20 23 38 0d  |OV R2,R2,ASR #8.|
00006210  24 18 11 20 4d 55 4c 20  52 33 2c 52 31 2c 52 31  |$.. MUL R3,R1,R1|
00006220  0d 24 22 14 20 4d 4c 41  20 52 31 2c 52 32 2c 52  |.$". MLA R1,R2,R|
00006230  32 2c 52 33 0d 24 2c 14  20 53 54 4d 46 44 20 52  |2,R3.$,. STMFD R|
00006240  31 33 21 2c 7b 52 31 7d  0d 24 36 04 0d 24 40 14  |13!,{R1}.$6..$@.|
00006250  20 4c 44 52 20 52 37 2c  5b 52 39 2c 23 32 30 5d  | LDR R7,[R9,#20]|
00006260  0d 24 4a 15 20 4c 44 52  20 52 38 2c 5b 52 31 32  |.$J. LDR R8,[R12|
00006270  2c 23 32 38 5d 0d 24 54  11 20 41 44 44 20 52 37  |,#28].$T. ADD R7|
00006280  2c 52 37 2c 52 38 0d 24  5e 14 20 52 53 42 20 52  |,R7,R8.$^. RSB R|
00006290  37 2c 52 37 2c 23 34 30  39 36 0d 24 68 11 20 4d  |7,R7,#4096.$h. M|
000062a0  4f 56 20 52 31 2c 23 34  30 39 36 0d 24 72 11 20  |OV R1,#4096.$r. |
000062b0  53 55 42 20 52 31 2c 52  31 2c 23 31 0d 24 7c 0f  |SUB R1,R1,#1.$|.|
000062c0  20 80 20 52 37 2c 52 37  2c 52 31 0d 24 86 0e 20  | . R7,R7,R1.$.. |
000062d0  4d 4f 56 20 52 31 2c 23  30 0d 24 90 13 20 4d 4f  |MOV R1,#0.$.. MO|
000062e0  56 20 52 33 2c 23 34 30  30 2a 53 43 0d 24 9a 0f  |V R3,#400*SC.$..|
000062f0  20 4d 4f 56 20 52 30 2c  23 31 38 0d 24 a4 15 20  | MOV R0,#18.$.. |
00006300  42 4c 20 72 6f 74 61 74  65 5f 79 5f 61 78 69 73  |BL rotate_y_axis|
00006310  0d 24 ae 13 20 4c 44 52  20 52 32 2c 5b 52 39 2c  |.$.. LDR R2,[R9,|
00006320  23 34 5d 0d 24 b8 14 20  4c 44 52 20 52 34 2c 5b  |#4].$.. LDR R4,[|
00006330  52 39 2c 23 31 32 5d 0d  24 c2 11 20 53 55 42 20  |R9,#12].$.. SUB |
00006340  52 31 2c 52 32 2c 52 31  0d 24 cc 11 20 53 55 42  |R1,R2,R1.$.. SUB|
00006350  20 52 32 2c 52 34 2c 52  33 0d 24 d6 14 20 4c 44  | R2,R4,R3.$.. LD|
00006360  52 20 52 33 2c 5b 52 31  31 2c 23 34 5d 0d 24 e0  |R R3,[R11,#4].$.|
00006370  15 20 4c 44 52 20 52 34  2c 5b 52 31 31 2c 23 31  |. LDR R4,[R11,#1|
00006380  32 5d 0d 24 ea 11 20 53  55 42 20 52 31 2c 52 31  |2].$.. SUB R1,R1|
00006390  2c 52 33 0d 24 f4 11 20  53 55 42 20 52 32 2c 52  |,R3.$.. SUB R2,R|
000063a0  32 2c 52 34 0d 24 fe 15  20 4d 4f 56 20 52 31 2c  |2,R4.$.. MOV R1,|
000063b0  52 31 2c 41 53 52 20 23  38 0d 25 08 15 20 4d 4f  |R1,ASR #8.%.. MO|
000063c0  56 20 52 32 2c 52 32 2c  41 53 52 20 23 38 0d 25  |V R2,R2,ASR #8.%|
000063d0  12 11 20 4d 55 4c 20 52  33 2c 52 31 2c 52 31 0d  |.. MUL R3,R1,R1.|
000063e0  25 1c 14 20 4d 4c 41 20  52 31 2c 52 32 2c 52 32  |%.. MLA R1,R2,R2|
000063f0  2c 52 33 0d 25 26 14 20  53 54 4d 46 44 20 52 31  |,R3.%&. STMFD R1|
00006400  33 21 2c 7b 52 31 7d 0d  25 30 04 0d 25 3a 14 20  |3!,{R1}.%0..%:. |
00006410  4c 44 52 20 52 37 2c 5b  52 39 2c 23 32 30 5d 0d  |LDR R7,[R9,#20].|
00006420  25 44 15 20 4c 44 52 20  52 38 2c 5b 52 31 32 2c  |%D. LDR R8,[R12,|
00006430  23 32 38 5d 0d 25 4e 11  20 53 55 42 20 52 37 2c  |#28].%N. SUB R7,|
00006440  52 37 2c 52 38 0d 25 58  14 20 52 53 42 20 52 37  |R7,R8.%X. RSB R7|
00006450  2c 52 37 2c 23 34 30 39  36 0d 25 62 11 20 4d 4f  |,R7,#4096.%b. MO|
00006460  56 20 52 31 2c 23 34 30  39 36 0d 25 6c 11 20 53  |V R1,#4096.%l. S|
00006470  55 42 20 52 31 2c 52 31  2c 23 31 0d 25 76 0f 20  |UB R1,R1,#1.%v. |
00006480  80 20 52 37 2c 52 37 2c  52 31 0d 25 80 0e 20 4d  |. R7,R7,R1.%.. M|
00006490  4f 56 20 52 31 2c 23 30  0d 25 8a 13 20 4d 4f 56  |OV R1,#0.%.. MOV|
000064a0  20 52 33 2c 23 34 30 30  2a 53 43 0d 25 94 0f 20  | R3,#400*SC.%.. |
000064b0  4d 4f 56 20 52 30 2c 23  31 38 0d 25 9e 15 20 42  |MOV R0,#18.%.. B|
000064c0  4c 20 72 6f 74 61 74 65  5f 79 5f 61 78 69 73 0d  |L rotate_y_axis.|
000064d0  25 a8 13 20 4c 44 52 20  52 32 2c 5b 52 39 2c 23  |%.. LDR R2,[R9,#|
000064e0  34 5d 0d 25 b2 14 20 4c  44 52 20 52 34 2c 5b 52  |4].%.. LDR R4,[R|
000064f0  39 2c 23 31 32 5d 0d 25  bc 11 20 53 55 42 20 52  |9,#12].%.. SUB R|
00006500  31 2c 52 32 2c 52 31 0d  25 c6 11 20 53 55 42 20  |1,R2,R1.%.. SUB |
00006510  52 32 2c 52 34 2c 52 33  0d 25 d0 14 20 4c 44 52  |R2,R4,R3.%.. LDR|
00006520  20 52 33 2c 5b 52 31 31  2c 23 34 5d 0d 25 da 15  | R3,[R11,#4].%..|
00006530  20 4c 44 52 20 52 34 2c  5b 52 31 31 2c 23 31 32  | LDR R4,[R11,#12|
00006540  5d 0d 25 e4 11 20 53 55  42 20 52 31 2c 52 31 2c  |].%.. SUB R1,R1,|
00006550  52 33 0d 25 ee 11 20 53  55 42 20 52 32 2c 52 32  |R3.%.. SUB R2,R2|
00006560  2c 52 34 0d 25 f8 15 20  4d 4f 56 20 52 31 2c 52  |,R4.%.. MOV R1,R|
00006570  31 2c 41 53 52 20 23 38  0d 26 02 15 20 4d 4f 56  |1,ASR #8.&.. MOV|
00006580  20 52 32 2c 52 32 2c 41  53 52 20 23 38 0d 26 0c  | R2,R2,ASR #8.&.|
00006590  11 20 4d 55 4c 20 52 33  2c 52 31 2c 52 31 0d 26  |. MUL R3,R1,R1.&|
000065a0  16 14 20 4d 4c 41 20 52  31 2c 52 32 2c 52 32 2c  |.. MLA R1,R2,R2,|
000065b0  52 33 0d 26 20 04 0d 26  2a 14 20 4c 44 4d 46 44  |R3.& ..&*. LDMFD|
000065c0  20 52 31 33 21 2c 7b 52  32 7d 0d 26 34 14 20 4c  | R13!,{R2}.&4. L|
000065d0  44 4d 46 44 20 52 31 33  21 2c 7b 52 33 7d 0d 26  |DMFD R13!,{R3}.&|
000065e0  3e 04 0d 26 48 0e 20 43  4d 50 20 52 31 2c 52 32  |>..&H. CMP R1,R2|
000065f0  0d 26 52 1c 20 4d 4f 56  4c 45 20 52 34 2c 52 31  |.&R. MOVLE R4,R1|
00006600  3a 4d 4f 56 47 54 20 52  34 2c 52 32 0d 26 5c 0e  |:MOVGT R4,R2.&\.|
00006610  20 43 4d 50 20 52 34 2c  52 33 0d 26 66 10 20 4d  | CMP R4,R3.&f. M|
00006620  4f 56 47 45 20 52 34 2c  52 33 0d 26 70 04 0d 26  |OVGE R4,R3.&p..&|
00006630  7a 41 20 43 4d 50 20 52  34 2c 52 31 3a 4c 44 52  |zA CMP R4,R1:LDR|
00006640  45 51 20 52 35 2c 5b 52  39 2c 23 32 30 5d 3a 53  |EQ R5,[R9,#20]:S|
00006650  55 42 45 51 20 52 35 2c  52 35 2c 52 38 3a 53 54  |UBEQ R5,R5,R8:ST|
00006660  52 45 51 20 52 35 2c 5b  52 39 2c 23 32 30 5d 0d  |REQ R5,[R9,#20].|
00006670  26 84 41 20 43 4d 50 20  52 34 2c 52 32 3a 4c 44  |&.A CMP R4,R2:LD|
00006680  52 45 51 20 52 35 2c 5b  52 39 2c 23 32 30 5d 3a  |REQ R5,[R9,#20]:|
00006690  41 44 44 45 51 20 52 35  2c 52 35 2c 52 38 3a 53  |ADDEQ R5,R5,R8:S|
000066a0  54 52 45 51 20 52 35 2c  5b 52 39 2c 23 32 30 5d  |TREQ R5,[R9,#20]|
000066b0  0d 26 8e 3a 20 43 4d 50  20 52 34 2c 52 33 3a 42  |.&.: CMP R4,R3:B|
000066c0  4c 45 51 20 65 6e 65 6d  79 5f 73 68 65 6c 6c 3a  |LEQ enemy_shell:|
000066d0  ec 51 20 52 30 2c 23 30  3a 53 54 52 45 51 20 52  |.Q R0,#0:STREQ R|
000066e0  30 2c 5b 52 39 2c 23 38  30 5d 0d 26 98 1f 20 ec  |0,[R9,#80].&.. .|
000066f0  51 20 52 30 2c 23 31 3a  53 54 52 45 51 20 52 30  |Q R0,#1:STREQ R0|
00006700  2c 5b 52 39 2c 23 36 34  5d 0d 26 a2 04 0d 26 ac  |,[R9,#64].&...&.|
00006710  1b 20 4c 44 4d 46 44 20  52 31 33 21 2c 7b 52 30  |. LDMFD R13!,{R0|
00006720  2d 52 31 31 2c 50 43 7d  0d 26 b6 04 0d 26 c0 4c  |-R11,PC}.&...&.L|
00006730  20 3b 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  | ;**************|
00006740  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00006750  74 61 6e 6b 20 66 69 72  65 73 20 73 68 65 6c 6c  |tank fires shell|
00006760  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00006770  2a 2a 2a 2a 2a 2a 2a 2a  0d 26 ca 04 0d 26 d4 11  |********.&...&..|
00006780  20 2e 65 6e 65 6d 79 5f  73 68 65 6c 6c 0d 26 de  | .enemy_shell.&.|
00006790  1c 20 53 54 4d 46 44 20  52 31 33 21 2c 7b 52 30  |. STMFD R13!,{R0|
000067a0  2d 52 31 31 2c 52 31 34  7d 0d 26 e8 12 20 4c 44  |-R11,R14}.&.. LD|
000067b0  52 20 52 31 31 2c 5b 52  31 32 5d 0d 26 f2 0f 20  |R R11,[R12].&.. |
000067c0  4d 4f 56 20 52 31 30 2c  23 30 0d 26 fc 15 20 2e  |MOV R10,#0.&.. .|
000067d0  6c 6f 6f 70 5f 66 69 6e  64 5f 66 72 65 65 32 0d  |loop_find_free2.|
000067e0  27 06 13 20 41 44 44 20  52 31 30 2c 52 31 30 2c  |'.. ADD R10,R10,|
000067f0  23 31 0d 27 10 48 20 4c  44 52 20 52 30 2c 5b 52  |#1.'.H LDR R0,[R|
00006800  31 31 2c 52 31 30 2c 41  53 4c 20 23 6f 62 6a 65  |11,R10,ASL #obje|
00006810  63 74 5f 6c 65 6e 67 74  68 6c 6f 67 25 5d 3b 52  |ct_lengthlog%];R|
00006820  30 20 43 4f 4e 54 41 49  4e 53 20 4f 42 4a 45 43  |0 CONTAINS OBJEC|
00006830  54 20 52 45 46 20 43 4f  44 45 0d 27 1a 28 20 43  |T REF CODE.'.( C|
00006840  4d 50 20 52 31 30 2c 23  6d 61 78 5f 6f 62 6a 65  |MP R10,#max_obje|
00006850  63 74 73 25 3a 42 47 45  20 62 69 6e 5f 66 75 6c  |cts%:BGE bin_ful|
00006860  6c 32 0d 27 24 43 20 43  4d 50 20 52 30 2c 23 30  |l2.'$C CMP R0,#0|
00006870  3a 42 4e 45 20 6c 6f 6f  70 5f 66 69 6e 64 5f 66  |:BNE loop_find_f|
00006880  72 65 65 32 20 20 20 20  20 20 20 20 20 20 3b 43  |ree2          ;C|
00006890  48 45 43 4b 20 e7 20 4f  42 4a 45 43 54 20 49 53  |HECK . OBJECT IS|
000068a0  20 44 45 41 44 0d 27 2e  48 20 41 44 44 20 52 31  | DEAD.'.H ADD R1|
000068b0  31 2c 52 31 31 2c 52 31  30 2c 41 53 4c 20 23 6f  |1,R11,R10,ASL #o|
000068c0  62 6a 65 63 74 5f 6c 65  6e 67 74 68 6c 6f 67 25  |bject_lengthlog%|
000068d0  20 20 3b 52 39 20 c8 92  53 20 b8 20 42 45 47 49  |  ;R9 ..S . BEGI|
000068e0  4e 49 4e 47 20 ca 20 4f  42 4a 45 43 54 0d 27 38  |NING . OBJECT.'8|
000068f0  04 0d 27 42 1b 20 4d 4f  56 20 52 30 2c 23 32 3a  |..'B. MOV R0,#2:|
00006900  53 54 52 20 52 30 2c 5b  52 31 31 5d 0d 27 4c 1f  |STR R0,[R11].'L.|
00006910  20 4d 4f 56 20 52 30 2c  23 30 3a 53 54 52 20 52  | MOV R0,#0:STR R|
00006920  30 2c 5b 52 31 31 2c 23  31 36 5d 0d 27 56 1f 20  |0,[R11,#16].'V. |
00006930  4d 4f 56 20 52 30 2c 23  30 3a 53 54 52 20 52 30  |MOV R0,#0:STR R0|
00006940  2c 5b 52 31 31 2c 23 32  30 5d 0d 27 60 1f 20 4d  |,[R11,#20].'`. M|
00006950  4f 56 20 52 30 2c 23 30  3a 53 54 52 20 52 30 2c  |OV R0,#0:STR R0,|
00006960  5b 52 31 31 2c 23 32 34  5d 0d 27 6a 1f 20 4d 4f  |[R11,#24].'j. MO|
00006970  56 20 52 30 2c 23 30 3a  53 54 52 20 52 30 2c 5b  |V R0,#0:STR R0,[|
00006980  52 31 31 2c 23 34 30 5d  0d 27 74 1f 20 4d 4f 56  |R11,#40].'t. MOV|
00006990  20 52 30 2c 23 30 3a 53  54 52 20 52 30 2c 5b 52  | R0,#0:STR R0,[R|
000069a0  31 31 2c 23 34 34 5d 0d  27 7e 1f 20 4d 4f 56 20  |11,#44].'~. MOV |
000069b0  52 30 2c 23 30 3a 53 54  52 20 52 30 2c 5b 52 31  |R0,#0:STR R0,[R1|
000069c0  31 2c 23 34 38 5d 0d 27  88 14 20 4c 44 52 20 52  |1,#48].'.. LDR R|
000069d0  37 2c 5b 52 39 2c 23 32  30 5d 0d 27 92 14 20 52  |7,[R9,#20].'.. R|
000069e0  53 42 20 52 37 2c 52 37  2c 23 34 30 39 36 0d 27  |SB R7,R7,#4096.'|
000069f0  9c 30 20 4d 4f 56 20 52  31 2c 23 30 3a 4c 44 52  |.0 MOV R1,#0:LDR|
00006a00  20 52 33 2c 5b 52 31 32  2c 23 33 32 5d 3a 4d 56  | R3,[R12,#32]:MV|
00006a10  4e 20 52 33 2c 52 33 2c  41 53 4c 20 23 32 0d 27  |N R3,R3,ASL #2.'|
00006a20  a6 0f 20 4d 4f 56 20 52  30 2c 23 31 36 0d 27 b0  |.. MOV R0,#16.'.|
00006a30  2c 20 42 4c 20 72 6f 74  61 74 65 5f 79 5f 61 78  |, BL rotate_y_ax|
00006a40  69 73 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |is              |
00006a50  20 3b 72 6f 74 61 74 65  73 0d 27 ba 15 20 53 54  | ;rotates.'.. ST|
00006a60  52 20 52 31 2c 5b 52 31  31 2c 23 35 32 5d 0d 27  |R R1,[R11,#52].'|
00006a70  c4 0e 20 4d 4f 56 20 52  32 2c 23 30 0d 27 ce 15  |.. MOV R2,#0.'..|
00006a80  20 53 54 52 20 52 32 2c  5b 52 31 31 2c 23 35 36  | STR R2,[R11,#56|
00006a90  5d 0d 27 d8 15 20 53 54  52 20 52 33 2c 5b 52 31  |].'.. STR R3,[R1|
00006aa0  31 2c 23 36 30 5d 0d 27  e2 0e 20 4d 4f 56 20 52  |1,#60].'.. MOV R|
00006ab0  34 2c 23 31 0d 27 ec 33  20 4c 44 52 20 52 30 2c  |4,#1.'.3 LDR R0,|
00006ac0  5b 52 39 2c 23 34 5d 3a  4d 4c 41 20 52 30 2c 52  |[R9,#4]:MLA R0,R|
00006ad0  34 2c 52 31 2c 52 30 3a  53 54 52 20 52 30 2c 5b  |4,R1,R0:STR R0,[|
00006ae0  52 31 31 2c 23 34 5d 0d  27 f6 22 20 4d 4f 56 20  |R11,#4].'." MOV |
00006af0  52 30 2c 23 32 30 2a 53  43 3a 53 54 52 20 52 30  |R0,#20*SC:STR R0|
00006b00  2c 5b 52 31 31 2c 23 38  5d 0d 28 00 35 20 4c 44  |,[R11,#8].(.5 LD|
00006b10  52 20 52 30 2c 5b 52 39  2c 23 31 32 5d 3a 4d 4c  |R R0,[R9,#12]:ML|
00006b20  41 20 52 30 2c 52 34 2c  52 33 2c 52 30 3a 53 54  |A R0,R4,R3,R0:ST|
00006b30  52 20 52 30 2c 5b 52 31  31 2c 23 31 32 5d 0d 28  |R R0,[R11,#12].(|
00006b40  0a 1f 20 4d 4f 56 20 52  30 2c 23 31 3a 53 54 52  |.. MOV R0,#1:STR|
00006b50  20 52 30 2c 5b 52 31 31  2c 23 36 34 5d 0d 28 14  | R0,[R11,#64].(.|
00006b60  21 20 4d 4f 56 20 52 30  2c 23 31 32 33 3a 53 54  |! MOV R0,#123:ST|
00006b70  52 20 52 30 2c 5b 52 31  31 2c 23 36 38 5d 0d 28  |R R0,[R11,#68].(|
00006b80  1e 20 20 4d 4f 56 20 52  30 2c 23 37 31 3a 53 54  |.  MOV R0,#71:ST|
00006b90  52 20 52 30 2c 5b 52 31  31 2c 23 37 32 5d 0d 28  |R R0,[R11,#72].(|
00006ba0  28 20 20 4d 4f 56 20 52  30 2c 23 35 33 3a 53 54  |(  MOV R0,#53:ST|
00006bb0  52 20 52 30 2c 5b 52 31  31 2c 23 37 36 5d 0d 28  |R R0,[R11,#76].(|
00006bc0  32 25 20 4d 4f 56 20 52  30 2c 23 28 38 2a 46 29  |2% MOV R0,#(8*F)|
00006bd0  5e 32 3a 53 54 52 20 52  30 2c 5b 52 31 31 2c 23  |^2:STR R0,[R11,#|
00006be0  38 34 5d 0d 28 3c 04 0d  28 46 0e 20 4d 4f 56 20  |84].(<..(F. MOV |
00006bf0  52 30 2c 23 31 0d 28 50  0e 20 4d 56 4e 20 52 31  |R0,#1.(P. MVN R1|
00006c00  2c 23 33 0d 28 5a 0e 20  4d 4f 56 20 52 32 2c 23  |,#3.(Z. MOV R2,#|
00006c10  30 0d 28 64 0f 20 4d 4f  56 20 52 33 2c 23 37 30  |0.(d. MOV R3,#70|
00006c20  0d 28 6e 18 20 53 57 49  20 22 53 6f 75 6e 64 5f  |.(n. SWI "Sound_|
00006c30  43 6f 6e 74 72 6f 6c 22  0d 28 78 04 0d 28 82 0f  |Control".(x..(..|
00006c40  20 2e 62 69 6e 5f 66 75  6c 6c 32 0d 28 8c 04 0d  | .bin_full2.(...|
00006c50  28 96 1b 20 4c 44 4d 46  44 20 52 31 33 21 2c 7b  |(.. LDMFD R13!,{|
00006c60  52 30 2d 52 31 31 2c 50  43 7d 0d 28 a0 04 0d 28  |R0-R11,PC}.(...(|
00006c70  aa 4d 20 3b 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |.M ;************|
00006c80  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00006c90  2a 2a 74 75 72 6e 69 6e  67 20 74 61 6e 6b 2a 2a  |**turning tank**|
00006ca0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00006cb0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 0d 28 b4 04 0d  |***********.(...|
00006cc0  28 be 0d 20 2e 74 75 72  6e 69 6e 67 0d 28 c8 1c  |(.. .turning.(..|
00006cd0  20 53 54 4d 46 44 20 52  31 33 21 2c 7b 52 30 2d  | STMFD R13!,{R0-|
00006ce0  52 31 31 2c 52 31 34 7d  0d 28 d2 45 20 4c 44 52  |R11,R14}.(.E LDR|
00006cf0  20 52 31 2c 5b 52 39 2c  23 36 34 5d 20 20 20 20  | R1,[R9,#64]    |
00006d00  20 20 20 20 20 20 20 20  20 20 20 20 3b 72 31 3d  |            ;r1=|
00006d10  6e 75 6d 62 65 72 20 6f  66 20 66 72 61 6d 65 73  |number of frames|
00006d20  20 6c 65 66 74 20 74 6f  20 74 75 72 6e 0d 28 dc  | left to turn.(.|
00006d30  3f 20 53 55 42 20 52 31  2c 52 31 2c 23 31 20 20  |? SUB R1,R1,#1  |
00006d40  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00006d50  20 3b 64 65 63 72 65 6d  65 6e 74 20 6e 75 6d 62  | ;decrement numb|
00006d60  65 72 20 6f 66 20 66 72  61 6d 65 73 0d 28 e6 36  |er of frames.(.6|
00006d70  20 53 54 52 20 52 31 2c  5b 52 39 2c 23 36 34 5d  | STR R1,[R9,#64]|
00006d80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00006d90  3b 73 74 6f 72 65 20 66  72 61 6d 65 73 20 6c 65  |;store frames le|
00006da0  66 74 0d 28 f0 31 20 43  4d 50 20 52 31 2c 23 30  |ft.(.1 CMP R1,#0|
00006db0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00006dc0  20 20 20 20 20 20 3b 65  6e 64 20 6f 66 20 74 75  |      ;end of tu|
00006dd0  72 6e 3f 0d 28 fa 48 20  42 4c 45 51 20 6d 6f 76  |rn?.(.H BLEQ mov|
00006de0  5f 76 65 63 5f 73 65 74  20 20 20 20 20 20 20 20  |_vec_set        |
00006df0  20 20 20 20 20 20 20 3b  69 66 20 65 6e 64 20 6f  |       ;if end o|
00006e00  66 20 74 75 72 6e 20 74  68 65 6e 20 73 65 74 20  |f turn then set |
00006e10  75 70 20 6d 6f 76 65 6d  65 6e 74 0d 29 04 4a 20  |up movement.).J |
00006e20  53 54 52 45 51 20 52 31  2c 5b 52 39 2c 23 37 32  |STREQ R1,[R9,#72|
00006e30  5d 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |]              ;|
00006e40  69 66 20 65 6e 64 20 6f  66 20 74 75 72 6e 20 74  |if end of turn t|
00006e50  68 65 6e 20 73 65 74 20  72 6f 74 61 74 69 6f 6e  |hen set rotation|
00006e60  20 74 6f 20 30 0d 29 0e  1b 20 4c 44 4d 46 44 20  | to 0.).. LDMFD |
00006e70  52 31 33 21 2c 7b 52 30  2d 52 31 31 2c 50 43 7d  |R13!,{R0-R11,PC}|
00006e80  0d 29 18 04 0d 29 22 4e  20 3b 2a 2a 2a 2a 2a 2a  |.)...)"N ;******|
00006e90  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00006ea0  2a 2a 2a 2a 2a 2a 2a 6d  6f 76 69 6e 67 20 74 61  |*******moving ta|
00006eb0  6e 6b 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |nk**************|
00006ec0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00006ed0  2a 2a 0d 29 2c 04 0d 29  36 0c 20 2e 6d 6f 76 69  |**.),..)6. .movi|
00006ee0  6e 67 0d 29 40 1c 20 53  54 4d 46 44 20 52 31 33  |ng.)@. STMFD R13|
00006ef0  21 2c 7b 52 30 2d 52 31  31 2c 52 31 34 7d 0d 29  |!,{R0-R11,R14}.)|
00006f00  4a 45 20 4c 44 52 20 52  31 2c 5b 52 39 2c 23 36  |JE LDR R1,[R9,#6|
00006f10  34 5d 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |4]              |
00006f20  20 20 3b 72 31 3d 6e 75  6d 62 65 72 20 6f 66 20  |  ;r1=number of |
00006f30  66 72 61 6d 65 73 20 6c  65 66 74 20 74 6f 20 6d  |frames left to m|
00006f40  6f 76 65 0d 29 54 3f 20  53 55 42 20 52 31 2c 52  |ove.)T? SUB R1,R|
00006f50  31 2c 23 31 20 20 20 20  20 20 20 20 20 20 20 20  |1,#1            |
00006f60  20 20 20 20 20 20 20 3b  64 65 63 72 65 6d 65 6e  |       ;decremen|
00006f70  74 20 6e 75 6d 62 65 72  20 6f 66 20 66 72 61 6d  |t number of fram|
00006f80  65 73 0d 29 5e 36 20 53  54 52 20 52 31 2c 5b 52  |es.)^6 STR R1,[R|
00006f90  39 2c 23 36 34 5d 20 20  20 20 20 20 20 20 20 20  |9,#64]          |
00006fa0  20 20 20 20 20 20 3b 73  74 6f 72 65 20 66 72 61  |      ;store fra|
00006fb0  6d 65 73 20 6c 65 66 74  0d 29 68 31 20 43 4d 50  |mes left.)h1 CMP|
00006fc0  20 52 31 2c 23 30 20 20  20 20 20 20 20 20 20 20  | R1,#0          |
00006fd0  20 20 20 20 20 20 20 20  20 20 20 20 3b 65 6e 64  |            ;end|
00006fe0  20 6f 66 20 6d 6f 76 65  3f 0d 29 72 4e 20 53 54  | of move?.)rN ST|
00006ff0  52 45 51 20 52 31 2c 5b  52 39 2c 23 38 30 5d 20  |REQ R1,[R9,#80] |
00007000  20 20 20 20 20 20 20 20  20 20 20 20 20 3b 69 66  |             ;if|
00007010  20 65 6e 64 20 6f 66 20  6d 6f 76 65 20 74 68 65  | end of move the|
00007020  6e 20 73 65 74 20 73 74  61 74 75 73 20 74 6f 20  |n set status to |
00007030  6e 65 77 20 61 69 6d 0d  29 7c 49 20 53 54 52 45  |new aim.)|I STRE|
00007040  51 20 52 31 2c 5b 52 39  2c 23 35 32 5d 20 20 20  |Q R1,[R9,#52]   |
00007050  20 20 20 20 20 20 20 20  20 20 20 3b 69 66 20 65  |           ;if e|
00007060  6e 64 20 6f 66 20 6d 6f  76 65 20 74 68 65 6e 20  |nd of move then |
00007070  73 65 74 20 76 65 63 74  6f 72 73 20 74 6f 20 30  |set vectors to 0|
00007080  0d 29 86 16 20 53 54 52  45 51 20 52 31 2c 5b 52  |.).. STREQ R1,[R|
00007090  39 2c 23 36 30 5d 0d 29  90 1b 20 4c 44 4d 46 44  |9,#60].).. LDMFD|
000070a0  20 52 31 33 21 2c 7b 52  30 2d 52 31 31 2c 50 43  | R13!,{R0-R11,PC|
000070b0  7d 0d 29 9a 04 0d 29 a4  4e 20 3b 2a 2a 2a 2a 2a  |}.)...).N ;*****|
000070c0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000070d0  73 65 74 20 74 61 6e 6b  20 6d 6f 76 65 6d 65 6e  |set tank movemen|
000070e0  74 20 76 65 63 74 6f 72  73 2a 2a 2a 2a 2a 2a 2a  |t vectors*******|
000070f0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00007100  2a 2a 2a 0d 29 ae 04 0d  29 b8 11 20 2e 6d 6f 76  |***.)...).. .mov|
00007110  5f 76 65 63 5f 73 65 74  0d 29 c2 1c 20 53 54 4d  |_vec_set.).. STM|
00007120  46 44 20 52 31 33 21 2c  7b 52 30 2d 52 31 31 2c  |FD R13!,{R0-R11,|
00007130  52 31 34 7d 0d 29 cc 14  20 4c 44 52 20 52 37 2c  |R14}.).. LDR R7,|
00007140  5b 52 39 2c 23 32 30 5d  0d 29 d6 15 20 4c 44 52  |[R9,#20].).. LDR|
00007150  20 52 33 2c 5b 52 31 32  2c 23 33 32 5d 0d 29 e0  | R3,[R12,#32].).|
00007160  0e 20 4d 4f 56 20 52 31  2c 23 30 0d 29 ea 0f 20  |. MOV R1,#0.).. |
00007170  4d 4f 56 20 52 30 2c 23  31 35 0d 29 f4 14 20 52  |MOV R0,#15.).. R|
00007180  53 42 20 52 37 2c 52 37  2c 23 34 30 39 36 0d 29  |SB R7,R7,#4096.)|
00007190  fe 15 20 42 4c 20 72 6f  74 61 74 65 5f 79 5f 61  |.. BL rotate_y_a|
000071a0  78 69 73 0d 2a 08 0e 20  4d 56 4e 20 52 31 2c 52  |xis.*.. MVN R1,R|
000071b0  31 0d 2a 12 0e 20 4d 56  4e 20 52 33 2c 52 33 0d  |1.*.. MVN R3,R3.|
000071c0  2a 1c 14 20 53 54 52 20  52 31 2c 5b 52 39 2c 23  |*.. STR R1,[R9,#|
000071d0  35 32 5d 0d 2a 26 14 20  53 54 52 20 52 33 2c 5b  |52].*&. STR R3,[|
000071e0  52 39 2c 23 36 30 5d 0d  2a 30 15 20 42 4c 20 72  |R9,#60].*0. BL r|
000071f0  61 6e 64 6f 6d 5f 6e 75  6d 62 65 72 0d 2a 3a 11  |andom_number.*:.|
00007200  20 80 20 52 31 2c 52 30  2c 23 32 35 35 0d 2a 44  | . R1,R0,#255.*D|
00007210  14 20 53 54 52 20 52 31  2c 5b 52 39 2c 23 36 34  |. STR R1,[R9,#64|
00007220  5d 0d 2a 4e 0e 20 4d 4f  56 20 52 32 2c 23 32 0d  |].*N. MOV R2,#2.|
00007230  2a 58 14 20 53 54 52 20  52 32 2c 5b 52 39 2c 23  |*X. STR R2,[R9,#|
00007240  38 30 5d 0d 2a 62 1b 20  4c 44 4d 46 44 20 52 31  |80].*b. LDMFD R1|
00007250  33 21 2c 7b 52 30 2d 52  31 31 2c 50 43 7d 0d 2a  |3!,{R0-R11,PC}.*|
00007260  6c 04 0d 2a 76 4e 20 3b  2a 2a 2a 2a 2a 2a 2a 2a  |l..*vN ;********|
00007270  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00007280  2a 63 68 6f 6f 73 65 20  72 61 6e 64 6f 6d 20 6e  |*choose random n|
00007290  75 6d 62 65 72 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |umber***********|
000072a0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000072b0  0d 2a 80 04 0d 2a 8a 13  20 2e 72 61 6e 64 6f 6d  |.*...*.. .random|
000072c0  5f 6e 75 6d 62 65 72 0d  2a 94 1c 20 53 54 4d 46  |_number.*.. STMF|
000072d0  44 20 52 31 33 21 2c 7b  52 31 2d 52 31 31 2c 52  |D R13!,{R1-R11,R|
000072e0  31 34 7d 0d 2a 9e 42 20  4c 44 52 20 52 31 2c 5b  |14}.*.B LDR R1,[|
000072f0  52 31 32 2c 23 34 30 5d  20 20 20 20 20 20 20 20  |R12,#40]        |
00007300  20 20 20 20 20 20 20 3b  72 31 3d 73 74 61 72 74  |       ;r1=start|
00007310  20 61 64 64 72 65 73 73  20 6f 66 20 72 6e 64 20  | address of rnd |
00007320  74 61 62 6c 65 0d 2a a8  41 20 4c 44 52 20 52 32  |table.*.A LDR R2|
00007330  2c 5b 52 31 32 2c 23 34  34 5d 20 20 20 20 20 20  |,[R12,#44]      |
00007340  20 20 20 20 20 20 20 20  20 3b 72 32 3d 70 6f 69  |         ;r2=poi|
00007350  6e 74 65 72 20 70 6f 73  69 74 69 6f 6e 20 69 6e  |nter position in|
00007360  20 74 61 62 6c 65 0d 2a  b2 34 20 4c 44 52 20 52  | table.*.4 LDR R|
00007370  30 2c 5b 52 31 2c 52 32  2c 41 53 4c 20 23 32 5d  |0,[R1,R2,ASL #2]|
00007380  20 20 20 20 20 20 20 20  20 20 3b 72 30 3d 72 61  |          ;r0=ra|
00007390  6e 64 6f 6d 20 76 61 6c  75 65 0d 2a bc 3b 20 41  |ndom value.*.; A|
000073a0  44 44 20 52 32 2c 52 32  2c 23 31 20 20 20 20 20  |DD R2,R2,#1     |
000073b0  20 20 20 20 20 20 20 20  20 20 20 20 20 20 3b 69  |              ;i|
000073c0  6e 63 72 65 61 73 65 20  70 6f 69 6e 74 65 72 20  |ncrease pointer |
000073d0  76 61 6c 75 65 0d 2a c6  11 20 4d 4f 56 20 52 33  |value.*.. MOV R3|
000073e0  2c 23 34 30 39 36 0d 2a  d0 39 20 53 55 42 20 52  |,#4096.*.9 SUB R|
000073f0  33 2c 52 33 2c 23 31 20  20 20 20 20 20 20 20 20  |3,R3,#1         |
00007400  20 20 20 20 20 20 20 20  20 20 3b 73 65 74 20 72  |          ;set r|
00007410  33 20 74 6f 20 63 6c 69  70 20 72 61 6e 67 65 0d  |3 to clip range.|
00007420  2a da 3c 20 80 20 52 32  2c 52 32 2c 52 33 20 20  |*.< . R2,R2,R3  |
00007430  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00007440  20 3b 63 6c 69 70 20 70  6f 69 6e 74 65 72 20 77  | ;clip pointer w|
00007450  69 74 68 69 6e 20 72 61  6e 67 65 0d 2a e4 3c 20  |ithin range.*.< |
00007460  53 54 52 20 52 32 2c 5b  52 31 32 2c 23 34 34 5d  |STR R2,[R12,#44]|
00007470  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3b  |               ;|
00007480  73 74 6f 72 65 20 6e 65  77 20 70 6f 69 6e 74 65  |store new pointe|
00007490  72 20 76 61 6c 75 65 0d  2a ee 1b 20 4c 44 4d 46  |r value.*.. LDMF|
000074a0  44 20 52 31 33 21 2c 7b  52 31 2d 52 31 31 2c 50  |D R13!,{R1-R11,P|
000074b0  43 7d 0d 2a f8 04 0d 2b  02 4e 20 3b 2a 2a 2a 2a  |C}.*...+.N ;****|
000074c0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000074d0  2a 2a 2a 2a 64 65 74 65  63 74 20 73 68 65 6c 6c  |****detect shell|
000074e0  20 63 6f 6c 6c 69 73 69  6f 6e 2a 2a 2a 2a 2a 2a  | collision******|
000074f0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00007500  2a 2a 2a 2a 0d 2b 0c 04  0d 2b 16 0f 20 2e 68 69  |****.+...+.. .hi|
00007510  74 5f 73 68 65 6c 6c 0d  2b 20 1c 20 53 54 4d 46  |t_shell.+ . STMF|
00007520  44 20 52 31 33 21 2c 7b  52 30 2d 52 31 31 2c 52  |D R13!,{R0-R11,R|
00007530  31 34 7d 0d 2b 2a 0e 20  4d 4f 56 20 52 38 2c 23  |14}.+*. MOV R8,#|
00007540  31 0d 2b 34 0e 20 4d 4f  56 20 52 33 2c 23 30 0d  |1.+4. MOV R3,#0.|
00007550  2b 3e 15 20 4c 44 52 20  52 30 2c 5b 52 31 32 2c  |+>. LDR R0,[R12,|
00007560  23 35 32 5d 0d 2b 48 0e  20 4d 56 4e 20 52 31 2c  |#52].+H. MVN R1,|
00007570  52 30 0d 2b 52 13 20 4c  44 52 20 52 32 2c 5b 52  |R0.+R. LDR R2,[R|
00007580  39 2c 23 34 5d 0d 2b 5c  0e 20 43 4d 50 20 52 32  |9,#4].+\. CMP R2|
00007590  2c 52 30 0d 2b 66 1d 20  53 54 52 47 45 20 52 33  |,R0.+f. STRGE R3|
000075a0  2c 5b 52 39 5d 3a 42 4c  47 45 20 65 78 70 6c 6f  |,[R9]:BLGE explo|
000075b0  0d 2b 70 0e 20 43 4d 50  20 52 32 2c 52 31 0d 2b  |.+p. CMP R2,R1.+|
000075c0  7a 1d 20 53 54 52 4c 45  20 52 33 2c 5b 52 39 5d  |z. STRLE R3,[R9]|
000075d0  3a 42 4c 4c 45 20 65 78  70 6c 6f 0d 2b 84 14 20  |:BLLE explo.+.. |
000075e0  4c 44 52 20 52 32 2c 5b  52 39 2c 23 31 32 5d 0d  |LDR R2,[R9,#12].|
000075f0  2b 8e 0e 20 43 4d 50 20  52 32 2c 52 30 0d 2b 98  |+.. CMP R2,R0.+.|
00007600  1d 20 53 54 52 47 45 20  52 33 2c 5b 52 39 5d 3a  |. STRGE R3,[R9]:|
00007610  42 4c 47 45 20 65 78 70  6c 6f 0d 2b a2 0e 20 43  |BLGE explo.+.. C|
00007620  4d 50 20 52 32 2c 52 31  0d 2b ac 1d 20 53 54 52  |MP R2,R1.+.. STR|
00007630  4c 45 20 52 33 2c 5b 52  39 5d 3a 42 4c 4c 45 20  |LE R3,[R9]:BLLE |
00007640  65 78 70 6c 6f 0d 2b b6  04 0d 2b c0 12 20 42 4c  |explo.+...+.. BL|
00007650  20 68 69 74 5f 64 65 74  65 63 74 0d 2b ca 0e 20  | hit_detect.+.. |
00007660  43 4d 50 20 52 31 2c 23  30 0d 2b d4 0f 20 42 45  |CMP R1,#0.+.. BE|
00007670  51 20 6d 69 73 73 65 64  0d 2b de 0e 20 4d 4f 56  |Q missed.+.. MOV|
00007680  20 52 38 2c 23 33 0d 2b  e8 10 20 4c 44 52 20 52  | R8,#3.+.. LDR R|
00007690  32 2c 5b 52 31 5d 0d 2b  f2 32 20 43 4d 50 20 52  |2,[R1].+.2 CMP R|
000076a0  32 2c 23 31 3a 53 54 52  45 51 20 52 33 2c 5b 52  |2,#1:STREQ R3,[R|
000076b0  39 5d 3a 42 4c 45 51 20  65 78 70 6c 6f 3a 42 45  |9]:BLEQ explo:BE|
000076c0  51 20 6d 69 73 73 65 64  0d 2b fc 32 20 43 4d 50  |Q missed.+.2 CMP|
000076d0  20 52 32 2c 23 35 3a 53  54 52 45 51 20 52 33 2c  | R2,#5:STREQ R3,|
000076e0  5b 52 39 5d 3a 42 4c 45  51 20 65 78 70 6c 6f 3a  |[R9]:BLEQ explo:|
000076f0  42 45 51 20 6d 69 73 73  65 64 0d 2c 06 40 20 43  |BEQ missed.,.@ C|
00007700  4d 50 20 52 32 2c 23 32  3a 53 54 52 45 51 20 52  |MP R2,#2:STREQ R|
00007710  33 2c 5b 52 39 5d 3a 53  54 52 45 51 20 52 33 2c  |3,[R9]:STREQ R3,|
00007720  5b 52 31 5d 3a 42 4c 45  51 20 65 78 70 6c 6f 3a  |[R1]:BLEQ explo:|
00007730  42 45 51 20 6d 69 73 73  65 64 0d 2c 10 20 20 43  |BEQ missed.,.  C|
00007740  4d 50 20 52 32 2c 23 37  3a 42 4e 45 20 6e 6f 74  |MP R2,#7:BNE not|
00007750  5f 62 6f 6e 75 73 5f 6f  62 6a 0d 2c 1a 13 20 4c  |_bonus_obj.,.. L|
00007760  44 52 20 52 34 2c 5b 52  31 2c 23 38 5d 0d 2c 24  |DR R4,[R1,#8].,$|
00007770  1e 20 43 4d 50 20 52 34  2c 23 31 30 30 2a 53 43  |. CMP R4,#100*SC|
00007780  3a 42 47 54 20 6d 69 73  73 65 64 0d 2c 2e 52 20  |:BGT missed.,.R |
00007790  4c 44 52 20 52 34 2c 5b  52 31 32 2c 23 36 34 5d  |LDR R4,[R12,#64]|
000077a0  3a 53 54 52 20 52 34 2c  5b 52 31 32 2c 23 36 38  |:STR R4,[R12,#68|
000077b0  5d 3a 4d 4f 56 20 52 38  2c 23 31 35 3a 53 54 52  |]:MOV R8,#15:STR|
000077c0  20 52 33 2c 5b 52 39 5d  3a 53 54 52 20 52 33 2c  | R3,[R9]:STR R3,|
000077d0  5b 52 31 5d 3a 42 4c 20  65 78 70 6c 6f 0d 2c 38  |[R1]:BL explo.,8|
000077e0  0d 20 42 20 6d 69 73 73  65 64 0d 2c 42 13 20 2e  |. B missed.,B. .|
000077f0  6e 6f 74 5f 62 6f 6e 75  73 5f 6f 62 6a 0d 2c 4c  |not_bonus_obj.,L|
00007800  19 20 43 4d 50 20 52 32  2c 23 33 3a 42 4e 45 20  |. CMP R2,#3:BNE |
00007810  6d 69 73 73 65 64 0d 2c  56 30 20 53 54 52 20 52  |missed.,V0 STR R|
00007820  33 2c 5b 52 39 5d 3a 53  54 52 20 52 33 2c 5b 52  |3,[R9]:STR R3,[R|
00007830  31 5d 3a 4d 4f 56 20 52  38 2c 23 31 35 3a 42 4c  |1]:MOV R8,#15:BL|
00007840  20 65 78 70 6c 6f 0d 2c  60 44 20 43 4d 50 20 52  | explo.,`D CMP R|
00007850  31 2c 52 31 31 3a 4c 44  52 4e 45 20 52 34 2c 5b  |1,R11:LDRNE R4,[|
00007860  52 31 32 2c 23 36 38 5d  3a 41 44 44 4e 45 20 52  |R12,#68]:ADDNE R|
00007870  34 2c 52 34 2c 23 31 3a  53 54 52 4e 45 20 52 34  |4,R4,#1:STRNE R4|
00007880  2c 5b 52 31 32 2c 23 36  38 5d 0d 2c 6a 04 0d 2c  |,[R12,#68].,j..,|
00007890  74 0c 20 2e 6d 69 73 73  65 64 0d 2c 7e 1b 20 4c  |t. .missed.,~. L|
000078a0  44 4d 46 44 20 52 31 33  21 2c 7b 52 30 2d 52 31  |DMFD R13!,{R0-R1|
000078b0  31 2c 50 43 7d 0d 2c 88  04 0d 2c 92 4d 20 3b 2a  |1,PC}.,...,.M ;*|
000078c0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
000078d0  2a 2a 2a 2a 2a 2a 2a 64  65 74 65 63 74 20 74 61  |*******detect ta|
000078e0  6e 6b 20 63 6f 6c 6c 69  73 69 6f 6e 2a 2a 2a 2a  |nk collision****|
000078f0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00007900  2a 2a 2a 2a 2a 2a 0d 2c  9c 04 0d 2c a6 0e 20 2e  |******.,...,.. .|
00007910  68 69 74 5f 74 61 6e 6b  0d 2c b0 1c 20 53 54 4d  |hit_tank.,.. STM|
00007920  46 44 20 52 31 33 21 2c  7b 52 30 2d 52 31 31 2c  |FD R13!,{R0-R11,|
00007930  52 31 34 7d 0d 2c ba 15  20 4c 44 52 20 52 30 2c  |R14}.,.. LDR R0,|
00007940  5b 52 31 32 2c 23 35 32  5d 0d 2c c4 0e 20 4d 56  |[R12,#52].,.. MV|
00007950  4e 20 52 31 2c 52 30 0d  2c ce 13 20 4c 44 52 20  |N R1,R0.,.. LDR |
00007960  52 32 2c 5b 52 39 2c 23  34 5d 0d 2c d8 0e 20 43  |R2,[R9,#4].,.. C|
00007970  4d 50 20 52 32 2c 52 30  0d 2c e2 10 20 42 4c 47  |MP R2,R0.,.. BLG|
00007980  45 20 62 6f 75 6e 63 65  0d 2c ec 0e 20 43 4d 50  |E bounce.,.. CMP|
00007990  20 52 32 2c 52 31 0d 2c  f6 10 20 42 4c 4c 45 20  | R2,R1.,.. BLLE |
000079a0  62 6f 75 6e 63 65 0d 2d  00 14 20 4c 44 52 20 52  |bounce.-.. LDR R|
000079b0  32 2c 5b 52 39 2c 23 31  32 5d 0d 2d 0a 0e 20 43  |2,[R9,#12].-.. C|
000079c0  4d 50 20 52 32 2c 52 30  0d 2d 14 10 20 42 4c 47  |MP R2,R0.-.. BLG|
000079d0  45 20 62 6f 75 6e 63 65  0d 2d 1e 0e 20 43 4d 50  |E bounce.-.. CMP|
000079e0  20 52 32 2c 52 31 0d 2d  28 10 20 42 4c 4c 45 20  | R2,R1.-(. BLLE |
000079f0  62 6f 75 6e 63 65 0d 2d  32 04 0d 2d 3c 12 20 42  |bounce.-2..-<. B|
00007a00  4c 20 68 69 74 5f 64 65  74 65 63 74 0d 2d 46 0e  |L hit_detect.-F.|
00007a10  20 43 4d 50 20 52 31 2c  23 30 0d 2d 50 10 20 42  | CMP R1,#0.-P. B|
00007a20  45 51 20 6d 69 73 73 65  64 32 0d 2d 5a 10 20 4c  |EQ missed2.-Z. L|
00007a30  44 52 20 52 32 2c 5b 52  31 5d 0d 2d 64 1a 20 43  |DR R2,[R1].-d. C|
00007a40  4d 50 20 52 32 2c 23 34  3a 42 45 51 20 6d 69 73  |MP R2,#4:BEQ mis|
00007a50  73 65 64 32 0d 2d 6e 1a  20 43 4d 50 20 52 32 2c  |sed2.-n. CMP R2,|
00007a60  23 36 3a 42 45 51 20 6d  69 73 73 65 64 32 0d 2d  |#6:BEQ missed2.-|
00007a70  78 1a 20 43 4d 50 20 52  32 2c 23 32 3a 42 45 51  |x. CMP R2,#2:BEQ|
00007a80  20 6d 69 73 73 65 64 32  0d 2d 82 1a 20 43 4d 50  | missed2.-.. CMP|
00007a90  20 52 32 2c 23 37 3a 42  45 51 20 6d 69 73 73 65  | R2,#7:BEQ misse|
00007aa0  64 32 0d 2d 8c 0e 20 42  4c 20 62 6f 75 6e 63 65  |d2.-.. BL bounce|
00007ab0  0d 2d 96 0d 20 2e 6d 69  73 73 65 64 32 0d 2d a0  |.-.. .missed2.-.|
00007ac0  1b 20 4c 44 4d 46 44 20  52 31 33 21 2c 7b 52 30  |. LDMFD R13!,{R0|
00007ad0  2d 52 31 31 2c 50 43 7d  0d 2d aa 04 0d 2d b4 4d  |-R11,PC}.-...-.M|
00007ae0  20 3b 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  | ;**************|
00007af0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 68 69 74 20  |************hit |
00007b00  62 6f 6e 75 73 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |bonus***********|
00007b10  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00007b20  2a 2a 2a 2a 2a 2a 2a 2a  2a 0d 2d be 04 0d 2d c8  |*********.-...-.|
00007b30  0f 20 2e 68 69 74 5f 62  6f 6e 75 73 0d 2d d2 1c  |. .hit_bonus.-..|
00007b40  20 53 54 4d 46 44 20 52  31 33 21 2c 7b 52 30 2d  | STMFD R13!,{R0-|
00007b50  52 31 31 2c 52 31 34 7d  0d 2d dc 12 20 42 4c 20  |R11,R14}.-.. BL |
00007b60  68 69 74 5f 64 65 74 65  63 74 0d 2d e6 0e 20 43  |hit_detect.-.. C|
00007b70  4d 50 20 52 31 2c 23 30  0d 2d f0 15 20 42 45 51  |MP R1,#0.-.. BEQ|
00007b80  20 6d 69 73 73 65 64 5f  62 6f 6e 75 73 0d 2d fa  | missed_bonus.-.|
00007b90  13 20 4c 44 52 20 52 32  2c 5b 52 39 2c 23 38 5d  |. LDR R2,[R9,#8]|
00007ba0  0d 2e 04 13 20 43 4d 50  20 52 32 2c 23 31 30 30  |.... CMP R2,#100|
00007bb0  2a 53 43 0d 2e 0e 15 20  42 47 54 20 6d 69 73 73  |*SC.... BGT miss|
00007bc0  65 64 5f 62 6f 6e 75 73  0d 2e 18 10 20 4c 44 52  |ed_bonus.... LDR|
00007bd0  20 52 33 2c 5b 52 31 5d  0d 2e 22 0e 20 43 4d 50  | R3,[R1]..". CMP|
00007be0  20 52 33 2c 23 37 0d 2e  2c 15 20 42 45 51 20 6d  | R3,#7..,. BEQ m|
00007bf0  69 73 73 65 64 5f 62 6f  6e 75 73 0d 2e 36 0e 20  |issed_bonus..6. |
00007c00  43 4d 50 20 52 33 2c 23  34 0d 2e 40 15 20 42 45  |CMP R3,#4..@. BE|
00007c10  51 20 6d 69 73 73 65 64  5f 62 6f 6e 75 73 0d 2e  |Q missed_bonus..|
00007c20  4a 0e 20 43 4d 50 20 52  33 2c 23 36 0d 2e 54 15  |J. CMP R3,#6..T.|
00007c30  20 42 45 51 20 6d 69 73  73 65 64 5f 62 6f 6e 75  | BEQ missed_bonu|
00007c40  73 0d 2e 5e 0e 20 43 4d  50 20 52 33 2c 23 32 0d  |s..^. CMP R3,#2.|
00007c50  2e 68 15 20 42 45 51 20  6d 69 73 73 65 64 5f 62  |.h. BEQ missed_b|
00007c60  6f 6e 75 73 0d 2e 72 0e  20 4d 4f 56 20 52 30 2c  |onus..r. MOV R0,|
00007c70  23 30 0d 2e 7c 10 20 53  54 52 20 52 30 2c 5b 52  |#0..|. STR R0,[R|
00007c80  31 5d 0d 2e 86 0f 20 4d  4f 56 20 52 38 2c 23 31  |1].... MOV R8,#1|
00007c90  32 0d 2e 90 0d 20 42 4c  20 65 78 70 6c 6f 0d 2e  |2.... BL explo..|
00007ca0  9a 12 20 2e 6d 69 73 73  65 64 5f 62 6f 6e 75 73  |.. .missed_bonus|
00007cb0  0d 2e a4 1b 20 4c 44 4d  46 44 20 52 31 33 21 2c  |.... LDMFD R13!,|
00007cc0  7b 52 30 2d 52 31 31 2c  50 43 7d 0d 2e ae 04 0d  |{R0-R11,PC}.....|
00007cd0  2e b8 4d 20 3b 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |..M ;***********|
00007ce0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 62 6f 75  |*************bou|
00007cf0  6e 63 65 73 20 74 61 6e  6b 73 20 6f 66 66 20 6f  |nces tanks off o|
00007d00  62 6a 65 74 73 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |bjets***********|
00007d10  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 0d 2e c2 04  |************....|
00007d20  0d 2e cc 0c 20 2e 62 6f  75 6e 63 65 0d 2e d6 1c  |.... .bounce....|
00007d30  20 53 54 4d 46 44 20 52  31 33 21 2c 7b 52 30 2d  | STMFD R13!,{R0-|
00007d40  52 31 31 2c 52 31 34 7d  0d 2e e0 13 20 4c 44 52  |R11,R14}.... LDR|
00007d50  20 52 31 2c 5b 52 39 2c  23 34 5d 0d 2e ea 14 20  | R1,[R9,#4].... |
00007d60  4c 44 52 20 52 32 2c 5b  52 39 2c 23 31 32 5d 0d  |LDR R2,[R9,#12].|
00007d70  2e f4 14 20 4c 44 52 20  52 33 2c 5b 52 39 2c 23  |... LDR R3,[R9,#|
00007d80  35 32 5d 0d 2e fe 14 20  4c 44 52 20 52 34 2c 5b  |52].... LDR R4,[|
00007d90  52 39 2c 23 36 30 5d 0d  2f 08 0e 20 4d 4f 56 20  |R9,#60]./.. MOV |
00007da0  52 35 2c 23 35 0d 2f 12  11 20 4d 55 4c 20 52 33  |R5,#5./.. MUL R3|
00007db0  2c 52 35 2c 52 33 0d 2f  1c 11 20 4d 55 4c 20 52  |,R5,R3./.. MUL R|
00007dc0  34 2c 52 35 2c 52 34 0d  2f 26 11 20 53 55 42 20  |4,R5,R4./&. SUB |
00007dd0  52 31 2c 52 31 2c 52 33  0d 2f 30 11 20 53 55 42  |R1,R1,R3./0. SUB|
00007de0  20 52 32 2c 52 32 2c 52  34 0d 2f 3a 13 20 53 54  | R2,R2,R4./:. ST|
00007df0  52 20 52 31 2c 5b 52 39  2c 23 34 5d 0d 2f 44 14  |R R1,[R9,#4]./D.|
00007e00  20 53 54 52 20 52 32 2c  5b 52 39 2c 23 31 32 5d  | STR R2,[R9,#12]|
00007e10  0d 2f 4e 0e 20 4d 4f 56  20 52 30 2c 23 30 0d 2f  |./N. MOV R0,#0./|
00007e20  58 14 20 53 54 52 20 52  30 2c 5b 52 39 2c 23 38  |X. STR R0,[R9,#8|
00007e30  30 5d 0d 2f 62 14 20 53  54 52 20 52 30 2c 5b 52  |0]./b. STR R0,[R|
00007e40  39 2c 23 35 32 5d 0d 2f  6c 14 20 53 54 52 20 52  |9,#52]./l. STR R|
00007e50  30 2c 5b 52 39 2c 23 35  36 5d 0d 2f 76 14 20 53  |0,[R9,#56]./v. S|
00007e60  54 52 20 52 30 2c 5b 52  39 2c 23 36 30 5d 0d 2f  |TR R0,[R9,#60]./|
00007e70  80 1b 20 4c 44 4d 46 44  20 52 31 33 21 2c 7b 52  |.. LDMFD R13!,{R|
00007e80  30 2d 52 31 31 2c 50 43  7d 0d 2f 8a 04 0d 2f 94  |0-R11,PC}./.../.|
00007e90  4d 20 3b 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |M ;*************|
00007ea0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 68  |***************h|
00007eb0  69 74 20 64 65 74 65 63  74 69 6f 6e 2a 2a 2a 2a  |it detection****|
00007ec0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00007ed0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 0d 2f 9e 04 0d 2f  |**********./.../|
00007ee0  a8 10 20 2e 68 69 74 5f  64 65 74 65 63 74 0d 2f  |.. .hit_detect./|
00007ef0  b2 1f 20 53 54 4d 46 44  20 52 31 33 21 2c 7b 52  |.. STMFD R13!,{R|
00007f00  30 2c 52 32 2d 52 31 31  2c 52 31 34 7d 0d 2f bc  |0,R2-R11,R14}./.|
00007f10  0f 20 4d 56 4e 20 52 31  30 2c 23 30 0d 2f c6 16  |. MVN R10,#0./..|
00007f20  20 2e 6c 6f 6f 70 5f 66  69 6e 64 5f 6f 62 6a 65  | .loop_find_obje|
00007f30  63 74 0d 2f d0 13 20 41  44 44 20 52 31 30 2c 52  |ct./.. ADD R10,R|
00007f40  31 30 2c 23 31 0d 2f da  48 20 4c 44 52 20 52 30  |10,#1./.H LDR R0|
00007f50  2c 5b 52 31 31 2c 52 31  30 2c 41 53 4c 20 23 6f  |,[R11,R10,ASL #o|
00007f60  62 6a 65 63 74 5f 6c 65  6e 67 74 68 6c 6f 67 25  |bject_lengthlog%|
00007f70  5d 3b 52 30 20 43 4f 4e  54 41 49 4e 53 20 4f 42  |];R0 CONTAINS OB|
00007f80  4a 45 43 54 20 52 45 46  20 43 4f 44 45 0d 2f e4  |JECT REF CODE./.|
00007f90  23 20 43 4d 50 20 52 31  30 2c 23 6d 61 78 5f 6f  |# CMP R10,#max_o|
00007fa0  62 6a 65 63 74 73 25 3a  42 47 45 20 6d 69 73 73  |bjects%:BGE miss|
00007fb0  0d 2f ee 44 20 43 4d 50  20 52 30 2c 23 30 3a 42  |./.D CMP R0,#0:B|
00007fc0  45 51 20 6c 6f 6f 70 5f  66 69 6e 64 5f 6f 62 6a  |EQ loop_find_obj|
00007fd0  65 63 74 20 20 20 20 20  20 20 20 20 3b 43 48 45  |ect         ;CHE|
00007fe0  43 4b 20 e7 20 4f 42 4a  45 43 54 20 49 53 20 41  |CK . OBJECT IS A|
00007ff0  4c 49 56 45 0d 2f f8 47  20 41 44 44 20 52 38 2c  |LIVE./.G ADD R8,|
00008000  52 31 31 2c 52 31 30 2c  41 53 4c 20 23 6f 62 6a  |R11,R10,ASL #obj|
00008010  65 63 74 5f 6c 65 6e 67  74 68 6c 6f 67 25 20 20  |ect_lengthlog%  |
00008020  3b 52 38 20 c8 92 53 20  b8 20 42 45 47 49 4e 49  |;R8 ..S . BEGINI|
00008030  4e 47 20 ca 20 4f 42 4a  45 43 54 0d 30 02 17 20  |NG . OBJECT.0.. |
00008040  43 4d 50 20 52 38 2c 52  39 3a 42 45 51 20 73 65  |CMP R8,R9:BEQ se|
00008050  6c 66 0d 30 0c 14 20 4c  44 52 20 52 35 2c 5b 52  |lf.0.. LDR R5,[R|
00008060  38 2c 23 38 34 5d 0d 30  16 13 20 4c 44 52 20 52  |8,#84].0.. LDR R|
00008070  36 2c 5b 52 38 2c 23 34  5d 0d 30 20 14 20 4c 44  |6,[R8,#4].0 . LD|
00008080  52 20 52 37 2c 5b 52 38  2c 23 31 32 5d 0d 30 2a  |R R7,[R8,#12].0*|
00008090  04 0d 30 34 14 20 4c 44  52 20 52 32 2c 5b 52 39  |..04. LDR R2,[R9|
000080a0  2c 23 38 34 5d 0d 30 3e  13 20 4c 44 52 20 52 33  |,#84].0>. LDR R3|
000080b0  2c 5b 52 39 2c 23 34 5d  0d 30 48 14 20 4c 44 52  |,[R9,#4].0H. LDR|
000080c0  20 52 34 2c 5b 52 39 2c  23 31 32 5d 0d 30 52 04  | R4,[R9,#12].0R.|
000080d0  0d 30 5c 11 20 41 44 44  20 52 32 2c 52 32 2c 52  |.0\. ADD R2,R2,R|
000080e0  35 0d 30 66 11 20 53 55  42 20 52 36 2c 52 33 2c  |5.0f. SUB R6,R3,|
000080f0  52 36 0d 30 70 11 20 53  55 42 20 52 37 2c 52 34  |R6.0p. SUB R7,R4|
00008100  2c 52 37 0d 30 7a 15 20  4d 4f 56 20 52 36 2c 52  |,R7.0z. MOV R6,R|
00008110  36 2c 41 53 52 20 23 38  0d 30 84 15 20 4d 4f 56  |6,ASR #8.0.. MOV|
00008120  20 52 37 2c 52 37 2c 41  53 52 20 23 38 0d 30 8e  | R7,R7,ASR #8.0.|
00008130  04 0d 30 98 11 20 4d 55  4c 20 52 33 2c 52 36 2c  |..0.. MUL R3,R6,|
00008140  52 36 0d 30 a2 14 20 4d  4c 41 20 52 34 2c 52 37  |R6.0.. MLA R4,R7|
00008150  2c 52 37 2c 52 33 0d 30  ac 04 0d 30 b6 0e 20 43  |,R7,R3.0...0.. C|
00008160  4d 50 20 52 32 2c 52 34  0d 30 c0 10 20 4d 4f 56  |MP R2,R4.0.. MOV|
00008170  47 54 20 52 31 2c 52 38  0d 30 ca 0c 20 42 47 54  |GT R1,R8.0.. BGT|
00008180  20 68 69 74 0d 30 d4 0a  20 2e 73 65 6c 66 0d 30  | hit.0.. .self.0|
00008190  de 17 20 42 20 6c 6f 6f  70 5f 66 69 6e 64 5f 6f  |.. B loop_find_o|
000081a0  62 6a 65 63 74 0d 30 e8  0a 20 2e 6d 69 73 73 0d  |bject.0.. .miss.|
000081b0  30 f2 0e 20 4d 4f 56 20  52 31 2c 23 30 0d 30 fc  |0.. MOV R1,#0.0.|
000081c0  09 20 2e 68 69 74 0d 31  06 1e 20 4c 44 4d 46 44  |. .hit.1.. LDMFD|
000081d0  20 52 31 33 21 2c 7b 52  30 2c 52 32 2d 52 31 31  | R13!,{R0,R2-R11|
000081e0  2c 50 43 7d 0d 31 10 04  0d 31 1a 4d 20 3b 2a 2a  |,PC}.1...1.M ;**|
000081f0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00008200  2a 2a 2a 2a 2a 2a 2a 2a  20 70 6c 61 63 65 73 20  |******** places |
00008210  65 78 70 6c 6f 73 69 6f  6e 20 69 6e 20 62 69 6e  |explosion in bin|
00008220  20 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  | ***************|
00008230  2a 2a 2a 2a 2a 0d 31 24  04 0d 31 2e 0b 20 2e 65  |*****.1$..1.. .e|
00008240  78 70 6c 6f 0d 31 38 1c  20 53 54 4d 46 44 20 52  |xplo.18. STMFD R|
00008250  31 33 21 2c 7b 52 30 2d  52 31 31 2c 52 31 34 7d  |13!,{R0-R11,R14}|
00008260  0d 31 42 13 20 4c 44 52  20 52 31 2c 5b 52 39 2c  |.1B. LDR R1,[R9,|
00008270  23 34 5d 0d 31 4c 13 20  4c 44 52 20 52 32 2c 5b  |#4].1L. LDR R2,[|
00008280  52 39 2c 23 38 5d 0d 31  56 14 20 4c 44 52 20 52  |R9,#8].1V. LDR R|
00008290  33 2c 5b 52 39 2c 23 31  32 5d 0d 31 60 11 20 53  |3,[R9,#12].1`. S|
000082a0  55 42 20 52 39 2c 52 38  2c 23 33 0d 31 6a 04 0d  |UB R9,R8,#3.1j..|
000082b0  31 74 13 20 2e 61 6e 6f  74 68 65 72 5f 70 61 6e  |1t. .another_pan|
000082c0  65 6c 0d 31 7e 17 20 53  54 4d 46 44 20 52 31 33  |el.1~. STMFD R13|
000082d0  21 2c 7b 52 31 2d 52 33  7d 0d 31 88 12 20 4c 44  |!,{R1-R3}.1.. LD|
000082e0  52 20 52 31 31 2c 5b 52  31 32 5d 0d 31 92 0f 20  |R R11,[R12].1.. |
000082f0  4d 4f 56 20 52 31 30 2c  23 30 0d 31 9c 15 20 2e  |MOV R10,#0.1.. .|
00008300  6c 6f 6f 70 5f 66 69 6e  64 5f 66 72 65 65 33 0d  |loop_find_free3.|
00008310  31 a6 13 20 41 44 44 20  52 31 30 2c 52 31 30 2c  |1.. ADD R10,R10,|
00008320  23 31 0d 31 b0 48 20 4c  44 52 20 52 30 2c 5b 52  |#1.1.H LDR R0,[R|
00008330  31 31 2c 52 31 30 2c 41  53 4c 20 23 6f 62 6a 65  |11,R10,ASL #obje|
00008340  63 74 5f 6c 65 6e 67 74  68 6c 6f 67 25 5d 3b 52  |ct_lengthlog%];R|
00008350  30 20 43 4f 4e 54 41 49  4e 53 20 4f 42 4a 45 43  |0 CONTAINS OBJEC|
00008360  54 20 52 45 46 20 43 4f  44 45 0d 31 ba 28 20 43  |T REF CODE.1.( C|
00008370  4d 50 20 52 31 30 2c 23  6d 61 78 5f 6f 62 6a 65  |MP R10,#max_obje|
00008380  63 74 73 25 3a 42 47 45  20 62 69 6e 5f 66 75 6c  |cts%:BGE bin_ful|
00008390  6c 33 0d 31 c4 43 20 43  4d 50 20 52 30 2c 23 30  |l3.1.C CMP R0,#0|
000083a0  3a 42 4e 45 20 6c 6f 6f  70 5f 66 69 6e 64 5f 66  |:BNE loop_find_f|
000083b0  72 65 65 33 20 20 20 20  20 20 20 20 20 20 3b 43  |ree3          ;C|
000083c0  48 45 43 4b 20 e7 20 4f  42 4a 45 43 54 20 49 53  |HECK . OBJECT IS|
000083d0  20 44 45 41 44 0d 31 ce  48 20 41 44 44 20 52 31  | DEAD.1.H ADD R1|
000083e0  31 2c 52 31 31 2c 52 31  30 2c 41 53 4c 20 23 6f  |1,R11,R10,ASL #o|
000083f0  62 6a 65 63 74 5f 6c 65  6e 67 74 68 6c 6f 67 25  |bject_lengthlog%|
00008400  20 20 3b 52 39 20 c8 92  53 20 b8 20 42 45 47 49  |  ;R9 ..S . BEGI|
00008410  4e 49 4e 47 20 ca 20 4f  42 4a 45 43 54 0d 31 d8  |NING . OBJECT.1.|
00008420  04 0d 31 e2 15 20 42 4c  20 72 61 6e 64 6f 6d 5f  |..1.. BL random_|
00008430  6e 75 6d 62 65 72 0d 31  ec 36 20 43 4d 50 20 52  |number.1.6 CMP R|
00008440  30 2c 23 32 30 34 38 3a  4d 4f 56 4c 45 20 52 30  |0,#2048:MOVLE R0|
00008450  2c 23 36 3a 4d 4f 56 47  54 20 52 30 2c 23 34 3a  |,#6:MOVGT R0,#4:|
00008460  53 54 52 20 52 30 2c 5b  52 31 31 5d 0d 31 f6 14  |STR R0,[R11].1..|
00008470  20 53 54 52 20 52 31 2c  5b 52 31 31 2c 23 34 5d  | STR R1,[R11,#4]|
00008480  0d 32 00 14 20 53 54 52  20 52 32 2c 5b 52 31 31  |.2.. STR R2,[R11|
00008490  2c 23 38 5d 0d 32 0a 15  20 53 54 52 20 52 33 2c  |,#8].2.. STR R3,|
000084a0  5b 52 31 31 2c 23 31 32  5d 0d 32 14 26 20 42 4c  |[R11,#12].2.& BL|
000084b0  20 72 61 6e 64 6f 6d 5f  6e 75 6d 62 65 72 3a 53  | random_number:S|
000084c0  54 52 20 52 30 2c 5b 52  31 31 2c 23 31 36 5d 0d  |TR R0,[R11,#16].|
000084d0  32 1e 26 20 42 4c 20 72  61 6e 64 6f 6d 5f 6e 75  |2.& BL random_nu|
000084e0  6d 62 65 72 3a 53 54 52  20 52 30 2c 5b 52 31 31  |mber:STR R0,[R11|
000084f0  2c 23 32 30 5d 0d 32 28  26 20 42 4c 20 72 61 6e  |,#20].2(& BL ran|
00008500  64 6f 6d 5f 6e 75 6d 62  65 72 3a 53 54 52 20 52  |dom_number:STR R|
00008510  30 2c 5b 52 31 31 2c 23  32 34 5d 0d 32 32 47 20  |0,[R11,#24].22G |
00008520  42 4c 20 72 61 6e 64 6f  6d 5f 6e 75 6d 62 65 72  |BL random_number|
00008530  3a 53 55 42 20 52 30 2c  52 30 2c 23 32 5e 31 31  |:SUB R0,R0,#2^11|
00008540  3a 4d 4f 56 20 52 30 2c  52 30 2c 41 53 4c 20 23  |:MOV R0,R0,ASL #|
00008550  31 3a 53 54 52 20 52 30  2c 5b 52 31 31 2c 23 35  |1:STR R0,[R11,#5|
00008560  32 5d 0d 32 3c 26 20 42  4c 20 72 61 6e 64 6f 6d  |2].2<& BL random|
00008570  5f 6e 75 6d 62 65 72 3a  53 54 52 20 52 30 2c 5b  |_number:STR R0,[|
00008580  52 31 31 2c 23 35 36 5d  0d 32 46 47 20 42 4c 20  |R11,#56].2FG BL |
00008590  72 61 6e 64 6f 6d 5f 6e  75 6d 62 65 72 3a 53 55  |random_number:SU|
000085a0  42 20 52 30 2c 52 30 2c  23 32 5e 31 31 3a 4d 4f  |B R0,R0,#2^11:MO|
000085b0  56 20 52 30 2c 52 30 2c  41 53 4c 20 23 31 3a 53  |V R0,R0,ASL #1:S|
000085c0  54 52 20 52 30 2c 5b 52  31 31 2c 23 36 30 5d 0d  |TR R0,[R11,#60].|
000085d0  32 50 45 20 42 4c 20 72  61 6e 64 6f 6d 5f 6e 75  |2PE BL random_nu|
000085e0  6d 62 65 72 3a 4d 4f 56  20 52 30 2c 52 30 2c 41  |mber:MOV R0,R0,A|
000085f0  53 52 20 23 37 3a 41 44  44 20 52 30 2c 52 30 2c  |SR #7:ADD R0,R0,|
00008600  23 33 38 3a 53 54 52 20  52 30 2c 5b 52 31 31 2c  |#38:STR R0,[R11,|
00008610  23 36 34 5d 0d 32 5a 37  20 42 4c 20 72 61 6e 64  |#64].2Z7 BL rand|
00008620  6f 6d 5f 6e 75 6d 62 65  72 3a 4d 4f 56 20 52 30  |om_number:MOV R0|
00008630  2c 52 30 2c 41 53 52 20  23 34 3a 53 54 52 20 52  |,R0,ASR #4:STR R|
00008640  30 2c 5b 52 31 31 2c 23  36 38 5d 0d 32 64 37 20  |0,[R11,#68].2d7 |
00008650  42 4c 20 72 61 6e 64 6f  6d 5f 6e 75 6d 62 65 72  |BL random_number|
00008660  3a 4d 4f 56 20 52 30 2c  52 30 2c 41 53 52 20 23  |:MOV R0,R0,ASR #|
00008670  34 3a 53 54 52 20 52 30  2c 5b 52 31 31 2c 23 37  |4:STR R0,[R11,#7|
00008680  32 5d 0d 32 6e 37 20 42  4c 20 72 61 6e 64 6f 6d  |2].2n7 BL random|
00008690  5f 6e 75 6d 62 65 72 3a  4d 4f 56 20 52 30 2c 52  |_number:MOV R0,R|
000086a0  30 2c 41 53 52 20 23 34  3a 53 54 52 20 52 30 2c  |0,ASR #4:STR R0,|
000086b0  5b 52 31 31 2c 23 37 36  5d 0d 32 78 0f 20 2e 62  |[R11,#76].2x. .b|
000086c0  69 6e 5f 66 75 6c 6c 33  0d 32 82 17 20 4c 44 4d  |in_full3.2.. LDM|
000086d0  46 44 20 52 31 33 21 2c  7b 52 31 2d 52 33 7d 0d  |FD R13!,{R1-R3}.|
000086e0  32 8c 11 20 53 55 42 20  52 38 2c 52 38 2c 23 31  |2.. SUB R8,R8,#1|
000086f0  0d 32 96 20 20 43 4d 50  20 52 38 2c 23 30 3a 42  |.2.  CMP R8,#0:B|
00008700  47 54 20 61 6e 6f 74 68  65 72 5f 70 61 6e 65 6c  |GT another_panel|
00008710  0d 32 a0 04 0d 32 aa 2e  20 4c 44 52 20 52 30 2c  |.2...2.. LDR R0,|
00008720  5b 52 31 32 2c 23 37 32  5d 3a 43 4d 50 20 52 30  |[R12,#72]:CMP R0|
00008730  2c 23 30 3a 42 4e 45 20  73 6b 69 70 5f 73 6f 75  |,#0:BNE skip_sou|
00008740  6e 64 0d 32 b4 1a 20 43  4d 50 20 52 39 2c 23 33  |nd.2.. CMP R9,#3|
00008750  3a 4d 4f 56 4c 54 20 52  39 2c 23 33 0d 32 be 0e  |:MOVLT R9,#3.2..|
00008760  20 4d 4f 56 20 52 30 2c  23 32 0d 32 c8 0e 20 4d  | MOV R0,#2.2.. M|
00008770  56 4e 20 52 31 2c 52 39  0d 32 d2 0f 20 4d 4f 56  |VN R1,R9.2.. MOV|
00008780  20 52 32 2c 23 35 30 0d  32 dc 0e 20 4d 4f 56 20  | R2,#50.2.. MOV |
00008790  52 33 2c 23 30 0d 32 e6  18 20 53 57 49 20 22 53  |R3,#0.2.. SWI "S|
000087a0  6f 75 6e 64 5f 43 6f 6e  74 72 6f 6c 22 0d 32 f0  |ound_Control".2.|
000087b0  10 20 2e 73 6b 69 70 5f  73 6f 75 6e 64 0d 32 fa  |. .skip_sound.2.|
000087c0  1b 20 4c 44 4d 46 44 20  52 31 33 21 2c 7b 52 30  |. LDMFD R13!,{R0|
000087d0  2d 52 31 31 2c 50 43 7d  0d 33 04 04 0d 33 0e 4e  |-R11,PC}.3...3.N|
000087e0  20 3b 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  | ;**************|
000087f0  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 64  |***************d|
00008800  61 74 61 20 73 65 74 20  75 70 2a 2a 2a 2a 2a 2a  |ata set up******|
00008810  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 2a 2a 2a 2a 2a 2a  |****************|
00008820  2a 2a 2a 2a 2a 2a 2a 2a  2a 2a 0d 33 18 04 0d 33  |**********.3...3|
00008830  22 4e 20 2e 6c 6f 61 64  5f 69 6e 66 6f 20 20 20  |"N .load_info   |
00008840  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00008850  20 3b 6c 6f 61 64 20 61  64 64 72 65 73 73 20 6f  | ;load address o|
00008860  66 20 73 74 61 72 74 20  6f 66 20 69 6e 66 6f 20  |f start of info |
00008870  74 61 62 6c 65 20 69 6e  20 72 31 32 0d 33 2c 15  |table in r12.3,.|
00008880  20 53 54 4d 46 44 20 52  31 33 21 2c 7b 52 31 34  | STMFD R13!,{R14|
00008890  7d 0d 33 36 11 20 41 44  52 20 52 31 32 2c 69 6e  |}.36. ADR R12,in|
000088a0  66 6f 0d 33 40 14 20 4c  44 4d 46 44 20 52 31 33  |fo.3@. LDMFD R13|
000088b0  21 2c 7b 50 43 7d 0d 33  4a 0a 20 2e 69 6e 66 6f  |!,{PC}.3J. .info|
000088c0  0d 33 54 06 20 5d 0d 33  5e 3a 20 e3 20 6c 6f 6f  |.3T. ].3^: . loo|
000088d0  70 3d 31 20 b8 20 31 30  30 20 20 20 20 20 20 20  |p=1 . 100       |
000088e0  20 20 20 3a f4 20 6c 65  6e 67 74 68 20 6f 66 20  |   :. length of |
000088f0  69 6e 66 6f 20 74 61 62  6c 65 20 3d 20 31 30 30  |info table = 100|
00008900  0d 33 68 10 20 5b 20 4f  50 54 20 70 61 73 73 25  |.3h. [ OPT pass%|
00008910  0d 33 72 0b 20 45 51 55  44 20 30 0d 33 7c 06 20  |.3r. EQUD 0.3|. |
00008920  5d 0d 33 86 0b 20 ed 20  6c 6f 6f 70 0d 33 90 04  |].3.. . loop.3..|
00008930  0d 33 9a 10 20 5b 20 4f  50 54 20 70 61 73 73 25  |.3.. [ OPT pass%|
00008940  0d 33 a4 04 0d 33 ae 06  20 5d 0d 33 b8 0c 20 ed  |.3...3.. ].3.. .|
00008950  20 70 61 73 73 25 0d 33  c2 06 20 e1 0d 33 cc 04  | pass%.3.. ..3..|
00008960  0d 33 d6 15 20 dd f2 5f  6f 62 6a 65 63 74 5f 73  |.3.. .._object_s|
00008970  65 74 5f 75 70 0d 33 e0  1e 20 e3 20 6c 6f 6f 70  |et_up.3.. . loop|
00008980  3d 30 20 b8 20 6d 61 78  5f 6f 62 6a 65 63 74 73  |=0 . max_objects|
00008990  25 2d 31 0d 33 ea 2b 20  21 28 6f 62 6a 65 63 74  |%-1.3.+ !(object|
000089a0  5f 62 75 66 66 65 72 2b  6c 6f 6f 70 2a 6f 62 6a  |_buffer+loop*obj|
000089b0  65 63 74 5f 6c 65 6e 67  74 68 25 29 3d 30 0d 33  |ect_length%)=0.3|
000089c0  f4 0b 20 ed 20 6c 6f 6f  70 0d 33 fe 46 20 21 28  |.. . loop.3.F !(|
000089d0  6f 62 6a 65 63 74 5f 62  75 66 66 65 72 2b 30 29  |object_buffer+0)|
000089e0  3d 33 20 20 20 20 20 20  20 3a f4 20 53 45 54 53  |=3       :. SETS|
000089f0  20 55 50 20 59 4f 55 52  20 54 41 4e 4b 20 41 53  | UP YOUR TANK AS|
00008a00  20 54 48 45 20 46 49 52  53 54 20 54 41 4e 4b 0d  | THE FIRST TANK.|
00008a10  34 08 19 20 21 28 6f 62  6a 65 63 74 5f 62 75 66  |4.. !(object_buf|
00008a20  66 65 72 2b 34 29 3d 30  0d 34 12 1d 20 21 28 6f  |fer+4)=0.4.. !(o|
00008a30  62 6a 65 63 74 5f 62 75  66 66 65 72 2b 38 29 3d  |bject_buffer+8)=|
00008a40  32 30 2a 53 43 0d 34 1c  1a 20 21 28 6f 62 6a 65  |20*SC.4.. !(obje|
00008a50  63 74 5f 62 75 66 66 65  72 2b 31 32 29 3d 30 0d  |ct_buffer+12)=0.|
00008a60  34 26 1a 20 21 28 6f 62  6a 65 63 74 5f 62 75 66  |4&. !(object_buf|
00008a70  66 65 72 2b 31 36 29 3d  30 0d 34 30 1a 20 21 28  |fer+16)=0.40. !(|
00008a80  6f 62 6a 65 63 74 5f 62  75 66 66 65 72 2b 32 30  |object_buffer+20|
00008a90  29 3d 30 0d 34 3a 1a 20  21 28 6f 62 6a 65 63 74  |)=0.4:. !(object|
00008aa0  5f 62 75 66 66 65 72 2b  32 34 29 3d 30 0d 34 44  |_buffer+24)=0.4D|
00008ab0  1a 20 21 28 6f 62 6a 65  63 74 5f 62 75 66 66 65  |. !(object_buffe|
00008ac0  72 2b 35 32 29 3d 30 0d  34 4e 1a 20 21 28 6f 62  |r+52)=0.4N. !(ob|
00008ad0  6a 65 63 74 5f 62 75 66  66 65 72 2b 35 36 29 3d  |ject_buffer+56)=|
00008ae0  30 0d 34 58 1a 20 21 28  6f 62 6a 65 63 74 5f 62  |0.4X. !(object_b|
00008af0  75 66 66 65 72 2b 36 30  29 3d 30 0d 34 62 1a 20  |uffer+60)=0.4b. |
00008b00  21 28 6f 62 6a 65 63 74  5f 62 75 66 66 65 72 2b  |!(object_buffer+|
00008b10  36 34 29 3d 30 0d 34 6c  3e 20 21 28 6f 62 6a 65  |64)=0.4l> !(obje|
00008b20  63 74 5f 62 75 66 66 65  72 2b 38 34 29 3d 28 32  |ct_buffer+84)=(2|
00008b30  35 2a 46 29 5e 32 20 20  20 20 20 20 20 20 20 3a  |5*F)^2         :|
00008b40  f4 20 68 69 74 20 64 69  73 74 61 6e 63 65 3a 5c  |. hit distance:\|
00008b50  3f 3f 3f 0d 34 76 0a 20  6d 65 6d 3d 31 0d 34 80  |???.4v. mem=1.4.|
00008b60  10 20 e3 20 7a 25 3d 31  20 b8 20 31 34 0d 34 8a  |. . z%=1 . 14.4.|
00008b70  49 20 21 28 6f 62 6a 65  63 74 5f 62 75 66 66 65  |I !(object_buffe|
00008b80  72 2b 28 6d 65 6d 2a 6f  62 6a 65 63 74 5f 6c 65  |r+(mem*object_le|
00008b90  6e 67 74 68 25 29 29 3d  28 b3 28 32 29 2d 31 29  |ngth%))=(.(2)-1)|
00008ba0  2a 34 2b 31 20 3a f4 20  4f 42 4a 45 43 54 20 43  |*4+1 :. OBJECT C|
00008bb0  4f 44 20 42 49 54 0d 34  94 44 20 21 28 6f 62 6a  |OD BIT.4.D !(obj|
00008bc0  65 63 74 5f 62 75 66 66  65 72 2b 28 6d 65 6d 2a  |ect_buffer+(mem*|
00008bd0  6f 62 6a 65 63 74 5f 6c  65 6e 67 74 68 25 29 2b  |object_length%)+|
00008be0  34 29 3d 28 b3 28 36 30  30 30 29 2d 33 30 30 30  |4)=(.(6000)-3000|
00008bf0  29 2a 53 43 20 20 3a f4  20 78 0d 34 9e 46 20 21  |)*SC  :. x.4.F !|
00008c00  28 6f 62 6a 65 63 74 5f  62 75 66 66 65 72 2b 28  |(object_buffer+(|
00008c10  6d 65 6d 2a 6f 62 6a 65  63 74 5f 6c 65 6e 67 74  |mem*object_lengt|
00008c20  68 25 29 2b 38 29 3d 30  20 20 20 20 20 20 20 20  |h%)+8)=0        |
00008c30  20 20 20 20 20 20 20 20  20 20 20 20 3a f4 20 79  |            :. y|
00008c40  0d 34 a8 44 20 21 28 6f  62 6a 65 63 74 5f 62 75  |.4.D !(object_bu|
00008c50  66 66 65 72 2b 28 6d 65  6d 2a 6f 62 6a 65 63 74  |ffer+(mem*object|
00008c60  5f 6c 65 6e 67 74 68 25  29 2b 31 32 29 3d 28 b3  |_length%)+12)=(.|
00008c70  28 36 30 30 30 29 2d 33  30 30 30 29 2a 53 43 20  |(6000)-3000)*SC |
00008c80  3a f4 20 7a 0d 34 b2 4c  20 21 28 6f 62 6a 65 63  |:. z.4.L !(objec|
00008c90  74 5f 62 75 66 66 65 72  2b 28 6d 65 6d 2a 6f 62  |t_buffer+(mem*ob|
00008ca0  6a 65 63 74 5f 6c 65 6e  67 74 68 25 29 2b 31 36  |ject_length%)+16|
00008cb0  29 3d 34 30 39 36 2f 32  20 20 20 20 20 20 20 20  |)=4096/2        |
00008cc0  20 20 20 20 20 20 3a f4  20 78 20 61 6e 67 6c 65  |      :. x angle|
00008cd0  0d 34 bc 4a 20 21 28 6f  62 6a 65 63 74 5f 62 75  |.4.J !(object_bu|
00008ce0  66 66 65 72 2b 28 6d 65  6d 2a 6f 62 6a 65 63 74  |ffer+(mem*object|
00008cf0  5f 6c 65 6e 67 74 68 25  29 2b 32 30 29 3d b3 28  |_length%)+20)=.(|
00008d00  34 30 39 36 29 2d 31 20  20 20 20 20 20 20 20 20  |4096)-1         |
00008d10  3a f4 20 79 20 61 6e 67  6c 65 0d 34 c6 4c 20 21  |:. y angle.4.L !|
00008d20  28 6f 62 6a 65 63 74 5f  62 75 66 66 65 72 2b 28  |(object_buffer+(|
00008d30  6d 65 6d 2a 6f 62 6a 65  63 74 5f 6c 65 6e 67 74  |mem*object_lengt|
00008d40  68 25 29 2b 32 34 29 3d  30 20 20 20 20 20 20 20  |h%)+24)=0       |
00008d50  20 20 20 20 20 20 20 20  20 20 20 20 3a f4 20 7a  |            :. z|
00008d60  20 61 6e 67 6c 65 0d 34  d0 4d 20 21 28 6f 62 6a  | angle.4.M !(obj|
00008d70  65 63 74 5f 62 75 66 66  65 72 2b 28 6d 65 6d 2a  |ect_buffer+(mem*|
00008d80  6f 62 6a 65 63 74 5f 6c  65 6e 67 74 68 25 29 2b  |object_length%)+|
00008d90  34 30 29 3d 34 30 39 36  2f 32 20 20 20 20 20 20  |40)=4096/2      |
00008da0  20 20 20 20 20 20 20 3a  f4 20 6f 66 66 20 78 20  |       :. off x |
00008db0  61 6e 67 0d 34 da 4d 20  21 28 6f 62 6a 65 63 74  |ang.4.M !(object|
00008dc0  5f 62 75 66 66 65 72 2b  28 6d 65 6d 2a 6f 62 6a  |_buffer+(mem*obj|
00008dd0  65 63 74 5f 6c 65 6e 67  74 68 25 29 2b 34 34 29  |ect_length%)+44)|
00008de0  3d 30 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |=0              |
00008df0  20 20 20 20 3a f4 20 6f  66 66 20 79 20 61 6e 67  |    :. off y ang|
00008e00  0d 34 e4 4d 20 21 28 6f  62 6a 65 63 74 5f 62 75  |.4.M !(object_bu|
00008e10  66 66 65 72 2b 28 6d 65  6d 2a 6f 62 6a 65 63 74  |ffer+(mem*object|
00008e20  5f 6c 65 6e 67 74 68 25  29 2b 34 38 29 3d 30 20  |_length%)+48)=0 |
00008e30  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00008e40  20 3a f4 20 6f 66 66 20  7a 20 61 6e 67 0d 34 ee  | :. off z ang.4.|
00008e50  4c 20 21 28 6f 62 6a 65  63 74 5f 62 75 66 66 65  |L !(object_buffe|
00008e60  72 2b 28 6d 65 6d 2a 6f  62 6a 65 63 74 5f 6c 65  |r+(mem*object_le|
00008e70  6e 67 74 68 25 29 2b 35  32 29 3d 30 20 20 20 20  |ngth%)+52)=0    |
00008e80  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 3a  |               :|
00008e90  f4 20 6d 6f 76 20 76 65  63 0d 34 f8 4a 20 21 28  |. mov vec.4.J !(|
00008ea0  6f 62 6a 65 63 74 5f 62  75 66 66 65 72 2b 28 6d  |object_buffer+(m|
00008eb0  65 6d 2a 6f 62 6a 65 63  74 5f 6c 65 6e 67 74 68  |em*object_length|
00008ec0  25 29 2b 35 36 29 3d 30  20 20 20 20 20 20 20 20  |%)+56)=0        |
00008ed0  20 20 20 20 20 20 20 20  20 20 20 3a f4 20 78 2c  |           :. x,|
00008ee0  79 2c 7a 0d 35 02 2f 20  21 28 6f 62 6a 65 63 74  |y,z.5./ !(object|
00008ef0  5f 62 75 66 66 65 72 2b  28 6d 65 6d 2a 6f 62 6a  |_buffer+(mem*obj|
00008f00  65 63 74 5f 6c 65 6e 67  74 68 25 29 2b 36 30 29  |ect_length%)+60)|
00008f10  3d 30 0d 35 0c 4c 20 21  28 6f 62 6a 65 63 74 5f  |=0.5.L !(object_|
00008f20  62 75 66 66 65 72 2b 28  6d 65 6d 2a 6f 62 6a 65  |buffer+(mem*obje|
00008f30  63 74 5f 6c 65 6e 67 74  68 25 29 2b 36 34 29 3d  |ct_length%)+64)=|
00008f40  30 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |0               |
00008f50  3a f4 20 66 72 61 6d 65  20 63 6f 75 6e 74 0d 35  |:. frame count.5|
00008f60  16 4b 20 21 28 6f 62 6a  65 63 74 5f 62 75 66 66  |.K !(object_buff|
00008f70  65 72 2b 28 6d 65 6d 2a  6f 62 6a 65 63 74 5f 6c  |er+(mem*object_l|
00008f80  65 6e 67 74 68 25 29 2b  36 38 29 3d 30 20 20 20  |ength%)+68)=0   |
00008f90  20 20 20 20 20 20 20 20  20 20 20 20 3a f4 20 73  |            :. s|
00008fa0  70 69 6e 20 73 70 65 65  64 0d 35 20 46 20 21 28  |pin speed.5 F !(|
00008fb0  6f 62 6a 65 63 74 5f 62  75 66 66 65 72 2b 28 6d  |object_buffer+(m|
00008fc0  65 6d 2a 6f 62 6a 65 63  74 5f 6c 65 6e 67 74 68  |em*object_length|
00008fd0  25 29 2b 37 32 29 3d 30  20 20 20 20 20 20 20 20  |%)+72)=0        |
00008fe0  20 20 20 20 20 20 20 3a  f4 20 78 2c 79 2c 7a 0d  |       :. x,y,z.|
00008ff0  35 2a 2f 20 21 28 6f 62  6a 65 63 74 5f 62 75 66  |5*/ !(object_buf|
00009000  66 65 72 2b 28 6d 65 6d  2a 6f 62 6a 65 63 74 5f  |fer+(mem*object_|
00009010  6c 65 6e 67 74 68 25 29  2b 37 36 29 3d 30 0d 35  |length%)+76)=0.5|
00009020  34 4b 20 21 28 6f 62 6a  65 63 74 5f 62 75 66 66  |4K !(object_buff|
00009030  65 72 2b 28 6d 65 6d 2a  6f 62 6a 65 63 74 5f 6c  |er+(mem*object_l|
00009040  65 6e 67 74 68 25 29 2b  38 30 29 3d 30 20 20 20  |ength%)+80)=0   |
00009050  20 20 20 20 20 20 20 20  20 20 20 20 3a f4 20 73  |            :. s|
00009060  74 61 74 75 73 20 62 69  74 0d 35 3e 4a 20 21 28  |tatus bit.5>J !(|
00009070  6f 62 6a 65 63 74 5f 62  75 66 66 65 72 2b 28 6d  |object_buffer+(m|
00009080  65 6d 2a 6f 62 6a 65 63  74 5f 6c 65 6e 67 74 68  |em*object_length|
00009090  25 29 2b 38 34 29 3d 28  31 33 2a 46 29 5e 32 20  |%)+84)=(13*F)^2 |
000090a0  20 20 20 20 3a f4 20 68  69 74 20 64 69 73 74 61  |    :. hit dista|
000090b0  6e 63 65 0d 35 48 0b 20  6d 65 6d 2b 3d 31 0d 35  |nce.5H. mem+=1.5|
000090c0  52 09 20 ed 20 7a 25 0d  35 5c 04 0d 35 66 14 20  |R. . z%.5\..5f. |
000090d0  e3 20 7a 25 3d 31 20 b8  20 6c 65 76 65 6c 25 0d  |. z%=1 . level%.|
000090e0  35 70 42 20 21 28 6f 62  6a 65 63 74 5f 62 75 66  |5pB !(object_buf|
000090f0  66 65 72 2b 28 6d 65 6d  2a 6f 62 6a 65 63 74 5f  |fer+(mem*object_|
00009100  6c 65 6e 67 74 68 25 29  29 3d 33 20 20 20 20 20  |length%))=3     |
00009110  3a f4 20 4f 42 4a 45 43  54 20 43 4f 44 20 42 49  |:. OBJECT COD BI|
00009120  54 0d 35 7a 44 20 21 28  6f 62 6a 65 63 74 5f 62  |T.5zD !(object_b|
00009130  75 66 66 65 72 2b 28 6d  65 6d 2a 6f 62 6a 65 63  |uffer+(mem*objec|
00009140  74 5f 6c 65 6e 67 74 68  25 29 2b 34 29 3d 28 b3  |t_length%)+4)=(.|
00009150  28 38 30 30 30 29 2d 34  30 30 30 29 2a 53 43 20  |(8000)-4000)*SC |
00009160  20 3a f4 20 78 0d 35 84  46 20 21 28 6f 62 6a 65  | :. x.5.F !(obje|
00009170  63 74 5f 62 75 66 66 65  72 2b 28 6d 65 6d 2a 6f  |ct_buffer+(mem*o|
00009180  62 6a 65 63 74 5f 6c 65  6e 67 74 68 25 29 2b 38  |bject_length%)+8|
00009190  29 3d 30 20 20 20 20 20  20 20 20 20 20 20 20 20  |)=0             |
000091a0  20 20 20 20 20 20 20 3a  f4 20 79 0d 35 8e 44 20  |       :. y.5.D |
000091b0  21 28 6f 62 6a 65 63 74  5f 62 75 66 66 65 72 2b  |!(object_buffer+|
000091c0  28 6d 65 6d 2a 6f 62 6a  65 63 74 5f 6c 65 6e 67  |(mem*object_leng|
000091d0  74 68 25 29 2b 31 32 29  3d 28 b3 28 38 30 30 30  |th%)+12)=(.(8000|
000091e0  29 2d 34 30 30 30 29 2a  53 43 20 3a f4 20 7a 0d  |)-4000)*SC :. z.|
000091f0  35 98 4c 20 21 28 6f 62  6a 65 63 74 5f 62 75 66  |5.L !(object_buf|
00009200  66 65 72 2b 28 6d 65 6d  2a 6f 62 6a 65 63 74 5f  |fer+(mem*object_|
00009210  6c 65 6e 67 74 68 25 29  2b 31 36 29 3d 34 30 39  |length%)+16)=409|
00009220  36 2f 32 20 20 20 20 20  20 20 20 20 20 20 20 20  |6/2             |
00009230  20 3a f4 20 78 20 61 6e  67 6c 65 0d 35 a2 4b 20  | :. x angle.5.K |
00009240  21 28 6f 62 6a 65 63 74  5f 62 75 66 66 65 72 2b  |!(object_buffer+|
00009250  28 6d 65 6d 2a 6f 62 6a  65 63 74 5f 6c 65 6e 67  |(mem*object_leng|
00009260  74 68 25 29 2b 32 30 29  3d b3 28 34 30 39 36 29  |th%)+20)=.(4096)|
00009270  2d 31 20 20 20 20 20 20  20 20 20 20 3a f4 20 79  |-1          :. y|
00009280  20 61 6e 67 6c 65 0d 35  ac 4c 20 21 28 6f 62 6a  | angle.5.L !(obj|
00009290  65 63 74 5f 62 75 66 66  65 72 2b 28 6d 65 6d 2a  |ect_buffer+(mem*|
000092a0  6f 62 6a 65 63 74 5f 6c  65 6e 67 74 68 25 29 2b  |object_length%)+|
000092b0  32 34 29 3d 30 20 20 20  20 20 20 20 20 20 20 20  |24)=0           |
000092c0  20 20 20 20 20 20 20 20  3a f4 20 7a 20 61 6e 67  |        :. z ang|
000092d0  6c 65 0d 35 b6 4d 20 21  28 6f 62 6a 65 63 74 5f  |le.5.M !(object_|
000092e0  62 75 66 66 65 72 2b 28  6d 65 6d 2a 6f 62 6a 65  |buffer+(mem*obje|
000092f0  63 74 5f 6c 65 6e 67 74  68 25 29 2b 34 30 29 3d  |ct_length%)+40)=|
00009300  34 30 39 36 2f 32 20 20  20 20 20 20 20 20 20 20  |4096/2          |
00009310  20 20 20 3a f4 20 6f 66  66 20 78 20 61 6e 67 0d  |   :. off x ang.|
00009320  35 c0 4d 20 21 28 6f 62  6a 65 63 74 5f 62 75 66  |5.M !(object_buf|
00009330  66 65 72 2b 28 6d 65 6d  2a 6f 62 6a 65 63 74 5f  |fer+(mem*object_|
00009340  6c 65 6e 67 74 68 25 29  2b 34 34 29 3d 30 20 20  |length%)+44)=0  |
00009350  20 20 20 20 20 20 20 20  20 20 20 20 20 20 20 20  |                |
00009360  3a f4 20 6f 66 66 20 79  20 61 6e 67 0d 35 ca 4d  |:. off y ang.5.M|
00009370  20 21 28 6f 62 6a 65 63  74 5f 62 75 66 66 65 72  | !(object_buffer|
00009380  2b 28 6d 65 6d 2a 6f 62  6a 65 63 74 5f 6c 65 6e  |+(mem*object_len|
00009390  67 74 68 25 29 2b 34 38  29 3d 30 20 20 20 20 20  |gth%)+48)=0     |
000093a0  20 20 20 20 20 20 20 20  20 20 20 20 20 3a f4 20  |             :. |
000093b0  6f 66 66 20 7a 20 61 6e  67 0d 35 d4 4c 20 21 28  |off z ang.5.L !(|
000093c0  6f 62 6a 65 63 74 5f 62  75 66 66 65 72 2b 28 6d  |object_buffer+(m|
000093d0  65 6d 2a 6f 62 6a 65 63  74 5f 6c 65 6e 67 74 68  |em*object_length|
000093e0  25 29 2b 35 32 29 3d 30  20 20 20 20 20 20 20 20  |%)+52)=0        |
000093f0  20 20 20 20 20 20 20 20  20 20 20 3a f4 20 6d 6f  |           :. mo|
00009400  76 20 76 65 63 0d 35 de  4a 20 21 28 6f 62 6a 65  |v vec.5.J !(obje|
00009410  63 74 5f 62 75 66 66 65  72 2b 28 6d 65 6d 2a 6f  |ct_buffer+(mem*o|
00009420  62 6a 65 63 74 5f 6c 65  6e 67 74 68 25 29 2b 35  |bject_length%)+5|
00009430  36 29 3d 30 20 20 20 20  20 20 20 20 20 20 20 20  |6)=0            |
00009440  20 20 20 20 20 20 20 3a  f4 20 78 2c 79 2c 7a 0d  |       :. x,y,z.|
00009450  35 e8 2f 20 21 28 6f 62  6a 65 63 74 5f 62 75 66  |5./ !(object_buf|
00009460  66 65 72 2b 28 6d 65 6d  2a 6f 62 6a 65 63 74 5f  |fer+(mem*object_|
00009470  6c 65 6e 67 74 68 25 29  2b 36 30 29 3d 30 0d 35  |length%)+60)=0.5|
00009480  f2 4c 20 21 28 6f 62 6a  65 63 74 5f 62 75 66 66  |.L !(object_buff|
00009490  65 72 2b 28 6d 65 6d 2a  6f 62 6a 65 63 74 5f 6c  |er+(mem*object_l|
000094a0  65 6e 67 74 68 25 29 2b  36 34 29 3d 30 20 20 20  |ength%)+64)=0   |
000094b0  20 20 20 20 20 20 20 20  20 20 20 20 3a f4 20 66  |            :. f|
000094c0  72 61 6d 65 20 63 6f 75  6e 74 0d 35 fc 4b 20 21  |rame count.5.K !|
000094d0  28 6f 62 6a 65 63 74 5f  62 75 66 66 65 72 2b 28  |(object_buffer+(|
000094e0  6d 65 6d 2a 6f 62 6a 65  63 74 5f 6c 65 6e 67 74  |mem*object_lengt|
000094f0  68 25 29 2b 36 38 29 3d  30 20 20 20 20 20 20 20  |h%)+68)=0       |
00009500  20 20 20 20 20 20 20 20  3a f4 20 73 70 69 6e 20  |        :. spin |
00009510  73 70 65 65 64 0d 36 06  46 20 21 28 6f 62 6a 65  |speed.6.F !(obje|
00009520  63 74 5f 62 75 66 66 65  72 2b 28 6d 65 6d 2a 6f  |ct_buffer+(mem*o|
00009530  62 6a 65 63 74 5f 6c 65  6e 67 74 68 25 29 2b 37  |bject_length%)+7|
00009540  32 29 3d 30 20 20 20 20  20 20 20 20 20 20 20 20  |2)=0            |
00009550  20 20 20 3a f4 20 78 2c  79 2c 7a 0d 36 10 2f 20  |   :. x,y,z.6./ |
00009560  21 28 6f 62 6a 65 63 74  5f 62 75 66 66 65 72 2b  |!(object_buffer+|
00009570  28 6d 65 6d 2a 6f 62 6a  65 63 74 5f 6c 65 6e 67  |(mem*object_leng|
00009580  74 68 25 29 2b 37 36 29  3d 30 0d 36 1a 4b 20 21  |th%)+76)=0.6.K !|
00009590  28 6f 62 6a 65 63 74 5f  62 75 66 66 65 72 2b 28  |(object_buffer+(|
000095a0  6d 65 6d 2a 6f 62 6a 65  63 74 5f 6c 65 6e 67 74  |mem*object_lengt|
000095b0  68 25 29 2b 38 30 29 3d  30 20 20 20 20 20 20 20  |h%)+80)=0       |
000095c0  20 20 20 20 20 20 20 20  3a f4 20 73 74 61 74 75  |        :. statu|
000095d0  73 20 62 69 74 0d 36 24  4a 20 21 28 6f 62 6a 65  |s bit.6$J !(obje|
000095e0  63 74 5f 62 75 66 66 65  72 2b 28 6d 65 6d 2a 6f  |ct_buffer+(mem*o|
000095f0  62 6a 65 63 74 5f 6c 65  6e 67 74 68 25 29 2b 38  |bject_length%)+8|
00009600  34 29 3d 28 31 35 2a 46  29 5e 32 20 20 20 20 20  |4)=(15*F)^2     |
00009610  3a f4 20 68 69 74 20 64  69 73 74 61 6e 63 65 0d  |:. hit distance.|
00009620  36 2e 0b 20 6d 65 6d 2b  3d 31 0d 36 38 09 20 ed  |6.. mem+=1.68. .|
00009630  20 7a 25 0d 36 42 06 20  e1 0d 36 4c 04 0d 36 56  | z%.6B. ..6L..6V|
00009640  45 20 dd f2 5f 74 61 62  6c 65 5f 73 65 74 5f 75  |E .._table_set_u|
00009650  70 20 20 20 20 20 20 20  3a f4 20 53 45 54 53 20  |p       :. SETS |
00009660  55 50 20 41 20 44 45 4d  4f 20 4f 42 4a 45 43 54  |UP A DEMO OBJECT|
00009670  20 4c 49 53 54 20 28 32  30 20 4f 42 4a 45 43 54  | LIST (20 OBJECT|
00009680  53 29 0d 36 60 04 0d 36  6a 0a 20 6d 65 6d 3d 30  |S).6`..6j. mem=0|
00009690  0d 36 74 25 20 e3 20 61  6e 67 6c 65 3d 30 20 b8  |.6t% . angle=0 .|
000096a0  20 28 32 2e 35 2a af 29  20 88 20 28 af 2a 32 29  | (2.5*.) . (.*2)|
000096b0  2f 34 30 39 36 0d 36 7e  1d 20 21 28 73 69 6e 2b  |/4096.6~. !(sin+|
000096c0  6d 65 6d 29 3d b5 28 61  6e 67 6c 65 29 2a 32 5e  |mem)=.(angle)*2^|
000096d0  33 30 0d 36 88 0b 20 6d  65 6d 2b 3d 34 0d 36 92  |30.6.. mem+=4.6.|
000096e0  0c 20 ed 20 61 6e 67 6c  65 0d 36 9c 04 0d 36 a6  |. . angle.6...6.|
000096f0  16 20 e3 20 6c 6f 6f 70  3d 31 20 b8 20 34 30 39  |. . loop=1 . 409|
00009700  36 2a 34 0d 36 b0 2e 20  21 28 70 65 72 73 70 65  |6*4.6.. !(perspe|
00009710  63 74 69 76 65 2b 28 6c  6f 6f 70 2a 34 29 29 3d  |ctive+(loop*4))=|
00009720  28 34 30 39 36 2f 28 6c  6f 6f 70 2f 37 30 30 29  |(4096/(loop/700)|
00009730  29 0d 36 ba 0b 20 ed 20  6c 6f 6f 70 0d 36 c4 04  |).6.. . loop.6..|
00009740  0d 36 ce 0e 20 f3 20 6e  75 6d 5f 6f 62 6a 0d 36  |.6.. . num_obj.6|
00009750  d8 17 20 e3 20 6c 6f 6f  70 3d 31 20 b8 20 6e 75  |.. . loop=1 . nu|
00009760  6d 5f 6f 62 6a 0d 36 e2  16 20 6d 65 6d 3d 28 6c  |m_obj.6.. mem=(l|
00009770  6f 6f 70 2d 31 29 2a 31  30 32 34 0d 36 ec 0a 20  |oop-1)*1024.6.. |
00009780  f3 20 6e 75 6d 0d 36 f6  14 20 21 28 63 6f 72 64  |. num.6.. !(cord|
00009790  2b 6d 65 6d 29 3d 6e 75  6d 0d 37 00 0c 20 6d 65  |+mem)=num.7.. me|
000097a0  6d 2b 3d 31 36 0d 37 0a  14 20 e3 20 6c 6f 6f 70  |m+=16.7.. . loop|
000097b0  32 3d 31 20 b8 20 6e 75  6d 0d 37 14 0c 20 f3 20  |2=1 . num.7.. . |
000097c0  58 2c 59 2c 5a 0d 37 1e  14 20 21 28 63 6f 72 64  |X,Y,Z.7.. !(cord|
000097d0  2b 6d 65 6d 29 3d 58 2a  46 0d 37 28 16 20 21 28  |+mem)=X*F.7(. !(|
000097e0  63 6f 72 64 2b 6d 65 6d  2b 34 29 3d 59 2a 46 0d  |cord+mem+4)=Y*F.|
000097f0  37 32 16 20 21 28 63 6f  72 64 2b 6d 65 6d 2b 38  |72. !(cord+mem+8|
00009800  29 3d 5a 2a 46 0d 37 3c  0c 20 6d 65 6d 2b 3d 31  |)=Z*F.7<. mem+=1|
00009810  36 0d 37 46 0c 20 ed 20  6c 6f 6f 70 32 0d 37 50  |6.7F. . loop2.7P|
00009820  0b 20 ed 20 6c 6f 6f 70  0d 37 5a 04 0d 37 64 08  |. . loop.7Z..7d.|
00009830  20 dc 20 37 0d 37 6e 54  20 dc 20 38 2c 20 2d 31  | . 7.7nT . 8, -1|
00009840  30 2c 30 2c 31 30 2c 20  31 30 2c 30 2c 31 30 2c  |0,0,10, 10,0,10,|
00009850  20 31 30 2c 30 2c 2d 31  30 2c 20 2d 31 30 2c 30  | 10,0,-10, -10,0|
00009860  2c 2d 31 30 2c 20 2d 33  2c 33 30 2c 33 2c 20 33  |,-10, -3,30,3, 3|
00009870  2c 33 30 2c 33 2c 20 33  2c 33 30 2c 2d 33 2c 20  |,30,3, 3,30,-3, |
00009880  2d 33 2c 33 30 2c 2d 33  0d 37 78 4c 20 dc 20 38  |-3,30,-3.7xL . 8|
00009890  2c 20 2d 34 2c 2d 34 2c  34 2c 20 34 2c 2d 34 2c  |, -4,-4,4, 4,-4,|
000098a0  34 2c 20 34 2c 2d 34 2c  2d 34 2c 20 2d 34 2c 2d  |4, 4,-4,-4, -4,-|
000098b0  34 2c 2d 34 2c 20 2d 34  2c 34 2c 34 2c 20 34 2c  |4,-4, -4,4,4, 4,|
000098c0  34 2c 34 2c 20 34 2c 34  2c 2d 34 2c 20 2d 34 2c  |4,4, 4,4,-4, -4,|
000098d0  34 2c 2d 34 0d 37 82 9b  20 dc 20 32 34 2c 20 36  |4,-4.7.. . 24, 6|
000098e0  2c 30 2c 31 34 2c 20 36  2c 30 2c 2d 31 34 2c 20  |,0,14, 6,0,-14, |
000098f0  2d 36 2c 30 2c 2d 31 34  2c 20 2d 36 2c 30 2c 31  |-6,0,-14, -6,0,1|
00009900  34 2c 20 38 2c 33 2c 31  37 2c 20 38 2c 33 2c 2d  |4, 8,3,17, 8,3,-|
00009910  31 36 2c 20 2d 38 2c 33  2c 2d 31 36 2c 20 2d 38  |16, -8,3,-16, -8|
00009920  2c 33 2c 31 37 2c 20 34  2c 37 2c 30 2c 20 34 2c  |,3,17, 4,7,0, 4,|
00009930  37 2c 2d 31 31 2c 20 2d  34 2c 37 2c 2d 31 31 2c  |7,-11, -4,7,-11,|
00009940  20 2d 34 2c 37 2c 30 2c  20 33 2c 31 30 2c 2d 32  | -4,7,0, 3,10,-2|
00009950  2c 20 33 2c 31 31 2c 2d  31 30 2c 20 2d 33 2c 31  |, 3,11,-10, -3,1|
00009960  31 2c 2d 31 30 2c 20 2d  33 2c 31 30 2c 2d 32 0d  |1,-10, -3,10,-2.|
00009970  37 8c 4f 20 dc 20 20 20  20 20 31 2c 38 2c 31 35  |7.O .     1,8,15|
00009980  2c 20 31 2c 38 2c 2d 2e  35 2c 20 2d 31 2c 38 2c  |, 1,8,-.5, -1,8,|
00009990  2d 2e 35 2c 20 2d 31 2c  38 2c 31 35 2c 20 31 2c  |-.5, -1,8,15, 1,|
000099a0  39 2c 31 35 2c 20 31 2c  39 2c 2d 31 2c 20 2d 31  |9,15, 1,9,-1, -1|
000099b0  2c 39 2c 2d 31 2c 20 2d  31 2c 39 2c 31 35 0d 37  |,9,-1, -1,9,15.7|
000099c0  96 28 20 dc 20 34 2c 20  33 2c 2d 33 2c 30 2c 20  |.( . 4, 3,-3,0, |
000099d0  33 2c 33 2c 30 2c 20 2d  33 2c 33 2c 30 2c 20 2d  |3,3,0, -3,3,0, -|
000099e0  33 2c 2d 33 2c 30 0d 37  a0 50 20 dc 20 38 2c 20  |3,-3,0.7.P . 8, |
000099f0  2d 39 2c 30 2c 39 2c 20  39 2c 30 2c 39 2c 20 39  |-9,0,9, 9,0,9, 9|
00009a00  2c 30 2c 2d 39 2c 20 2d  39 2c 30 2c 2d 39 2c 20  |,0,-9, -9,0,-9, |
00009a10  2d 39 2c 31 30 30 2c 39  2c 20 39 2c 31 30 30 2c  |-9,100,9, 9,100,|
00009a20  39 2c 20 39 2c 31 30 30  2c 2d 39 2c 20 2d 39 2c  |9, 9,100,-9, -9,|
00009a30  31 30 30 2c 2d 39 0d 37  aa 28 20 dc 20 34 2c 20  |100,-9.7.( . 4, |
00009a40  36 2c 2d 36 2c 30 2c 20  33 2c 33 2c 30 2c 20 2d  |6,-6,0, 3,3,0, -|
00009a50  34 2c 34 2c 30 2c 20 2d  33 2c 2d 33 2c 30 0d 37  |4,4,0, -3,-3,0.7|
00009a60  b4 a2 20 dc 20 31 38 2c  20 30 2c 35 2c 31 33 2c  |.. . 18, 0,5,13,|
00009a70  20 31 31 2c 35 2c 37 2c  20 31 31 2c 35 2c 2d 37  | 11,5,7, 11,5,-7|
00009a80  2c 20 30 2c 35 2c 2d 31  33 2c 20 2d 31 31 2c 35  |, 0,5,-13, -11,5|
00009a90  2c 2d 37 2c 20 2d 31 31  2c 35 2c 37 2c 20 30 2c  |,-7, -11,5,7, 0,|
00009aa0  30 2c 36 2c 20 35 2c 30  2c 33 2c 20 35 2c 30 2c  |0,6, 5,0,3, 5,0,|
00009ab0  2d 33 2c 20 30 2c 30 2c  2d 36 2c 20 2d 35 2c 30  |-3, 0,0,-6, -5,0|
00009ac0  2c 2d 33 2c 20 2d 35 2c  30 2c 33 2c 20 30 2c 31  |,-3, -5,0,3, 0,1|
00009ad0  30 2c 36 2c 20 35 2c 31  30 2c 33 2c 20 35 2c 31  |0,6, 5,10,3, 5,1|
00009ae0  30 2c 2d 33 2c 20 30 2c  31 30 2c 2d 36 2c 20 2d  |0,-3, 0,10,-6, -|
00009af0  35 2c 31 30 2c 2d 33 2c  20 2d 35 2c 31 30 2c 33  |5,10,-3, -5,10,3|
00009b00  0d 37 be 04 0d 37 c8 04  0d 37 d2 17 20 e3 20 6c  |.7...7...7.. . l|
00009b10  6f 6f 70 3d 31 20 b8 20  6e 75 6d 5f 6f 62 6a 0d  |oop=1 . num_obj.|
00009b20  37 dc 16 20 6d 65 6d 3d  28 6c 6f 6f 70 2d 31 29  |7.. mem=(loop-1)|
00009b30  2a 31 30 32 34 0d 37 e6  0a 20 f3 20 6e 75 6d 0d  |*1024.7.. . num.|
00009b40  37 f0 15 20 21 28 66 61  63 65 74 2b 6d 65 6d 29  |7.. !(facet+mem)|
00009b50  3d 6e 75 6d 0d 37 fa 0c  20 6d 65 6d 2b 3d 31 36  |=num.7.. mem+=16|
00009b60  0d 38 04 14 20 e3 20 6c  6f 6f 70 32 3d 31 20 b8  |.8.. . loop2=1 .|
00009b70  20 6e 75 6d 0d 38 0e 12  20 f3 20 50 31 2c 50 32  | num.8.. . P1,P2|
00009b80  2c 50 33 2c 50 34 0d 38  18 16 20 21 28 66 61 63  |,P3,P4.8.. !(fac|
00009b90  65 74 2b 6d 65 6d 29 3d  50 31 2d 31 0d 38 22 18  |et+mem)=P1-1.8".|
00009ba0  20 21 28 66 61 63 65 74  2b 6d 65 6d 2b 34 29 3d  | !(facet+mem+4)=|
00009bb0  50 32 2d 31 0d 38 2c 18  20 21 28 66 61 63 65 74  |P2-1.8,. !(facet|
00009bc0  2b 6d 65 6d 2b 38 29 3d  50 33 2d 31 0d 38 36 19  |+mem+8)=P3-1.86.|
00009bd0  20 21 28 66 61 63 65 74  2b 6d 65 6d 2b 31 32 29  | !(facet+mem+12)|
00009be0  3d 50 34 2d 31 0d 38 40  0c 20 6d 65 6d 2b 3d 31  |=P4-1.8@. mem+=1|
00009bf0  36 0d 38 4a 0c 20 ed 20  6c 6f 6f 70 32 0d 38 54  |6.8J. . loop2.8T|
00009c00  0b 20 ed 20 6c 6f 6f 70  0d 38 5e 04 0d 38 68 3e  |. . loop.8^..8h>|
00009c10  20 dc 20 36 2c 20 31 2c  32 2c 33 2c 34 2c 20 31  | . 6, 1,2,3,4, 1|
00009c20  2c 35 2c 36 2c 32 2c 20  32 2c 36 2c 37 2c 33 2c  |,5,6,2, 2,6,7,3,|
00009c30  20 33 2c 37 2c 38 2c 34  2c 20 34 2c 38 2c 35 2c  | 3,7,8,4, 4,8,5,|
00009c40  31 2c 20 38 2c 37 2c 36  2c 35 0d 38 72 3e 20 dc  |1, 8,7,6,5.8r> .|
00009c50  20 36 2c 20 31 2c 32 2c  33 2c 34 2c 20 31 2c 35  | 6, 1,2,3,4, 1,5|
00009c60  2c 36 2c 32 2c 20 32 2c  36 2c 37 2c 33 2c 20 33  |,6,2, 2,6,7,3, 3|
00009c70  2c 37 2c 38 2c 34 2c 20  34 2c 38 2c 35 2c 31 2c  |,7,8,4, 4,8,5,1,|
00009c80  20 38 2c 37 2c 36 2c 35  0d 38 7c e0 20 dc 20 31  | 8,7,6,5.8|. . 1|
00009c90  39 2c 20 31 2c 32 2c 33  2c 34 2c 20 31 2c 35 2c  |9, 1,2,3,4, 1,5,|
00009ca0  36 2c 32 2c 20 32 2c 36  2c 37 2c 33 2c 20 33 2c  |6,2, 2,6,7,3, 3,|
00009cb0  37 2c 38 2c 34 2c 20 34  2c 38 2c 35 2c 31 2c 20  |7,8,4, 4,8,5,1, |
00009cc0  35 2c 39 2c 31 30 2c 36  2c 20 36 2c 31 30 2c 31  |5,9,10,6, 6,10,1|
00009cd0  31 2c 37 2c 20 37 2c 31  31 2c 31 32 2c 38 2c 20  |1,7, 7,11,12,8, |
00009ce0  38 2c 31 32 2c 39 2c 35  2c 20 39 2c 31 33 2c 31  |8,12,9,5, 9,13,1|
00009cf0  34 2c 31 30 2c 20 31 30  2c 31 34 2c 31 35 2c 31  |4,10, 10,14,15,1|
00009d00  31 2c 20 31 31 2c 31 35  2c 31 36 2c 31 32 2c 20  |1, 11,15,16,12, |
00009d10  31 32 2c 31 36 2c 31 33  2c 39 2c 20 31 33 2c 31  |12,16,13,9, 13,1|
00009d20  36 2c 31 35 2c 31 34 2c  20 31 39 2c 32 33 2c 32  |6,15,14, 19,23,2|
00009d30  34 2c 32 30 2c 20 32 34  2c 32 33 2c 32 32 2c 32  |4,20, 24,23,22,2|
00009d40  31 2c 20 32 31 2c 32 32  2c 31 38 2c 31 37 2c 20  |1, 21,22,18,17, |
00009d50  31 37 2c 31 38 2c 31 39  2c 32 30 2c 20 32 30 2c  |17,18,19,20, 20,|
00009d60  32 34 2c 32 31 2c 31 37  0d 38 86 1a 20 dc 20 32  |24,21,17.8.. . 2|
00009d70  2c 20 31 2c 32 2c 33 2c  34 2c 20 34 2c 33 2c 32  |, 1,2,3,4, 4,3,2|
00009d80  2c 31 0d 38 90 3e 20 dc  20 36 2c 20 31 2c 32 2c  |,1.8.> . 6, 1,2,|
00009d90  33 2c 34 2c 20 31 2c 35  2c 36 2c 32 2c 20 32 2c  |3,4, 1,5,6,2, 2,|
00009da0  36 2c 37 2c 33 2c 20 33  2c 37 2c 38 2c 34 2c 20  |6,7,3, 3,7,8,4, |
00009db0  34 2c 38 2c 35 2c 31 2c  20 38 2c 37 2c 36 2c 35  |4,8,5,1, 8,7,6,5|
00009dc0  0d 38 9a 1a 20 dc 20 32  2c 20 31 2c 32 2c 33 2c  |.8.. . 2, 1,2,3,|
00009dd0  34 2c 20 34 2c 33 2c 32  2c 31 0d 38 a4 b7 20 dc  |4, 4,3,2,1.8.. .|
00009de0  20 31 36 2c 20 37 2c 38  2c 39 2c 31 30 2c 20 31  | 16, 7,8,9,10, 1|
00009df0  30 2c 31 31 2c 31 32 2c  37 2c 20 31 2c 32 2c 38  |0,11,12,7, 1,2,8|
00009e00  2c 37 2c 20 32 2c 33 2c  39 2c 38 2c 20 33 2c 34  |,7, 2,3,9,8, 3,4|
00009e10  2c 31 30 2c 39 2c 20 34  2c 35 2c 31 31 2c 31 30  |,10,9, 4,5,11,10|
00009e20  2c 20 35 2c 36 2c 31 32  2c 31 31 2c 20 36 2c 31  |, 5,6,12,11, 6,1|
00009e30  2c 37 2c 31 32 2c 20 31  2c 31 33 2c 31 34 2c 32  |,7,12, 1,13,14,2|
00009e40  2c 20 32 2c 31 34 2c 31  35 2c 33 2c 20 33 2c 31  |, 2,14,15,3, 3,1|
00009e50  35 2c 31 36 2c 34 2c 20  34 2c 31 36 2c 31 37 2c  |5,16,4, 4,16,17,|
00009e60  35 2c 20 35 2c 31 37 2c  31 38 2c 36 2c 20 36 2c  |5, 5,17,18,6, 6,|
00009e70  31 38 2c 31 33 2c 31 2c  20 31 36 2c 31 35 2c 31  |18,13,1, 16,15,1|
00009e80  34 2c 31 33 2c 20 31 38  2c 31 37 2c 31 36 2c 31  |4,13, 18,17,16,1|
00009e90  33 0d 38 ae 04 0d 38 b8  15 20 e3 20 6c 6f 6f 70  |3.8...8.. . loop|
00009ea0  25 3d 30 20 b8 20 34 30  39 35 0d 38 c2 23 20 21  |%=0 . 4095.8.# !|
00009eb0  28 72 6e 64 5f 61 6e 67  6c 65 2b 6c 6f 6f 70 25  |(rnd_angle+loop%|
00009ec0  2a 34 29 3d b3 28 34 30  39 36 29 2d 31 0d 38 cc  |*4)=.(4096)-1.8.|
00009ed0  0c 20 ed 20 6c 6f 6f 70  25 0d 38 d6 04 0d 38 e0  |. . loop%.8...8.|
00009ee0  17 20 e3 20 6c 6f 6f 70  25 3d 30 20 b8 20 31 30  |. . loop%=0 . 10|
00009ef0  32 34 2d 31 0d 38 ea 23  20 21 28 64 6f 74 73 2b  |24-1.8.# !(dots+|
00009f00  6c 6f 6f 70 25 2a 34 29  3d 28 b3 28 38 30 30 30  |loop%*4)=(.(8000|
00009f10  29 2d 34 30 30 30 29 0d  38 f4 0c 20 ed 20 6c 6f  |)-4000).8.. . lo|
00009f20  6f 70 25 0d 38 fe 04 0d  39 08 06 20 e1 0d 39 12  |op%.8...9.. ..9.|
00009f30  04 0d 39 1c 0d 20 20 dd  f2 5f 53 57 4f 50 0d 39  |..9..  .._SWOP.9|
00009f40  26 2c 20 e7 20 73 63 72  65 65 6e 25 3d 31 20 73  |&, . screen%=1 s|
00009f50  63 72 65 65 6e 25 3d 32  3a e5 8d 44 4e 79 20 8b  |creen%=2:..DNy .|
00009f60  20 73 63 72 65 65 6e 25  3d 31 0d 39 30 0d 20 2a  | screen%=1.90. *|
00009f70  46 58 31 31 32 2c 31 0d  39 3a 0d 20 2a 46 58 31  |FX112,1.9:. *FX1|
00009f80  31 33 2c 32 0d 39 44 07  20 20 e1 0d 39 4e 0d 20  |13,2.9D.  ..9N. |
00009f90  2a 46 58 31 31 32 2c 32  0d 39 58 0d 20 2a 46 58  |*FX112,2.9X. *FX|
00009fa0  31 31 33 2c 31 0d 39 62  07 20 20 e1 0d ff        |113,1.9b.  ...|
00009fae