Home » Archimedes archive » Archimedes World » AW-1992-10.adf » AWOct92 » !AWOct92/Goodies/CavesGame/!Caves/!RunImage
!AWOct92/Goodies/CavesGame/!Caves/!RunImage
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Archimedes World » AW-1992-10.adf » AWOct92 |
Filename: | !AWOct92/Goodies/CavesGame/!Caves/!RunImage |
Read OK: | ✔ |
File size: | A5E9 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM >!RunImage 20: 30REM **************************** 40REM * Caves of Doom * 50REM * By Duncan F. McPherson * 60REM * (c) 6th of December 1991 * 70REM * Version 1.0 * 80REM **************************** 90: 100SYS "OS_GetEnv" TO comm$ 110p=INSTR(comm$,"""",INSTR(comm$,"""")+1) 120comm$=MID$(comm$,p+1) 130WHILE LEFT$(comm$,1)=" " 140comm$=MID$(comm$,2) 150ENDWHILE 160: 170DIM taskid%4:$taskid%="TASK" 180SYS "Wimp_Initialise",200,!taskid%,"Caves" TO version% 190DIM q% &300:!q%=-1:q%!4=-16:q%!8=0:q%!12=68:q%!20=&3002:$(q%+24)="!Caves" 200DIM buffer% &300,block% &400 210SYS "Wimp_CreateIcon",,q% TO icon% 220PROCassemble:PROCloaddata 230ON ERROR PROCerror 240IF comm$<>"" PROCplaygame:comm$="" 250quit%=FALSE:REPEAT 260SYS "Wimp_Poll",0,q% TO A% 270CASE A% OF 280WHEN 2:PROCopenwindow(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28) 290WHEN 6:PROCmousebutton 300WHEN 9:PROCmenusel(!q%) 310WHEN 17,18:PROCmessage 320ENDCASE 330UNTILquit% 340SYS "Wimp_CloseDown" 350END 360: 370DEFPROCmessage 380CASE q%!16 OF 390WHEN 0:quit%=TRUE 400WHEN 3:PROCnewgameload 410WHEN 5:PROCnewgameload 420ENDCASE:ENDPROC 430: 440DEFPROCnewgameload 450IF q%!40<>&049 ENDPROC 460q%!12=q%!8:q%!16=4:SYS "Wimp_SendMessage",17,q%,q%!4 470PROCloadgame(FNfilename(q%+44)) 480PROCplaygame 490ENDPROC 500: 510DEFFNfilename(address%) 520A$="":REPEAT:B$=CHR$(?address%):address%+=1 530IF B$<>CHR$0 AND B$<>CHR$13 A$=A$+B$ 540UNTIL B$=CHR$0 OR B$=CHR$13:=A$ 550: 560DEFPROCplaygame 570oldmode%=MODE:SYS "Wimp_SetMode",15 580IF MODE<>15 ERROR 255,"I need 160K free memory for the game screen!" 590SYS "OS_CheckModeValid",15 TO valid% 600IF valid%=-2 ERROR 255,"I need 160K free memory for the game screen!" 610MODE9:PROCpallete:COLOUR128+7:PROCreadscreen 620PROCstartscreen:SYS "Wimp_SetMode",oldmode%:ENDPROC 630: 640DEFPROCmenusel(option%) 650IF option%=2 quit%=TRUE 660ENDPROC 670: 680DEFPROCopenwindow(handle%,x0%,y0%,x1%,y1%,scx%,scy%,bhandle%) 690IF handle%=-1 THEN ENDPROC 700q%!0=handle%:q%!28=bhandle%:q%!4=x0%:q%!8=y0%:q%!12=x1%:q%!16=y1% 710q%!20=scx%:q%!24=scy%:SYS "Wimp_OpenWindow",,q% 720ENDPROC 730: 740DEFPROCmousebutton 750IF q%!12=-2 AND q%!8=2 PROCdomenu(101,"Info,Game,Quit","Caves") 760IF q%!12=-2 AND q%!8=4 AND filestat$="yes" PROCplaygame 770IF q%!12=-2 AND q%!8=4 AND filestat$="no" PROCsorry 780ENDPROC 790: 800DEFPROCsorry 810block%!0=255:$(block%+4)="Welcome to caves of doom.To play a game double click on a cave file or drag one onto my icon on the iconbar." 820SYS "Wimp_ReportError",block%,17,"Caves of Doom" 830ENDPROC 840: 850DEFPROCerror 860!q%=ERR:$(q%+4)=REPORT$+" (internal error number "+STR$(ERL)+")"+CHR$0 870IF ERR=255 $(q%+4)=REPORT$ 880SYS "Wimp_ReportError",q%,1,"Caves" 890ENDPROC 900: 910DEFPROCdomenu(handle%,menu$,menutitle$) 920menuhandle%=handle%:menuptr%=buffer%:i%=0 930menuptr%!20=40:$menuptr%=menutitle$ 940menuptr%?12=7:menuptr%?13=2:menuptr%?14=7:menuptr%?15=0 950menuptr%!16=96:menuptr%!24=0:menuptr%+=28 960REPEAT:item$=FNpar(","):PROCmenuitem(item$):UNTIL item$="" 970menuptr%!-24=(menuptr%!-24) OR &80 980SYS "Wimp_CreateMenu",,buffer%,q%!0-64,248 990ENDPROC 1000: 1010DEF PROCmenuitem(text$) 1020IF text$="" ENDPROC 1030!menuptr%=0:menuptr%!4=-1:menuptr%!8=&07000021:$(menuptr%+12)=text$ 1040IF text$="Info" menuptr%!4=info% 1050IF text$="Game" menuptr%!4=game% 1060menuptr%+=24:ENDPROC 1070: 1080DEFFNpar(sep$) 1090i1%=i%+1:i%=INSTR(menu$+sep$,sep$,i1%) 1100=MID$(menu$,i1%,i%-i1%) 1110: 1120DEFPROCloaddata 1130filestat$="no":*CHANNELVOICE 1 8 1140SYS "OS_SpriteOp",265,spritearea 1150SYS "OS_SpriteOp",266,spritearea,"<Caves$Dir>.CaveSprs" 1160DIM pass$(5):DIM screen% 16:screen%!0=148:screen%!4=-1 1170DIM infowin% &200,gamewin% &200 1180SYS "Wimp_OpenTemplate",,"<Caves$Dir>.Templates" 1190SYS "Wimp_LoadTemplate",,block%,infowin%,infowin%+&200,-1,"info" 1200SYS "Wimp_CreateWindow",,block% TO info% 1210SYS "Wimp_LoadTemplate",,block%,gamewin%,gamewin%+&200,-1,"game" 1220SYS "Wimp_CreateWindow",,block% TO game% 1230SYS "Wimp_CloseTemplate" 1240IF comm$<>"" PROCloadgame(comm$) 1250ENDPROC 1260: 1270DEFPROCloadgame(filename$) 1280OSCLI("LOAD "+filename$+" "+STR$~loadgamefile) 1290PROCgetpass 1300gamename$=$gamename:gamedesign$=$gamedesigner:gametime$=$gametime 1310q%!0=game%:q%!4=5:SYS "Wimp_GetIconState",,q% 1320$(q%!28)=gamename$:q%!8=0:q%!12=0:SYS "Wimp_SetIconState",,q% 1330q%!0=game%:q%!4=6:SYS "Wimp_GetIconState",,q% 1340$(q%!28)=gamedesign$:q%!8=0:q%!12=0:SYS "Wimp_SetIconState",,q% 1350q%!0=game%:q%!4=11:SYS "Wimp_GetIconState",,q% 1360$(q%!28)=LEFT$(gametime$,15):q%!8=0:q%!12=0:SYS "Wimp_SetIconState",,q% 1370filestat$="yes" 1380ENDPROC 1390: 1400DEFPROCpallete 1410FOR y%=0 TO 95 STEP 6 1420VDU ?(pallete+y%),?(pallete+y%+1),?(pallete+y%+2),?(pallete+y%+3),?(pallete+y%+4),?(pallete+y%+5) 1430NEXT:ENDPROC 1440: 1450DEFPROCreadscreen 1460OSCLI"FX 112,1":OSCLI"FX 113,1" 1470SYS "OS_ReadVduVariables",screen%,screen%+8:screenstart%=screen%!8 1480OSCLI"FX 112,2":OSCLI"FX 113,2" 1490SYS "OS_ReadVduVariables",screen%,screen%+8:screenstart1%=screen%!8 1500OSCLI"FX 112,1":OSCLI"FX 113,1":VDU23;8202;0;0;0; 1510COLOUR135:screenstart!0=screenstart%:screenstart!4=screenstart1% 1520ENDPROC 1530: 1540DEFPROCassemble 1550DIM code% &B000 1560FOR opt%=0 TO 2 STEP 2 1570P%=code%:[OPT opt% 1580.mainlink 1590EQUD 0 1600.mainloop 1610STR R14,mainlink 1620.inloop 1630MOV R0,#0 1640STR R0,didmapscroll 1650MOV R0,#121 ; Osbyte number 121 - Keyboard Scan 1660MOV R1,#79 OR &80 1670SWI "OS_Byte" 1680CMP R1,#&FF 1690BLEQ scrolldown 1700MOV R1,#104 OR &80 1710MOV R0,#121 1720SWI "OS_Byte" 1730CMP R1,#&FF 1740BLEQ scrollup 1750MOV R1,#97 OR &80 1760MOV R0,#121 1770SWI "OS_Byte" 1780CMP R1,#&FF 1790BLEQ scrollright 1800MOV R1,#66 OR &80 1810MOV R0,#121 1820SWI "OS_Byte" 1830CMP R1,#&FF 1840BLEQ scrollleft 1850: 1860BL updaterocks 1870BL screenbank 1880BL plotmap 1890BL plothim 1900BL clearkeys 1910LDR R0,finishedmap 1920CMP R0,#1 1930BEQ endofgame 1940: 1950MOV R1,#96 OR &80 ; Load R1 with 112 OR &80 (96=TAB) 1960MOV R0,#121 ; OSBYTE 121 - keyboard scan 1970SWI "OS_Byte" ; Call OSBYTE 1980LDR R0,dead 1990CMP R1,#&FF 2000MOVEQ R0,#1 2010STR R0,dead 2020LDR R0,dead ; Load the variable dead into R0 2030CMP R0,#1 ; Is the player dead 2040BEQ endofgame 2050B inloop ; Loop back again 2060.endofgame 2070BL screenbank 2080BL plotmap 2090BL plothim 2100LDR R0,dead 2110CMP R0,#1 2120BLEQ deathanimation 2130LDR R14,mainlink 2140MOV PC,R14 2150: 2160.earthcount 2170EQUD 0 2180.goldcount 2190EQUD 0 2200.goldtotal 2210EQUD 0 2220.level 2230EQUD 0 2240.dead 2250EQUD 0 2260.lives 2270EQUD 3 2280.finishedmap 2290EQUD 0 2300.movelink 2310EQUD 0 2320.scrollcounter 2330EQUD 0 2340.xstore 2350EQUD 0 2360.ystore 2370EQUD 0 2380.result 2390EQUD 0 2400.canhemove 2410EQUD 0 2420.newtile 2430EQUD 0 2440: 2450.rockslink 2460EQUD 0 2470.updatemap 2480EQUD 0 2490.endofmap 2500EQUD 27*40 2510: 2520.deathanimation 2530STR R14,rockslink 2540MOV R0,#1 ; Channel 1 2550MOV R1,#15 ; Volume +15 2560RSB R1,R1,#0 ; Make volume negative (-15) 2570MOV R2,#200 ; Pitch 200 2580MOV R3,#4 ; Duration 40 2590SWI "Sound_Control" ; Generate the sound 2600MOV R0,#8 ; Set r0 to 8 (direction 8 = dead) 2610STR R0,direction ; And put 8 into the var direction 2620MOV R0,#0 2630STR R0,frame 2640BL rocksound 2650BL foursyncs 2660BL screenbank 2670BL plotmap 2680BL plothim 2690BL foursyncs 2700BL newframe 2710BL screenbank 2720BL plotmap 2730BL plothim 2740BL screenbank 2750BL foursyncs 2760BL plotmap 2770BL screenbank 2780BL foursyncs 2790BL plotmap 2800LDR R14,rockslink 2810MOV PC,R14 2820: 2830.rocksound 2840MOV R0,#1 ; Channel 1 2850MOV R1,#15 ; Volume +15 2860RSB R1,R1,#0 ; Make volume negative (-15) 2870MOV R2,#200 ; Pitch 200 2880MOV R3,#4 ; Duration 10 2890SWI "Sound_Control" ; Generate the sound 2900MOV PC,R14 2910.countdiamonds 2920LDR R0,mappointer 2930MOV R1,#0 ; Set the number of diamonds to zero 2940MOV R2,#0 ; Set the y counter to zero 2950.ycountloop 2960MOV R3,#0 ; Set the x counter to zero 2970.xcountloop 2980LDRB R4,[R0] ; Load a tile into R4 2990ADD R0,R0,#1 ; Add 1 to the map pointer 3000CMP R4,#32+19 ; Is the tile a diamond ? 3010ADDEQ R1,R1,#1 ; If yes add 1 to the diamond counter 3020ADD R3,R3,#1 ; Add 1 to the x counter 3030CMP R3,#40 ; Is a line scanned yet ? 3040BNE xcountloop 3050ADD R2,R2,#1 ; Add 1 to the y counter 3060CMP R2,#28 ; Has the map been scanned yet ? 3070BNE ycountloop 3080STR R1,goldtotal ; Store the diamond count at goldtotal 3090MOV PC,R14 3100: 3110.newframe 3120LDR R0,frame 3130CMP R0,#1 3140MOVEQ R0,#0 3150MOVNE R0,#1 3160STR R0,frame 3170MOV PC,R14 3180: 3190.updaterocks 3200STR R14,rockslink ; Store the link register in rockslink 3210LDR R5,xmappos:ADD R5,R5,#3 ; Set R5 to point to the mans x pos 3220LDR R6,ymappos:ADD R6,R6,#3 ; Set R6 to point to the mans y pos 3230STR R5,xstore 3240STR R6,ystore 3250MOV R0,#28 3260STR R0,newtile 3270BL changetile 3280LDR R10,mappointer ; R10 points to map data 3290LDR R11,endofmap ; Load R11 with the value of endofmap 3300ADD R10,R10,R11 ; Add the map y pointer to map pointer 3310MOV R9,#27 ; Set the map y counter to 27 3320.yrockloop 3330MOV R8,#0 ; Set the x map counter to 0 3340.xrockloop 3350LDRB R11,[R10] ; Load a tile into R11 3360CMP R11,#3+32 ; Is the tile a rock 3370BLEQ rockfound ; If it is check it 3380SUB R10,R10,#1 ; Subtract 1 from the map pointer 3390ADD R8,R8,#1 ; Add 1 to the x map counter 3400CMP R8,#40 ; Is that the end of the line ? 3410BNE xrockloop ; If not loop back 3420SUB R9,R9,#1 ; Subtract 1 from the y map counter 3430CMN R9,#1 ; Has the y counter reached -1 yet ? 3440BNE yrockloop ; If not loop back 3450MOV R0,#0 3460STR R0,newtile 3470BL changetile 3480LDR R14,rockslink ; Reload the link register 3490MOV PC,R14 3500: 3510.rockfound 3520MOV R0,R10 ; Put the address of the rock in R0 3530ADD R0,R0,#40 ; Get the address 1 tile below the rock 3540LDRB R11,[R0] ; Load the tile from there into R0 3550CMP R11,#32+0 ; Is the tile a blank space ? 3560BNE notablank 3570STRB R11,[R10] ; Store a blank tile over the rock 3580MOV R11,#32+3 ; Load R11 with a rock 3590STRB R11,[R0] ; And place the rock in its new position 3600B checkformanbelow ; Check to see if man was hit by rock 3610.notablank 3620MOV R5,R11 ; Put the value of the tile in R5 3630CMP R11,#32+4 ; Is the tile a left slope ? 3640BEQ leftslope 3650CMP R11,#32+6 ; Is the tile a right slope ? 3660BEQ rightslope 3670CMP R5,#32+19 ; Is the tile a diamond 3680BEQ leftslope 3690CMP R5,#32+3 ; Is the tile a rock 3700BEQ leftslope 3710CMP R5,#32+22 ; Is the tile a power pill 3720BEQ leftslope 3730.returnfromslope 3740CMP R5,#32+22 ; Is the tile a power pill 3750BEQ rightslope 3760CMP R5,#32+3 ; Is the tile a rock 3770BEQ rightslope 3780CMP R5,#32+19 ; Is the tile a diamond 3790BEQ rightslope 3800MOV PC,R14 3810.checkformanbelow 3820ADD R0,R0,#40 ; Get the address 1 tile below again 3830LDRB R11,[R0] ; Load tile from the address 3840LDR R1,dead ; Load R1 with the variable dead 3850CMP R11,#28+32 ; Is the man in that tile ? 3860MOVEQ R1,#1 ; If yes, he is now dead 3870STR R1,dead ; Store the variable dead 3880B rocksound 3890MOV PC,R14 3900: 3910.leftslope 3920MOV R6,R10 3930SUB R6,R6,#1 ; Move the address 1 tile to the left 3940LDRB R11,[R6] ; And get the tile from there 3950CMP R11,#32+0 ; Is it a blank space ? 3960BNE returnfromslope ; If not exit this subroutine immediately 3970ADD R6,R6,#40 3980LDRB R11,[R6] ; And get the tile from there 3990CMP R11,#32+0 ; Is it a blank space ? 4000BNE returnfromslope ; If not exit this subroutine immediately 4010MOV R7,#32+3 ; Load R7 with the value of a rock 4020STRB R7,[R6] ; And put the rock in its new position 4030MOV R7,#32+0 ; Load R7 with the value of a blank space 4040STRB R7,[R10] ; And put the space over the old rock pos 4050ADD R6,R6,#40 ; Get the address 1 tile below again 4060LDRB R11,[R6] ; Load tile from the address 4070LDR R1,dead ; Load R1 with the variable dead 4080CMP R11,#28+32 ; Is the man in that tile ? 4090MOVEQ R1,#1 ; If yes, he is now dead 4100CMP R11,#32+3 ; Is there a rock in that tile ? 4110BEQ checkleftdead ; If yes check to see if man is next to it 4120CMP R11,#32+19 ; Is there a diamond in that tile ? 4130BEQ checkleftdead ; If yes check to see if man is next to it 4140CMP R11,#32+22 ; Is there a power pill in that tile ? 4150BEQ checkleftdead ; If yes check to see if man is next to it 4160CMP R11,#32+4 ; Is there a left slope in that tile ? 4170STR R1,dead ; Store the variable dead 4180B rocksound 4190MOV PC,R14 4200.checkleftdead 4210SUB R6,R6,#1 ; Get address of tile 1 to the left 4220LDRB R11,[R6] ; Load tile from the address 4230CMP R11,#28+32 ; Is the man in that tile ? 4240MOVEQ R1,#1 ; If yes, he is now dead 4250STR R1,dead ; Store the variable dead 4260MOV PC,R14 4270: 4280.rightslope 4290MOV R6,R10 4300ADD R6,R6,#1 ; Move the address 1 tile to the right 4310LDRB R11,[R6] ; And get the tile from there 4320CMP R11,#32+0 ; Is it a blank space ? 4330MOVNE PC,R14 4340ADD R6,R6,#40 4350LDRB R11,[R6] ; And get the tile from there 4360CMP R11,#32+0 ; Is it a blank space ? 4370MOVNE PC,R14 4380MOV R7,#32+3 ; Load R7 with the value of a rock 4390STRB R7,[R6] ; And put the rock in its new position 4400MOV R7,#32+0 ; Load R7 with the value of a blank space 4410STRB R7,[R10] ; And put the space over the old rock pos 4420ADD R6,R6,#40 ; Get the address 1 below the new rock 4430LDR R1,dead ; Load the variable dead 4440LDRB R11,[R6] ; Load the tile into R11 4450CMP R11,#28+32 ; Is the man in that tile ? 4460MOVEQ R1,#1 ; If yes, he is now dead 4470CMP R11,#32+3 ; Is a rock in that tile 4480BEQ checkrightdead 4490CMP R11,#32+22 ; Is a power pill in that tile 4500BEQ checkrightdead 4510CMP R11,#32+6 ; Is a right slope in that tile ? 4520BEQ checkrightdead 4530CMP R11,#32+19 ; Is a diamond in that tile ? 4540BEQ checkrightdead 4550STR R1,dead ; Store the variable dead 4560MOV PC,R14 4570.checkrightdead 4580ADD R6,R6,#1 4590LDRB R11,[R6] 4600CMP R11,#28+32 4610MOVEQ R1,#1 4620STR R1,dead 4630B rocksound 4640MOV PC,R14 4650: 4660.wasthere 4670EQUD 0 4680.doupdatemap 4690EQUD 0 4700.isrockstable 4710STR R14,checklink 4720MOV R10,#0 4730LDR R0,ystore:ADD R0,R0,#1:STR R0,ystore 4740BL checktile 4750LDR R0,result ; Find out whats below the rock 4760CMP R0,#0 ; Is it a blank ? 4770MOVEQ R10,#1 ; If it is the rock is unstable 4780STREQ R10,doupdatemap ; And the map must be updated to show it 4790BEQ endrockstable ; So finish if it is unstable 4800.endrockstable 4810STR R10,result 4820LDR R14,checklink 4830MOV PC,R14 4840: 4850.checktile 4860LDR R3,xstore ; get the x coord of tile to find 4870LDR R4,ystore ; get the y coord of tile to find 4880MOV R2,#40 ; Load R2 with the value 40 4890MUL R4,R2,R4 ; Multiply R4 by 40 4900ADD R2,R3,R4 ; R2 = X map pos + (Y map pos * 40) 4910LDR R3,mappointer 4920ADD R3,R3,R2 ; Set R3 to point to a tile in the map 4930LDRB R2,[R3] ; And load the value of that tile 4940SUB R2,R2,#32 ; Set the letter A of map data to be 0 4950STR R2,result ; Store the tile number in "result" 4960MOV PC,R14 4970: 4980.getgold 4990LDR R0,goldcount 5000ADD R0,R0,#1 5010STR R0,goldcount 5020MOV R0,#0 5030STR R0,newtile 5040LDR R0,goldcount 5050LDR R12,goldtotal 5060CMP R0,R12 5070MOVEQ R0,#1 5080STREQ R0,finishedmap 5090LDR R0,goldcount 5100LDR R1,goldtotal 5110SUB R0,R1,R0 ; Place number of tiles to get in R0 5120ADR R1,numberbuffer ; Load R1 with a buffer 5130MOV R2,#20 ; Set R2 to the buffer size 5140SWI "OS_ConvertInteger4" ; Convert the number 5150MOV R0,#112:MOV R1,#2:SWI "OS_Byte" 5160SWI 256+31 ; Print chr$ 31 (move cursor) 5170MOV R0,#34 5180SWI "OS_WriteC" 5190MOV R0,#9 5200SWI "OS_WriteC" 5210ADR R0,blankbuffer 5220SWI "OS_Write0" 5230SWI 256+31:MOV R0,#34:SWI "OS_WriteC":MOV R0,#9:SWI "OS_WriteC" 5240ADR R0,numberbuffer ; Load R0 with the buffer 5250SWI "OS_Write0" ; Print the string 5260MOV R0,#112:MOV R1,#1:SWI "OS_Byte" 5270SWI 256+31 ; Print chr$ 31 (move cursor) 5280MOV R0,#34 5290SWI "OS_WriteC" 5300MOV R0,#9 5310SWI "OS_WriteC" 5320ADR R0,blankbuffer 5330SWI "OS_Write0" 5340SWI 256+31:MOV R0,#34:SWI "OS_WriteC":MOV R0,#9:SWI "OS_WriteC" 5350ADR R0,numberbuffer ; Load R0 with the buffer 5360SWI "OS_Write0" 5370B changetile 5380: 5390.blankbuffer 5400EQUS " "+CHR$0 5410.numberbuffer 5420EQUS " ":ALIGN 5430.getearth 5440LDR R0,earthcount 5450ADD R0,R0,#1 5460STR R0,earthcount 5470MOV R0,#0 ; Load R0 with zero (0=Blank space) 5480STR R0,newtile ; Set newtile to blank space 5490.changetile 5500LDR R3,xstore ; get the x coord of tile to change 5510LDR R4,ystore ; get the y coord of tile to change 5520MOV R2,#40 ; Load R2 with the value 40 5530MUL R4,R2,R4 ; Multiply R4 by 40 5540ADD R2,R3,R4 ; R2 = X map pos + (Y map pos * 40) 5550LDR R3,mappointer ; Get the pointer to the map data 5560ADD R3,R3,R2 ; Set R3 to point to a tile in the map 5570LDR R4,newtile ; Load R4 with the value of the newtile 5580ADD R4,R4,#32 ; Reset r4 so that tile 0 = 32 5590STRB R4,[R3] ; And save the newtile to the map 5600LDR R0,earthcount 5610ADR R1,numberbuffer ; Load R1 with a buffer 5620MOV R2,#20 ; Set R2 to the buffer size 5630SWI "OS_ConvertInteger4" ; Convert the number 5640MOV R0,#112:MOV R1,#2:SWI "OS_Byte" 5650SWI 256+31 ; Print chr$ 31 (move cursor) 5660MOV R0,#34 5670SWI "OS_WriteC" 5680MOV R0,#11 5690SWI "OS_WriteC" 5700ADR R0,numberbuffer ; Load R0 with the buffer 5710SWI "OS_Write0" ; Print the string 5720MOV R0,#112:MOV R1,#1:SWI "OS_Byte" 5730SWI 256+31 ; Print chr$ 31 (move cursor) 5740MOV R0,#34 5750SWI "OS_WriteC" 5760MOV R0,#11 5770SWI "OS_WriteC" 5780ADR R0,numberbuffer ; Load R0 with the buffer 5790SWI "OS_Write0" ; Print the string 5800MOV PC,R14 5810: 5820.canmove 5830LDR R0,result ; Load in the type of tile 5840MOV R1,#0 5850CMP R0,#0 ; Is the tile blank ? 5860MOVEQ R1,#1 ; If it is, set R1 to yes he can move 5870CMP R0,#3 ; Is the tile a rock ? 5880MOVEQ R1,#4 ; If it is, set R1 to indicate that 5890CMP R0,#20 ; Is the tile earth 5900MOVEQ R1,#5 ; If it is indicate that 5910CMP R0,#19 ; Is the tile gold 5920MOVEQ R1,#3 ; If it is indicate that 5930CMP R0,#22 ; Is the tile a Power Pill 5940MOVEQ R1,#5 ; <<< TEMOORARY NUMBER FOR POWER PILL >>> 5950CMP R0,#21 ; Is the tile poision ? 5960MOVEQ R1,#2 ; If it is indicate that 5970MOVEQ R2,#1 ; Load r2 with 1 (1=dead) 5980STREQ R2,dead ; And set the dead flag to TRUE (1=Dead) 5990STR R1,canhemove ; Store R1 to "canhemove" 6000MOV PC,R14 6010: 6020.checklink 6030EQUD 0 6040: 6050.checkrockleft 6060STR R14,checklink ; Store the link regsiter 6070LDR R0,xstore:ADD R0,R0,#1:STR R0,xstore 6080BL checktile ; Find out what is in the tile next to the rock 6090LDR R0,result ; Get the result of the check 6100CMP R0,#0 ; Is it a blank space ? 6110BEQ moverockleft ; If it is move the rock along into it 6120MOV R0,#0 ; Load R0 with the value 0 (0=No he cant move) 6130STR R0,canhemove ; And set the canhemove word to zero 6140LDR R14,checklink ; Reload the link register 6150MOV PC,R14 ; And exit the routine, the man cannot move 6160.moverockleft 6170MOV R0,#3 ; Set R0 to the value 3 (3=Rock) 6180STR R0,newtile ; And store the value in newtile 6190BL changetile ; Then change the tile into a rock 6200MOV R0,#0 ; Set R0 to the value 0 (0=Blank space) 6210STR R0,newtile ; And store the value in newtile 6220LDR R0,xstore:SUB R0,R0,#1:STR R0,xstore 6230BL changetile ; Then blank over the old rock with the space 6240MOV R0,#1 ; Load R0 with the value 1 (1=Yes he can move) 6250STR R0,canhemove ; And set the canhemove word to zero 6260LDR R14,checklink ; Reload the link register 6270MOV PC,R14 ; And exit the routine, the man can move 6280: 6290.checkrockright 6300STR R14,checklink ; Store the link regsiter 6310LDR R0,xstore:SUB R0,R0,#1:STR R0,xstore 6320BL checktile ; Find out what is in the tile next to the rock 6330LDR R0,result ; Get the result of the check 6340CMP R0,#0 ; Is it a blank space ? 6350BEQ moverockright ; If it is move the rock along into it 6360MOV R0,#0 ; Load R0 with the value 0 (0=No he cant move) 6370STR R0,canhemove ; And set the canhemove word to zero 6380LDR R14,checklink ; Reload the link register 6390MOV PC,R14 ; And exit the routine, the man cannot move 6400.moverockright 6410MOV R0,#3 ; Set R0 to the value 3 (3=Rock) 6420STR R0,newtile ; And store the value in newtile 6430BL changetile ; Then change the tile into a rock 6440MOV R0,#0 ; Set R0 to the value 0 (0=Blank space) 6450STR R0,newtile ; And store the value in newtile 6460LDR R0,xstore:ADD R0,R0,#1:STR R0,xstore 6470BL changetile ; Then blank over the old rock with the space 6480MOV R0,#1 ; Load R0 with the value 1 (1=Yes he can move) 6490STR R0,canhemove ; And set the canhemove word to one 6500LDR R14,checklink ; Reload the link register 6510MOV PC,R14 ; And exit the routine, the man can move 6520: 6530.screenbank 6540MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync 6550LDR R9,banknum 6560CMP R9,#0 ; Was bank 0 written to last 6570MOVEQ R9,#4 ; If yes write to bank 4 next 6580MOVNE R9,#0 ; If not write to bank 0 next 6590STR R9,banknum 6600MOV R0,#113 ; Set R0 to the value 113 6610LDR R9,banknum 6620CMP R9,#4 6630MOVEQ R1,#1 6640MOVNE R1,#2 6650SWI "OS_Byte" 6660MOV PC,R14 6670: 6680.foursyncs 6690MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync 6700MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync 6710MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync 6720MOV R0,#19:SWI "OS_Byte" 6730MOV R0,#19:SWI "OS_Byte" 6740MOV R0,#19:SWI "OS_Byte" 6750MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync 6760MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync 6770MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync 6780MOV PC,R14 6790: 6800.clearkeys 6810MOV R0,#15 6820MOV R1,#1 6830SWI "OS_Byte" 6840MOV PC,R14 6850: 6860.didmapscroll 6870EQUD0 6880.scrollleft 6890STR R14,movelink 6900MOV R0,#0 6910STR R0,direction 6920MOVR0,#1:STRR0,didmapscroll 6930LDR R0,xmappos:ADD R0,R0,#4:STR R0,xstore 6940LDR R0,ymappos:ADD R0,R0,#3:STR R0,ystore 6950BL checktile ; What type is the destination tile 6960BL canmove ; Can he walk on it 6970LDR R0,canhemove ; Better find out 6980CMP R0,#4 ; Is there a rock there 6990BLEQ checkrockleft ; If so, find out if it is movable 7000CMP R0,#5 ; Is there earth there 7010BLEQ getearth 7020CMP R0,#3 7030BLEQ getgold 7040LDR R0,canhemove ; And reload R0 with canhemove 7050CMP R0,#0 ; Check if he can walk on it 7060BEQ endmove ; and if he cant dont scroll 7070CMP R0,#2 ; Does the tile kill ? 7080BEQ endmove ; If yes dont bother scrolling onto it 7090MOV R0,#0 7100STR R0,scrollcounter ; Set the scrollcounter to zero 7110BL screenbank 7120BL plotmap 7130BL plothim 7140.leftscrloop 7150LDR R0,startxpos 7160SUB R0,R0,#4 7170STR R0,startxpos 7180BL screenbank 7190BL plotmap ; Redraw the map 7200BL plothim ; Plot the characters 7210LDR R0,scrollcounter ; Load the scrollcounter into R0 7220ADD R0,R0,#1 ; Add 1 to the scrollcounter 7230STR R0,scrollcounter ; Save the scrollcounter back to memory 7240CMP R0,#4 ; Have 4 scrolls been completed ? 7250BNE leftscrloop ; If not loop back 7260LDR R0,xmappos 7270ADD R0,R0,#1 7280STR R0,xmappos 7290LDR R0,startxpos 7300ADD R0,R0,#16 7310STR R0,startxpos 7320BL newframe 7330.endmove 7340LDR R14,movelink 7350MOV PC,R14 7360: 7370.scrollright 7380STR R14,movelink 7390MOV R0,#2 7400STR R0,direction 7410MOVR0,#1:STRR0,didmapscroll 7420LDR R0,xmappos:ADD R0,R0,#2:STR R0,xstore 7430LDR R0,ymappos:ADD R0,R0,#3:STR R0,ystore 7440BL checktile ; What type is the destination tile 7450BL canmove ; Can he walk on it 7460LDR R0,canhemove ; Better find out 7470CMP R0,#4 ; Is there a rock there 7480BLEQ checkrockright ; If so, find out if it is movable 7490CMP R0,#5 ; Is there earth there 7500BLEQ getearth 7510CMP R0,#3 7520BLEQ getgold 7530LDR R0,canhemove ; And reload R0 with canhemove 7540CMP R0,#0 ; Check if he can walk on it 7550BEQ endmove ; and if he cant dont scroll 7560CMP R0,#2 ; Does the tile kill ? 7570BEQ endmove ; If yes dont bother scrolling onto it 7580MOV R0,#0 7590STR R0,scrollcounter ; Set the scrollcounter to zero 7600.rightscrloop 7610LDR R0,startxpos 7620ADD R0,R0,#4 7630STR R0,startxpos 7640BL screenbank 7650BL plotmap ; Redraw the map 7660BL plothim 7670LDR R0,scrollcounter ; Load the scrollcounter into R0 7680ADD R0,R0,#1 ; Add 1 to the scrollcounter 7690STR R0,scrollcounter ; Save the scrollcounter back to memory 7700CMP R0,#4 ; Have 4 scrolls been completed ? 7710BNE rightscrloop ; If not loop back 7720LDR R0,xmappos 7730SUB R0,R0,#1 7740STR R0,xmappos 7750LDR R0,startxpos 7760SUB R0,R0,#16 7770STR R0,startxpos 7780BL newframe 7790LDR R14,movelink 7800MOV PC,R14 7810: 7820.scrollup 7830STR R14,movelink 7840MOV R0,#6 7850STR R0,direction 7860MOVR0,#1:STRR0,didmapscroll 7870LDR R0,xmappos:ADD R0,R0,#3:STR R0,xstore 7880LDR R0,ymappos:ADD R0,R0,#4:STR R0,ystore 7890BL checktile ; What type is the destination tile 7900BL canmove 7910LDR R0,canhemove 7920CMP R0,#0 7930BEQ endmove 7940CMP R0,#2 ; Does the tile kill ? 7950BEQ endmove ; If yes dont bother scrolling onto it 7960CMP R0,#4 7970BEQ endmove 7980CMP R0,#5 ; Is there earth there 7990BLEQ getearth 8000CMP R0,#3 8010BLEQ getgold 8020MOV R0,#0 8030STR R0,scrollcounter ; Set the scrollcounter to zero 8040.upscrloop 8050LDR R0,startypos 8060SUB R0,R0,#1280 8070STR R0,startypos 8080BL screenbank 8090BL plotmap ; Redraw the map 8100BL plothim 8110LDR R0,scrollcounter ; Load the scrollcounter into R0 8120ADD R0,R0,#1 ; Add 1 to the scrollcounter 8130STR R0,scrollcounter ; Save the scrollcounter back to memory 8140CMP R0,#4 ; Have 4 scrolls been completed ? 8150BNE upscrloop ; If not loop back 8160LDR R0,ymappos 8170ADD R0,R0,#1 8180STR R0,ymappos 8190LDR R0,startypos 8200ADD R0,R0,#5120 8210STR R0,startypos 8220BL newframe 8230LDR R14,movelink 8240MOV PC,R14 8250: 8260.scrolldown 8270STR R14,movelink 8280MOV R0,#4 8290STR R0,direction 8300MOVR0,#1:STRR0,didmapscroll 8310LDR R0,xmappos:ADD R0,R0,#3:STR R0,xstore 8320LDR R0,ymappos:ADD R0,R0,#2:STR R0,ystore 8330BL checktile ; What type is the destination tile 8340BL canmove 8350LDR R0,canhemove 8360CMP R0,#0 8370BEQ endmove 8380CMP R0,#4 8390BEQ endmove 8400CMP R0,#2 ; Does the tile kill ? 8410BEQ endmove ; If yes dont bother scrolling onto it 8420CMP R0,#5 ; Is there earth there 8430BLEQ getearth 8440CMP R0,#3 8450BLEQ getgold 8460MOV R0,#0 8470STR R0,scrollcounter ; Set the scrollcounter to zero 8480.downscrloop 8490LDR R0,startypos 8500ADD R0,R0,#1280 8510STR R0,startypos 8520BL screenbank 8530BL plotmap ; Redraw the map 8540BL plothim 8550LDR R0,scrollcounter ; Load the scrollcounter into R0 8560ADD R0,R0,#1 ; Add 1 to the scrollcounter 8570STR R0,scrollcounter ; Save the scrollcounter back to memory 8580CMP R0,#4 ; Have 4 scrolls been completed ? 8590BNE downscrloop ; If not loop back 8600LDR R0,ymappos 8610SUB R0,R0,#1 8620STR R0,ymappos 8630LDR R0,startypos 8640SUB R0,R0,#5120 8650STR R0,startypos 8660BL newframe 8670LDR R14,movelink 8680MOV PC,R14 8690: 8700.windowdata 8710EQUD 16 8720EQUD 10240 8730EQUD 96 8740EQUD 35840 8750: 8760.screenstart 8770EQUD 0 8780EQUD 0 8790.banknum 8800EQUD 0 8810.startxpos 8820EQUD 0 8830.startypos 8840EQUD 10240 8850.xmappos 8860EQUD 13 8870.ymappos 8880EQUD 18 8890.xtilecount 8900EQUD 0 8910.ytilecount 8920EQUD 0 8930.tilepointer 8940EQUD tilebitmaps 8950.mappointer 8960EQUD mapdata 8970.gamemappointer 8980EQUD gamemaps 8990: 9000: 9010.plotmap 9020LDR R5,startxpos ; Load R5 with the start map x pos 9030LDR R6,startypos ; Load R6 with the start y position 9040MOV R2,#0 ; Load R2 with the value 0 9050STR R2,ytilecount ; And set the y tile counter to 0 9060.mapyloop 9070MOV R2,#0 ; Load R2 with the value 0 9080STR R2,xtilecount ; And set the x tile counter to 0 9090LDR R5,startxpos 9100.mapxloop 9110SUB R6,R6,#5120 9120: 9130LDR R1,tilepointer ; Put address of tilebitmaps in R1 9140LDR R3,xmappos ; Load R3 with the x map pos 9150ADD R3,R3,R2 ; Add the x counter to the x pos 9160LDR R4,ymappos ; Load R4 with the y map pos 9170LDR R2,ytilecount 9180ADD R4,R4,R2 9190MOV R2,#40 ; Load R2 with the value 40 9200MUL R4,R2,R4 ; Multiply R4 by 40 9210ADD R2,R3,R4 ; R2 = X map pos + (Y map pos * 40) 9220LDR R3,mappointer 9230ADD R3,R3,R2 ; Set R3 to point to a tile in the map 9240LDRB R2,[R3] ; And load the value of that tile 9250SUB R2,R2,#32 ; Set the letter A of map data to be 0 9260MOV R4,#512 ; Load R4 with the value 512 9270MUL R3,R2,R4 ; Multiply the value of the tile by 512 9280ADD R1,R1,R3 ; And set R1 to point to the correct tile 9290LDR R2,banknum 9300ADR R9,screenstart 9310LDR R0,[R2,R9] 9320: 9330ADR R2,windowdata ; Get the address of the windowdata 9340LDMIA R2,{R9-R12} ; Load the window boundaries into R9-R12 9350MOV R7,R5 ; Copy the start x pos into R7 9360ADD R7,R7,#16 ; And then set R7 to point to end x pos 9370MOV R4,#0 ; Set the y pos counter to zero 9380.ysprloop 9390MOV R3,R5 ; Load the x counter with the start x pos 9400CMP R6,R10 ; Compare the y pos against top of window 9410BLT jumpxloop 9420CMP R6,R12 ; Compare the y pos against bot of window 9430BGE jumpxloop 9440.xsprloop 9450LDR R2,[R1] ; Load a word from tile bitmap 9460ADD R1,R1,#4 ; Add 4 to the sprite pointer address 9470CMP R3,R9 ; Compare X pos against LHS of window 9480BLT pixcellplotted 9490CMP R3,R11 9500BGE pixcellplotted 9510ADD R8,R0,R6 ; Add Screenstart + Y address in R8 9520STR R2,[R8,R3] ; Plot word to screen memory 9530.pixcellplotted 9540ADD R3,R3,#4 ; Add 4 to the X counter 9550CMP R3,R7 ; Compare x counter with final x pos 9560BNE xsprloop ; If they arent equal loop back 9570.jumpxloopa 9580ADD R6,R6,#160 ; Add 160 to the y address to plot at 9590ADD R4,R4,#1 ; Add 1 to the y pos counter 9600CMP R4,#32 ; Compare the Y counter with the height 9610BNE ysprloop ; If they arent equal loop back 9620: 9630ADD R5,R5,#16 9640LDR R2,xtilecount 9650ADD R2,R2,#1 9660STR R2,xtilecount 9670CMP R2,#7 9680BNE mapxloop 9690ADD R6,R6,#5120 9700LDR R2,ytilecount 9710ADD R2,R2,#1 9720STR R2,ytilecount 9730CMP R2,#7 9740BNE mapyloop 9750MOV PC,R14 ; End the routine, the map is plotted 9760.jumpxloop 9770ADD R1,R1,#16 9780B jumpxloopa 9790: 9800.direction 9810EQUD 0 9820.frame 9830EQUD 0 9840.characterpointer 9850EQUD characters 9860.manypos 9870EQUD (160*32)*4 9880.plothim 9890LDR R2,banknum 9900ADR R9,screenstart 9910LDR R0,[R2,R9] 9920LDR R1,characterpointer 9930LDR R8,direction ; Load the variable direction into R8 9940MOV R7,#512 ; Load 512 into R7 9950MUL R9,R8,R7 ; R9 = direction * 512 9960ADD R1,R9,R1 ; Add the direction to the pointer 9970LDR R8,frame ; Load the frame number into R8 9980MUL R9,R8,R7 ; Multiply the frame number by 512 9990ADD R1,R1,R9 ; And add it to the pointer 10000LDR R2,manypos ; Load the y screen address to plot at 10010ADD R0,R0,R2 ; Add the screen address to R0 10020MOV R3,#(16*3) 10030ADD R0,R0,R3 10040MOV R4,#32 10050.ymanloop 10060LDMIA R1!,{R5-R8} ; Load four words into R5-R8 10070STMIA R0,{R5-R8} ; Save four words to the screen 10080ADD R0,R0,#160 ; Add a line to y address 10090SUBS R4,R4,#1 ; Subtract 1 from the line counter 10100BNE ymanloop ; If all lines not plotted loop back 10110MOV PC,R14 ; End of routine 10120: 10130.bytesinlevel 10140EQUD 1136 10150: 10160.downloadlevel 10170LDR R0,level ; Load the level to download into R0 10180LDR R1,bytesinlevel ; Load the number of bytes in a level 10190LDR R2,gamemappointer ; Set R2 to point to the main levels 10200ADR R3,startmanx ; Set R3 to point to the gamemap 10210MUL R4,R0,R1 ; R4= level * bytesinlevel 10220ADD R2,R2,R4 ; Set R2 to point to the map to download 10230MOV R0,#0 ; Set the counter to 0 10240.downloadloop 10250LDRB R4,[R2] ; Load a byte from the main map 10260STRB R4,[R3] ; Store the byte in the game map 10270ADD R3,R3,#1 ; Add 1 to the game map pointer 10280ADD R2,R2,#1 ; Add 1 to the main map pointer 10290ADD R0,R0,#1 ; Add 1 to the counter 10300CMP R0,R1 ; Have all the bytes been downloaded yet ? 10310BNE downloadloop 10320MOV PC,R14 10330: 10340.startmanx 10350EQUD 0 10360.startmany 10370EQUD 0 10380.password 10390EQUS " ":EQUB 13 10400.mapdata 10410]:P%=P%+(40*28):[OPT opt% 10420: 10430; The gamefile is loaded into here 10440: 10450.loadgamefile 10460.tilebitmaps 10470]:P%=P%+(512*28):[OPT opt% 10480.characters 10490]:P%=P%+(512*10):[OPT opt% 10500.gamemaps 10510]:P%=P%+5680:[OPT opt% 10520.pallete 10530]:P%=P%+130:[OPT opt% 10540.gamename 10550]:P%=P%+20:[OPT opt% 10560.gamedesigner 10570]:P%=P%+20:[OPT opt% 10580.gametime 10590]:P%=P%+25:[OPT opt% 10600ALIGN 10610.spritearea 10620EQUD &2800 10630EQUD 0 10640EQUD 16 10650]:P%=P%+&2800:[OPT opt% 10660: 10670] 10680NEXT:ENDPROC 10690: 10700DEFPROCdrawscreen 10710OSCLI"FX 112,2":CLS 10720PROCbackground:PROCbox(80,80,732,732):PROCscores 10730OSCLI"FX 112,1":CLS 10740PROCbackground:PROCbox(80,80,732,732):PROCscores 10750ENDPROC 10760: 10770DEFPROCgame 10780!level=startlevel%:!dead=0:!finishedmap=0:CALL downloadlevel 10790X%=!startmanx:Y%=!startmany:!xmappos=X%:!ymappos=Y%:PROCfade 10800OSCLI"FX 112,2":OSCLI"FX 113,1" 10810PROCresetscores:CALL plotmap:CALL plothim:PROCscores 10820OSCLI"FX 112,1" 10830PROCscores:CALL plotmap:CALL plothim 10840: 10850REPEAT 10860CALL mainloop:TIME=0:REPEATUNTILTIME>50:OSCLI("FX 112,1"):OSCLI("FX 113,1"):PROCfade:PROChandledead 10870UNTIL (!dead=1 AND !lives=0) OR !finishedmap=1 10880: 10890*FX 113,1 10900IF !dead=1 AND !lives=0 PROCdead 10910IF !finishedmap=1 AND !level<4 PROCfinishedmap:GOTO10850 10920IF !finishedmap=1 AND !level=4 PROCfinishedall 10930PROCfade 10940ENDPROC 10950: 10960DEFPROCfade 10970GCOL 0,7:FOR X%=0 TO 31 STEP 4:WAIT:WAIT 10980FOR Y%=128+X% TO 740+X% STEP 32 10990MOVE 128,Y%:DRAW 764,Y% 11000NEXT:NEXT 11010ENDPROC 11020: 11030DEFFNfancytext(text$,X%,Y%) 11040VDU5:GCOL 0,14 11050MOVE X%-4,Y%-4:PRINTtext$:MOVE X%+4,Y%-4:PRINTtext$ 11060MOVE X%-4,Y%+4:PRINTtext$:MOVE X%+4,Y%+4:PRINTtext$ 11070GCOL 0,9:MOVE X%-4,Y%:PRINTtext$:MOVE X%+4,Y%:PRINTtext$ 11080MOVE X%,Y%-4:PRINTtext$:MOVE X%,Y%+4:PRINTtext$ 11090GCOL 0,11:MOVE X%,Y%:PRINTtext$:VDU4:="" 11100: 11110DEFPROCdead 11120TIME=0:REPEATUNTILTIME>30 11130PROCoutline 11140*FX 15,1 11150A$="Hard Luck!":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),550) 11160A$="You are dead":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),500) 11170A$="Press Space Bar":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),300) 11180REPEATUNTILINKEY-99:ENDPROC 11190: 11200DEFPROCfinishedmap 11210!level+=1:OSCLI"FX 112,2":PROCscores:OSCLI"FX 112,1":PROCscores 11220CALL downloadlevel 11230X%=!startmanx:Y%=!startmany:!xmappos=X%:!ymappos=Y% 11240TIME=0:REPEATUNTILTIME>30:PROCoutline 11250*FX 15,1 11260A$="Congratulations!":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),550) 11270A$="You have completed":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),500) 11280A$="Level "+STR$(!level):PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),450) 11290A$="Press Space Bar":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),300) 11300OSCLI"FX112,2":PROCscores:OSCLI"FX112,1":PROCscores:!dead=0:!finishedmap=0 11310PROCresetscores 11320REPEATUNTILINKEY-99:ENDPROC 11330: 11340DEFPROCoutline 11350GCOL 0,11:RECTANGLE 128,128,636,636 11360GCOL 0,14:RECTANGLE 136,136,620,620 11370ENDPROC 11380: 11390DEFPROCresetscores 11400CALL countdiamonds:!goldcount=0:!lives=3:!earthcount=0:ENDPROC 11410: 11420DEFPROCscores 11430PROCbox(844,80,384,732) 11440PRINTFNtabtext(" Gold:",28,9);TAB(34,9);!goldtotal 11450PRINTFNtabtext("Earth:",28,11);TAB(34,11);!earthcount 11460PRINTFNtabtext("Lives:"+STR$(!lives),28,13) 11470PRINTFNtabtext("Sound:Yes",28,15) 11480PRINTFNtabtext("Level:"+STR$((!level)+1),28,17) 11490PRINTFNtabtext(">"+pass$(!level)+"<",28,20) 11500PRINTFNtabtext("BY DUNCAN",28,24) 11510PRINTFNtabtext("McPHERSON",28,26) 11520COLOUR11:PRINTTAB(0,0); 11530ENDPROC 11540: 11550DEFPROChandledead 11560IF !dead=1 AND !lives=1 !lives=0:PROCscores:ENDPROC 11570IF !finishedmap=1 ENDPROC 11580IF !dead=1 !lives=!lives-1:!dead=0 11590OSCLI"FX 112,2":PROCscores 11600OSCLI"FX 112,1":PROCscores 11610X%=!startmanx:Y%=!startmany:!xmappos=X%:!ymappos=Y% 11620!direction=0 11630ENDPROC 11640: 11650DEFFNenterpassword 11660PROCfade:COLOUR128+7:COLOUR11 11670A$="Please enter a":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),600) 11680A$="password":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),550) 11690P%=0:A$="":PROCprintpass:REPEAT 11700REPEAT:G$=GET$:A%=ASC(G$):UNTIL (A%>64 AND A%<91) OR (A%>96 AND A%<123) OR A%=127 OR A%=13 11710IF A%>96 AND A%<123 A%-=32 11720IF A%=127 PROCdelete:PROCprintpass:UNTILFALSE 11730IF P%=7 AND G$<>CHR$13 UNTIL FALSE 11740IF A%<>13 A$=A$+CHR$A%:P%+=1 11750PROCprintpass 11760UNTIL A%=13:G$="":=A$ 11770: 11780DEFPROCdelete 11790IF P%=0 ENDPROC 11800A$=LEFT$(A$,LEN(A$)-1):P%-=1:ENDPROC 11810: 11820DEFPROCprintpass 11830B$=">"+A$+STRING$(7-LEN(A$),".")+"<" 11840WAIT:GCOL 0,7:MOVE 128,400:PLOT 97,600,60:PRINTTAB(0,0); 11850PRINTFNfancytext(B$,124+(322-(LEN(B$)*16)),450):ENDPROC 11860: 11870DEFPROCentryscrn 11880PROCfade:COLOUR128+7:COLOUR11 11890A$="Welcome to":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),700) 11900A$="CAVES OF DOOM":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),650) 11910GCOL 0,14:RECTANGLE 226,610,440,108 11920GCOL 0,11:RECTANGLE 226-8,610-8,440+16,108+16 11930A$="Z - Left X - Right":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),550) 11940A$="' - Up / - Down ":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),500) 11950A$="Tab - Kill yourself":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),450) 11960A$=" P = Password ":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),350) 11970A$=" Space = Play game":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),300) 11980A$="Return = Desktop ":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),250) 11990PRINTTAB(0,0);:ENDPROC 12000: 12010DEFPROCstartscreen 12020PROCdrawscreen:PROCentryscrn:REPEAT 12030startlevel%=0:REPEAT:G$=GET$:UNTIL G$=CHR$13 OR G$="P" OR G$="p" OR G$=" " 12040IF G$=" " PROCgame:PROCentryscrn:OSCLI"FX 15,1":UNTILFALSE 12050IF G$="P" OR G$="p" PROCgetstartlev 12060IF startlevel%<>0 PROCgame:PROCentryscrn:OSCLI"FX 15,1":UNTILFALSE 12070UNTIL G$=CHR$13:PROCfade:CLS:ENDPROC 12080: 12090DEFFNtabtext(txt$,xtab,ytab%) 12100xtab=xtab*32:ytab%=ytab%*32:ytab%=1024-ytab% 12110PRINTFNfancytext(txt$,xtab,ytab%):="" 12120: 12130DEFPROCgetpass 12140address%=gamemaps:address%+=8:FOR X%=0 TO 4:A$=$address%:address%+=1136 12150pass$(X%)=A$:NEXT:ENDPROC 12160: 12170DEFPROCgetstartlev 12180C$=FNenterpassword:lev%=100:FOR X%=0 TO 4:IF C$=pass$(X%) lev%=X% 12190NEXT:IF lev%=100 A$="Not accepted!":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),250):TIME=0:REPEATUNTILTIME>60:PROCfade:PROCentryscrn:ENDPROC 12200startlevel%=lev%:A$="Password accepted":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),250):TIME=0:REPEATUNTILTIME>60:ENDPROC 12210: 12220DEFPROCfinishedall 12230PROCfade:COLOUR128+7:COLOUR11 12240A$="CAVES OF DOOM":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),700) 12250A$="Congratulations!":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),600) 12260A$="You have completed":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),550) 12270A$="the WHOLE game":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),500) 12280A$="Now load up another":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),400) 12290A$="And complete it!":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),350) 12300A$="Press space bar":PRINTFNfancytext(A$,124+(322-(LEN(A$)*16)),250) 12310REPEATUNTILINKEY-99:PROCfade:ENDPROC 12320: 12330DEFPROCbox(x%,y%,w%,h%) 12340RESTORE 12370:FOR X%=0 TO 47 STEP 4 12350READ A%:GCOL 0,A%:MOVE x%+X%,y%+X%:PLOT 97,w%-(X%*2),h%-(X%*2) 12360NEXT:ENDPROC 12370DATA 5,4,3,2,1,0,1,2,3,4,5,7:REM Data for colours 12380: 12390DEFPROCbackground 12400FOR x%=0 TO 1280 STEP 128:FOR y%=0 TO 1024 STEP 128 12410SYS "OS_SpriteOp",290,spritearea,"tile",x%,y%,8 12420NEXT:NEXT 12430SYS "OS_SpriteOp",290,spritearea,"caves",132,856,8 12440ENDPROC
� >!RunImage : #� **************************** (#� * Caves of Doom * 2#� * By Duncan F. McPherson * <#� * (c) 6th of December 1991 * F#� * Version 1.0 * P#� **************************** Z: dș "OS_GetEnv" � comm$ n!p=�comm$,"""",�comm$,"""")+1) xcomm$=�comm$,p+1) �ȕ �comm$,1)=" " �comm$=�comm$,2) �� �: �� taskid%4:$taskid%="TASK" �8ș "Wimp_Initialise",200,!taskid%,"Caves" � version% �K� q% &300:!q%=-1:q%!4=-16:q%!8=0:q%!12=68:q%!20=&3002:$(q%+24)="!Caves" �� buffer% &300,block% &400 �$ș "Wimp_CreateIcon",,q% � icon% ��assemble:�loaddata �� � �error �"� comm$<>"" �playgame:comm$="" � quit%=�:� ș "Wimp_Poll",0,q% � A% Ȏ A% � @� 2:�openwindow(!q%,q%!4,q%!8,q%!12,q%!16,q%!20,q%!24,q%!28) "� 6:�mousebutton ,� 9:�menusel(!q%) 6� 17,18:�message @� J �quit% Tș "Wimp_CloseDown" ^� h: r ��message |Ȏ q%!16 � �� 0:quit%=� �� 3:�newgameload �� 5:�newgameload ��:� �: ���newgameload �� q%!40<>&049 � �7q%!12=q%!8:q%!16=4:ș "Wimp_SendMessage",17,q%,q%!4 ��loadgame(�filename(q%+44)) � �playgame �� �: �ݤfilename(address%) 'A$="":�:B$=�(?address%):address%+=1 � B$<>�0 � B$<>�13 A$=A$+B$ � B$=�0 � B$=�13:=A$ &: 0��playgame :#oldmode%=�:ș "Wimp_SetMode",15 D@� �<>15 � 255,"I need 160K free memory for the game screen!" N&ș "OS_CheckModeValid",15 � valid% XD� valid%=-2 � 255,"I need 160K free memory for the game screen!" b"�9:�pallete:�128+7:�readscreen l-�startscreen:ș "Wimp_SetMode",oldmode%:� v: ���menusel(option%) �� option%=2 quit%=� �� �: �<��openwindow(handle%,x0%,y0%,x1%,y1%,scx%,scy%,bhandle%) �� handle%=-1 � � �Eq%!0=handle%:q%!28=bhandle%:q%!4=x0%:q%!8=y0%:q%!12=x1%:q%!16=y1% �2q%!20=scx%:q%!24=scy%:ș "Wimp_OpenWindow",,q% �� �: ���mousebutton �=� q%!12=-2 � q%!8=2 �domenu(101,"Info,Game,Quit","Caves") �3� q%!12=-2 � q%!8=4 � filestat$="yes" �playgame /� q%!12=-2 � q%!8=4 � filestat$="no" �sorry � : ��sorry *�block%!0=255:$(block%+4)="Welcome to caves of doom.To play a game double click on a cave file or drag one onto my icon on the iconbar." 43ș "Wimp_ReportError",block%,17,"Caves of Doom" >� H: R��error \;!q%=�:$(q%+4)=�$+" (internal error number "+�(�)+")"+�0 f� �=255 $(q%+4)=�$ p&ș "Wimp_ReportError",q%,1,"Caves" z� �: �&��domenu(handle%,menu$,menutitle$) �-menuhandle%=handle%:menuptr%=buffer%:i%=0 �'menuptr%!20=40:$menuptr%=menutitle$ �;menuptr%?12=7:menuptr%?13=2:menuptr%?14=7:menuptr%?15=0 �-menuptr%!16=96:menuptr%!24=0:menuptr%+=28 �1�:item$=�par(","):�menuitem(item$):� item$="" �%menuptr%!-24=(menuptr%!-24) � &80 �-ș "Wimp_CreateMenu",,buffer%,q%!0-64,248 �� �: �� �menuitem(text$) �� text$="" � G!menuptr%=0:menuptr%!4=-1:menuptr%!8=&07000021:$(menuptr%+12)=text$ #� text$="Info" menuptr%!4=info% #� text$="Game" menuptr%!4=game% $menuptr%+=24:� .: 8ݤpar(sep$) B%i1%=i%+1:i%=�menu$+sep$,sep$,i1%) L=�menu$,i1%,i%-i1%) V: `��loaddata j$filestat$="no":*CHANNELVOICE 1 8 t#ș "OS_SpriteOp",265,spritearea ~:ș "OS_SpriteOp",266,spritearea,"<Caves$Dir>.CaveSprs" �6� pass$(5):� screen% 16:screen%!0=148:screen%!4=-1 �!� infowin% &200,gamewin% &200 �3ș "Wimp_OpenTemplate",,"<Caves$Dir>.Templates" �Cș "Wimp_LoadTemplate",,block%,infowin%,infowin%+&200,-1,"info" �*ș "Wimp_CreateWindow",,block% � info% �Cș "Wimp_LoadTemplate",,block%,gamewin%,gamewin%+&200,-1,"game" �*ș "Wimp_CreateWindow",,block% � game% �ș "Wimp_CloseTemplate" � � comm$<>"" �loadgame(comm$) �� �: ���loadgame(filename$) +�("LOAD "+filename$+" "+�~loadgamefile) �getpass Egamename$=$gamename:gamedesign$=$gamedesigner:gametime$=$gametime 0q%!0=game%:q%!4=5:ș "Wimp_GetIconState",,q% (@$(q%!28)=gamename$:q%!8=0:q%!12=0:ș "Wimp_SetIconState",,q% 20q%!0=game%:q%!4=6:ș "Wimp_GetIconState",,q% <B$(q%!28)=gamedesign$:q%!8=0:q%!12=0:ș "Wimp_SetIconState",,q% F1q%!0=game%:q%!4=11:ș "Wimp_GetIconState",,q% PE$(q%!28)=�gametime$,15):q%!8=0:q%!12=0:ș "Wimp_SetIconState",,q% Zfilestat$="yes" d� n: x ��pallete �� y%=0 � 95 � 6 �c� ?(pallete+y%),?(pallete+y%+1),?(pallete+y%+2),?(pallete+y%+3),?(pallete+y%+4),?(pallete+y%+5) ��:� �: ���readscreen ��"FX 112,1":�"FX 113,1" �Eș "OS_ReadVduVariables",screen%,screen%+8:screenstart%=screen%!8 ��"FX 112,2":�"FX 113,2" �Fș "OS_ReadVduVariables",screen%,screen%+8:screenstart1%=screen%!8 �+�"FX 112,1":�"FX 113,1":�23;8202;0;0;0; �?�135:screenstart!0=screenstart%:screenstart!4=screenstart1% �� �: ��assemble � code% &B000 � opt%=0 � 2 � 2 "P%=code%:[OPT opt% , .mainlink 6 EQUD 0 @ .mainloop JSTR R14,mainlink T.inloop ^ MOV R0,#0 hSTR R0,didmapscroll r<MOV R0,#121 ; Osbyte number 121 - Keyboard Scan |MOV R1,#79 � &80 �SWI "OS_Byte" �CMP R1,#&FF �BLEQ scrolldown �MOV R1,#104 � &80 �MOV R0,#121 �SWI "OS_Byte" �CMP R1,#&FF �BLEQ scrollup �MOV R1,#97 � &80 �MOV R0,#121 �SWI "OS_Byte" �CMP R1,#&FF �BLEQ scrollright MOV R1,#66 � &80 MOV R0,#121 SWI "OS_Byte" &CMP R1,#&FF 0BLEQ scrollleft :: DBL updaterocks NBL screenbank XBL plotmap bBL plothim lBL clearkeys vLDR R0,finishedmap � CMP R0,#1 �BEQ endofgame �: �>MOV R1,#96 � &80 ; Load R1 with 112 � &80 (96=TAB) �;MOV R0,#121 ; OSBYTE 121 - keyboard scan �,SWI "OS_Byte" ; Call OSBYTE �LDR R0,dead �CMP R1,#&FF ��Q R0,#1 �STR R0,dead �?LDR R0,dead ; Load the variable dead into R0 �3CMP R0,#1 ; Is the player dead �BEQ endofgame 0B inloop ; Loop back again .endofgame BL screenbank BL plotmap *BL plothim 4LDR R0,dead > CMP R0,#1 HBLEQ deathanimation RLDR R14,mainlink \MOV PC,R14 f: p.earthcount z EQUD 0 �.goldcount � EQUD 0 �.goldtotal � EQUD 0 � .level � EQUD 0 � .dead � EQUD 0 � .lives � EQUD 3 �.finishedmap � EQUD 0 � .movelink EQUD 0 .scrollcounter EQUD 0 $.xstore . EQUD 0 8.ystore B EQUD 0 L.result V EQUD 0 `.canhemove j EQUD 0 t.newtile ~ EQUD 0 �: �.rockslink � EQUD 0 �.updatemap � EQUD 0 � .endofmap �EQUD 27*40 �: �.deathanimation �STR R14,rockslink �0MOV R0,#1 ; Channel 1 �1MOV R1,#15 ; Volume +15 ARSB R1,R1,#0 ; Make volume negative (-15) 0MOV R2,#200 ; Pitch 200 2MOV R3,#4 ; Duration 40 9SWI "Sound_Control" ; Generate the sound (GMOV R0,#8 ; Set r0 to 8 (direction 8 = dead) 2GSTR R0,direction ; And put 8 into the var direction < MOV R0,#0 FSTR R0,frame PBL rocksound ZBL foursyncs dBL screenbank nBL plotmap xBL plothim �BL foursyncs �BL newframe �BL screenbank �BL plotmap �BL plothim �BL screenbank �BL foursyncs �BL plotmap �BL screenbank �BL foursyncs �BL plotmap �LDR R14,rockslink �MOV PC,R14 : .rocksound 0MOV R0,#1 ; Channel 1 "1MOV R1,#15 ; Volume +15 ,ARSB R1,R1,#0 ; Make volume negative (-15) 60MOV R2,#200 ; Pitch 200 @2MOV R3,#4 ; Duration 10 J9SWI "Sound_Control" ; Generate the sound TMOV PC,R14 ^.countdiamonds hLDR R0,mappointer rIMOV R1,#0 ; Set the number of diamonds to zero |@MOV R2,#0 ; Set the y counter to zero �.ycountloop �@MOV R3,#0 ; Set the x counter to zero �.xcountloop �:LDRB R4,[R0] ; Load a tile into R4 �?ADD R0,R0,#1 ; Add 1 to the map pointer �>CMP R4,#32+19 ; Is the tile a diamond ? �JADDEQ R1,R1,#1 ; If yes add 1 to the diamond counter �=ADD R3,R3,#1 ; Add 1 to the x counter �>CMP R3,#40 ; Is a line scanned yet ? �BNE xcountloop �=ADD R2,R2,#1 ; Add 1 to the y counter �ECMP R2,#28 ; Has the map been scanned yet ? �BNE ycountloop KSTR R1,goldtotal ; Store the diamond count at goldtotal MOV PC,R14 : & .newframe 0LDR R0,frame : CMP R0,#1 D�Q R0,#0 NMOVNE R0,#1 XSTR R0,frame bMOV PC,R14 l: v.updaterocks �KSTR R14,rockslink ; Store the link register in rockslink �HLDR R5,xmappos:ADD R5,R5,#3 ; Set R5 to point to the mans x pos �HLDR R6,ymappos:ADD R6,R6,#3 ; Set R6 to point to the mans y pos �STR R5,xstore �STR R6,ystore �MOV R0,#28 �STR R0,newtile �BL changetile �=LDR R10,mappointer ; R10 points to map data �JLDR R11,endofmap ; Load R11 with the value of endofmap �KADD R10,R10,R11 ; Add the map y pointer to map pointer �BMOV R9,#27 ; Set the map y counter to 27 �.yrockloop AMOV R8,#0 ; Set the x map counter to 0 .xrockloop ;LDRB R11,[R10] ; Load a tile into R11 9CMP R11,#3+32 ; Is the tile a rock *8BLEQ rockfound ; If it is check it 4FSUB R10,R10,#1 ; Subtract 1 from the map pointer >AADD R8,R8,#1 ; Add 1 to the x map counter HDCMP R8,#40 ; Is that the end of the line ? R7BNE xrockloop ; If not loop back \HSUB R9,R9,#1 ; Subtract 1 from the y map counter fICMN R9,#1 ; Has the y counter reached -1 yet ? p7BNE yrockloop ; If not loop back z MOV R0,#0 �STR R0,newtile �BL changetile �?LDR R14,rockslink ; Reload the link register �MOV PC,R14 �: �.rockfound �HMOV R0,R10 ; Put the address of the rock in R0 �LADD R0,R0,#40 ; Get the address 1 tile below the rock �GLDRB R11,[R0] ; Load the tile from there into R0 �BCMP R11,#32+0 ; Is the tile a blank space ? �BNE notablank �GSTRB R11,[R10] ; Store a blank tile over the rock �;MOV R11,#32+3 ; Load R11 with a rock MSTRB R11,[R0] ; And place the rock in its new position JB checkformanbelow ; Check to see if man was hit by rock .notablank $FMOV R5,R11 ; Put the value of the tile in R5 .ACMP R11,#32+4 ; Is the tile a left slope ? 8BEQ leftslope BBCMP R11,#32+6 ; Is the tile a right slope ? LBEQ rightslope V<CMP R5,#32+19 ; Is the tile a diamond `BEQ leftslope j9CMP R5,#32+3 ; Is the tile a rock tBEQ leftslope ~?CMP R5,#32+22 ; Is the tile a power pill �BEQ leftslope �.returnfromslope �?CMP R5,#32+22 ; Is the tile a power pill �BEQ rightslope �9CMP R5,#32+3 ; Is the tile a rock �BEQ rightslope �<CMP R5,#32+19 ; Is the tile a diamond �BEQ rightslope �MOV PC,R14 �.checkformanbelow �IADD R0,R0,#40 ; Get the address 1 tile below again �ALDRB R11,[R0] ; Load tile from the address ELDR R1,dead ; Load R1 with the variable dead @CMP R11,#28+32 ; Is the man in that tile ? :�Q R1,#1 ; If yes, he is now dead >STR R1,dead ; Store the variable dead (B rocksound 2MOV PC,R14 <: F.leftslope PMOV R6,R10 ZJSUB R6,R6,#1 ; Move the address 1 tile to the left dBLDRB R11,[R6] ; And get the tile from there n<CMP R11,#32+0 ; Is it a blank space ? xNBNE returnfromslope ; If not exit this subroutine immediately �ADD R6,R6,#40 �BLDRB R11,[R6] ; And get the tile from there �<CMP R11,#32+0 ; Is it a blank space ? �NBNE returnfromslope ; If not exit this subroutine immediately �GMOV R7,#32+3 ; Load R7 with the value of a rock �KSTRB R7,[R6] ; And put the rock in its new position �NMOV R7,#32+0 ; Load R7 with the value of a blank space �NSTRB R7,[R10] ; And put the space over the old rock pos �IADD R6,R6,#40 ; Get the address 1 tile below again �ALDRB R11,[R6] ; Load tile from the address �ELDR R1,dead ; Load R1 with the variable dead �@CMP R11,#28+32 ; Is the man in that tile ? �:�Q R1,#1 ; If yes, he is now dead ECMP R11,#32+3 ; Is there a rock in that tile ? OBEQ checkleftdead ; If yes check to see if man is next to it HCMP R11,#32+19 ; Is there a diamond in that tile ? "OBEQ checkleftdead ; If yes check to see if man is next to it ,KCMP R11,#32+22 ; Is there a power pill in that tile ? 6OBEQ checkleftdead ; If yes check to see if man is next to it @KCMP R11,#32+4 ; Is there a left slope in that tile ? J>STR R1,dead ; Store the variable dead TB rocksound ^MOV PC,R14 h.checkleftdead rHSUB R6,R6,#1 ; Get address of tile 1 to the left |ALDRB R11,[R6] ; Load tile from the address �@CMP R11,#28+32 ; Is the man in that tile ? �:�Q R1,#1 ; If yes, he is now dead �>STR R1,dead ; Store the variable dead �MOV PC,R14 �: �.rightslope �MOV R6,R10 �KADD R6,R6,#1 ; Move the address 1 tile to the right �BLDRB R11,[R6] ; And get the tile from there �<CMP R11,#32+0 ; Is it a blank space ? �MOVNE PC,R14 �ADD R6,R6,#40 �BLDRB R11,[R6] ; And get the tile from there <CMP R11,#32+0 ; Is it a blank space ? MOVNE PC,R14 GMOV R7,#32+3 ; Load R7 with the value of a rock &KSTRB R7,[R6] ; And put the rock in its new position 0NMOV R7,#32+0 ; Load R7 with the value of a blank space :NSTRB R7,[R10] ; And put the space over the old rock pos DKADD R6,R6,#40 ; Get the address 1 below the new rock N=LDR R1,dead ; Load the variable dead X=LDRB R11,[R6] ; Load the tile into R11 b@CMP R11,#28+32 ; Is the man in that tile ? l:�Q R1,#1 ; If yes, he is now dead v=CMP R11,#32+3 ; Is a rock in that tile �BEQ checkrightdead �CCMP R11,#32+22 ; Is a power pill in that tile �BEQ checkrightdead �FCMP R11,#32+6 ; Is a right slope in that tile ? �BEQ checkrightdead �BCMP R11,#32+19 ; Is a diamond in that tile ? �BEQ checkrightdead �>STR R1,dead ; Store the variable dead �MOV PC,R14 �.checkrightdead �ADD R6,R6,#1 �LDRB R11,[R6] �CMP R11,#28+32 �Q R1,#1 STR R1,dead B rocksound MOV PC,R14 *: 4 .wasthere > EQUD 0 H.doupdatemap R EQUD 0 \.isrockstable fSTR R14,checklink pMOV R10,#0 z,LDR R0,ystore:ADD R0,R0,#1:STR R0,ystore �BL checktile �DLDR R0,result ; Find out whats below the rock �6CMP R0,#0 ; Is it a blank ? �A�Q R10,#1 ; If it is the rock is unstable �MSTREQ R10,doupdatemap ; And the map must be updated to show it �BBEQ endrockstable ; So finish if it is unstable �.endrockstable �STR R10,result �LDR R14,checklink �MOV PC,R14 �: �.checktile �FLDR R3,xstore ; get the x coord of tile to find FLDR R4,ystore ; get the y coord of tile to find @MOV R2,#40 ; Load R2 with the value 40 8MUL R4,R2,R4 ; Multiply R4 by 40 $HADD R2,R3,R4 ; R2 = X map pos + (Y map pos * 40) .LDR R3,mappointer 8KADD R3,R3,R2 ; Set R3 to point to a tile in the map BFLDRB R2,[R3] ; And load the value of that tile LKSUB R2,R2,#32 ; Set the letter A of map data to be 0 VHSTR R2,result ; Store the tile number in "result" `MOV PC,R14 j: t.getgold ~LDR R0,goldcount �ADD R0,R0,#1 �STR R0,goldcount � MOV R0,#0 �STR R0,newtile �LDR R0,goldcount �LDR R12,goldtotal �CMP R0,R12 ��Q R0,#1 �STREQ R0,finishedmap �LDR R0,goldcount �LDR R1,goldtotal �ISUB R0,R1,R0 ; Place number of tiles to get in R0 <ADR R1,numberbuffer ; Load R1 with a buffer @MOV R2,#20 ; Set R2 to the buffer size 9SWI "OS_ConvertInteger4" ; Convert the number 'MOV R0,#112:MOV R1,#2:SWI "OS_Byte" (BSWI 256+31 ; Print chr$ 31 (move cursor) 2MOV R0,#34 <SWI "OS_WriteC" F MOV R0,#9 PSWI "OS_WriteC" ZADR R0,blankbuffer dSWI "OS_Write0" nCSWI 256+31:MOV R0,#34:SWI "OS_WriteC":MOV R0,#9:SWI "OS_WriteC" x>ADR R0,numberbuffer ; Load R0 with the buffer �7SWI "OS_Write0" ; Print the string �'MOV R0,#112:MOV R1,#1:SWI "OS_Byte" �BSWI 256+31 ; Print chr$ 31 (move cursor) �MOV R0,#34 �SWI "OS_WriteC" � MOV R0,#9 �SWI "OS_WriteC" �ADR R0,blankbuffer �SWI "OS_Write0" �CSWI 256+31:MOV R0,#34:SWI "OS_WriteC":MOV R0,#9:SWI "OS_WriteC" �>ADR R0,numberbuffer ; Load R0 with the buffer �SWI "OS_Write0" �B changetile : .blankbuffer EQUS " "+�0 ".numberbuffer ,%EQUS " ":ALIGN 6 .getearth @LDR R0,earthcount JADD R0,R0,#1 TSTR R0,earthcount ^HMOV R0,#0 ; Load R0 with zero (0=Blank space) hASTR R0,newtile ; Set newtile to blank space r.changetile |HLDR R3,xstore ; get the x coord of tile to change �HLDR R4,ystore ; get the y coord of tile to change �@MOV R2,#40 ; Load R2 with the value 40 �8MUL R4,R2,R4 ; Multiply R4 by 40 �HADD R2,R3,R4 ; R2 = X map pos + (Y map pos * 40) �FLDR R3,mappointer ; Get the pointer to the map data �KADD R3,R3,R2 ; Set R3 to point to a tile in the map �LLDR R4,newtile ; Load R4 with the value of the newtile �CADD R4,R4,#32 ; Reset r4 so that tile 0 = 32 �FSTRB R4,[R3] ; And save the newtile to the map �LDR R0,earthcount �<ADR R1,numberbuffer ; Load R1 with a buffer �@MOV R2,#20 ; Set R2 to the buffer size �9SWI "OS_ConvertInteger4" ; Convert the number 'MOV R0,#112:MOV R1,#2:SWI "OS_Byte" BSWI 256+31 ; Print chr$ 31 (move cursor) MOV R0,#34 &SWI "OS_WriteC" 0MOV R0,#11 :SWI "OS_WriteC" D>ADR R0,numberbuffer ; Load R0 with the buffer N7SWI "OS_Write0" ; Print the string X'MOV R0,#112:MOV R1,#1:SWI "OS_Byte" bBSWI 256+31 ; Print chr$ 31 (move cursor) lMOV R0,#34 vSWI "OS_WriteC" �MOV R0,#11 �SWI "OS_WriteC" �=ADR R0,numberbuffer ; Load R0 with the buffer �7SWI "OS_Write0" ; Print the string �MOV PC,R14 �: �.canmove �?LDR R0,result ; Load in the type of tile � MOV R1,#0 �:CMP R0,#0 ; Is the tile blank ? �G�Q R1,#1 ; If it is, set R1 to yes he can move �;CMP R0,#3 ; Is the tile a rock ? �E�Q R1,#4 ; If it is, set R1 to indicate that 8CMP R0,#20 ; Is the tile earth :�Q R1,#5 ; If it is indicate that 7CMP R0,#19 ; Is the tile gold :�Q R1,#3 ; If it is indicate that *?CMP R0,#22 ; Is the tile a Power Pill 4I�Q R1,#5 ; <<< TEMOORARY NUMBER � POWER PILL >>> ><CMP R0,#21 ; Is the tile poision ? H:�Q R1,#2 ; If it is indicate that R;�Q R2,#1 ; Load r2 with 1 (1=dead) \JSTREQ R2,dead ; And set the dead flag to � (1=Dead) f>STR R1,canhemove ; Store R1 to "canhemove" pMOV PC,R14 z: �.checklink � EQUD 0 �: �.checkrockleft �7STR R14,checklink ; Store the link regsiter �,LDR R0,xstore:ADD R0,R0,#1:STR R0,xstore �MBL checktile ; Find out what is in the tile next to the rock �;LDR R0,result ; Get the result of the check �5CMP R0,#0 ; Is it a blank space ? �DBEQ moverockleft ; If it is move the rock along into it �LMOV R0,#0 ; Load R0 with the value 0 (0=No he cant move) �BSTR R0,canhemove ; And set the canhemove word to zero �8LDR R14,checklink ; Reload the link register IMOV PC,R14 ; And exit the routine, the man cannot move .moverockleft >MOV R0,#3 ; Set R0 to the value 3 (3=Rock) $>STR R0,newtile ; And store the value in newtile .@BL changetile ; Then change the tile into a rock 8EMOV R0,#0 ; Set R0 to the value 0 (0=Blank space) B>STR R0,newtile ; And store the value in newtile L,LDR R0,xstore:SUB R0,R0,#1:STR R0,xstore VKBL changetile ; Then blank over the old rock with the space `LMOV R0,#1 ; Load R0 with the value 1 (1=Yes he can move) jBSTR R0,canhemove ; And set the canhemove word to zero t8LDR R14,checklink ; Reload the link register ~FMOV PC,R14 ; And exit the routine, the man can move �: �.checkrockright �7STR R14,checklink ; Store the link regsiter �,LDR R0,xstore:SUB R0,R0,#1:STR R0,xstore �MBL checktile ; Find out what is in the tile next to the rock �;LDR R0,result ; Get the result of the check �5CMP R0,#0 ; Is it a blank space ? �DBEQ moverockright ; If it is move the rock along into it �LMOV R0,#0 ; Load R0 with the value 0 (0=No he cant move) �BSTR R0,canhemove ; And set the canhemove word to zero �8LDR R14,checklink ; Reload the link register �IMOV PC,R14 ; And exit the routine, the man cannot move .moverockright >MOV R0,#3 ; Set R0 to the value 3 (3=Rock) >STR R0,newtile ; And store the value in newtile @BL changetile ; Then change the tile into a rock (EMOV R0,#0 ; Set R0 to the value 0 (0=Blank space) 2>STR R0,newtile ; And store the value in newtile <,LDR R0,xstore:ADD R0,R0,#1:STR R0,xstore FKBL changetile ; Then blank over the old rock with the space PLMOV R0,#1 ; Load R0 with the value 1 (1=Yes he can move) ZASTR R0,canhemove ; And set the canhemove word to one d8LDR R14,checklink ; Reload the link register nFMOV PC,R14 ; And exit the routine, the man can move x: �.screenbank �.MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync �LDR R9,banknum �:CMP R9,#0 ; Was bank 0 written to last �8�Q R9,#4 ; If yes write to bank 4 next �;MOVNE R9,#0 ; If not write to bank 0 next �STR R9,banknum �7MOV R0,#113 ; Set R0 to the value 113 �LDR R9,banknum � CMP R9,#4 ��Q R1,#1 �MOVNE R1,#2 �SWI "OS_Byte" MOV PC,R14 : .foursyncs ".MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync ,.MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync 6.MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync @MOV R0,#19:SWI "OS_Byte" JMOV R0,#19:SWI "OS_Byte" TMOV R0,#19:SWI "OS_Byte" ^.MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync h.MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync r.MOV R0,#19:SWI "OS_Byte" ; Wait for Vsync |MOV PC,R14 �: �.clearkeys �MOV R0,#15 � MOV R1,#1 �SWI "OS_Byte" �MOV PC,R14 �: �.didmapscroll � EQUD0 �.scrollleft �STR R14,movelink � MOV R0,#0 �STR R0,direction MOVR0,#1:STRR0,didmapscroll -LDR R0,xmappos:ADD R0,R0,#4:STR R0,xstore -LDR R0,ymappos:ADD R0,R0,#3:STR R0,ystore &HBL checktile ; What type is the destination tile 08BL canmove ; Can he walk on it :6LDR R0,canhemove ; Better find out D<CMP R0,#4 ; Is there a rock there NGBLEQ checkrockleft ; If so, find out if it is movable X;CMP R0,#5 ; Is there earth there bBLEQ getearth l CMP R0,#3 vBLEQ getgold �CLDR R0,canhemove ; And reload R0 with canhemove �ACMP R0,#0 ; Check if he can walk on it �ABEQ endmove ; and if he cant dont scroll �;CMP R0,#2 ; Does the tile kill ? �KBEQ endmove ; If yes dont bother scrolling onto it � MOV R0,#0 �=STR R0,scrollcounter ; Set the scrollcounter to zero �BL screenbank �BL plotmap �BL plothim �.leftscrloop �LDR R0,startxpos �SUB R0,R0,#4 STR R0,startxpos BL screenbank .BL plotmap ; Redraw the map 3BL plothim ; Plot the characters *>LDR R0,scrollcounter ; Load the scrollcounter into R0 4:ADD R0,R0,#1 ; Add 1 to the scrollcounter >ESTR R0,scrollcounter ; Save the scrollcounter back to memory H?CMP R0,#4 ; Have 4 scrolls been completed ? R0BNE leftscrloop ; If not loop back \LDR R0,xmappos fADD R0,R0,#1 pSTR R0,xmappos zLDR R0,startxpos �ADD R0,R0,#16 �STR R0,startxpos �BL newframe �.endmove �LDR R14,movelink �MOV PC,R14 �: �.scrollright �STR R14,movelink � MOV R0,#2 �STR R0,direction �MOVR0,#1:STRR0,didmapscroll �-LDR R0,xmappos:ADD R0,R0,#2:STR R0,xstore -LDR R0,ymappos:ADD R0,R0,#3:STR R0,ystore HBL checktile ; What type is the destination tile 8BL canmove ; Can he walk on it $6LDR R0,canhemove ; Better find out .<CMP R0,#4 ; Is there a rock there 8GBLEQ checkrockright ; If so, find out if it is movable B;CMP R0,#5 ; Is there earth there LBLEQ getearth V CMP R0,#3 `BLEQ getgold jCLDR R0,canhemove ; And reload R0 with canhemove tACMP R0,#0 ; Check if he can walk on it ~ABEQ endmove ; and if he cant dont scroll �;CMP R0,#2 ; Does the tile kill ? �KBEQ endmove ; If yes dont bother scrolling onto it � MOV R0,#0 �=STR R0,scrollcounter ; Set the scrollcounter to zero �.rightscrloop �LDR R0,startxpos �ADD R0,R0,#4 �STR R0,startxpos �BL screenbank �.BL plotmap ; Redraw the map �BL plothim �>LDR R0,scrollcounter ; Load the scrollcounter into R0 :ADD R0,R0,#1 ; Add 1 to the scrollcounter ESTR R0,scrollcounter ; Save the scrollcounter back to memory ?CMP R0,#4 ; Have 4 scrolls been completed ? 0BNE rightscrloop ; If not loop back (LDR R0,xmappos 2SUB R0,R0,#1 <STR R0,xmappos FLDR R0,startxpos PSUB R0,R0,#16 ZSTR R0,startxpos dBL newframe nLDR R14,movelink xMOV PC,R14 �: � .scrollup �STR R14,movelink � MOV R0,#6 �STR R0,direction �MOVR0,#1:STRR0,didmapscroll �-LDR R0,xmappos:ADD R0,R0,#3:STR R0,xstore �-LDR R0,ymappos:ADD R0,R0,#4:STR R0,ystore �HBL checktile ; What type is the destination tile �BL canmove �LDR R0,canhemove � CMP R0,#0 �BEQ endmove ;CMP R0,#2 ; Does the tile kill ? KBEQ endmove ; If yes dont bother scrolling onto it CMP R0,#4 "BEQ endmove ,;CMP R0,#5 ; Is there earth there 6BLEQ getearth @ CMP R0,#3 JBLEQ getgold T MOV R0,#0 ^=STR R0,scrollcounter ; Set the scrollcounter to zero h.upscrloop rLDR R0,startypos |SUB R0,R0,#1280 �STR R0,startypos �BL screenbank �.BL plotmap ; Redraw the map �BL plothim �>LDR R0,scrollcounter ; Load the scrollcounter into R0 �:ADD R0,R0,#1 ; Add 1 to the scrollcounter �ESTR R0,scrollcounter ; Save the scrollcounter back to memory �?CMP R0,#4 ; Have 4 scrolls been completed ? �0BNE upscrloop ; If not loop back �LDR R0,ymappos �ADD R0,R0,#1 �STR R0,ymappos �LDR R0,startypos ADD R0,R0,#5120 STR R0,startypos BL newframe &LDR R14,movelink 0MOV PC,R14 :: D.scrolldown NSTR R14,movelink X MOV R0,#4 bSTR R0,direction lMOVR0,#1:STRR0,didmapscroll v-LDR R0,xmappos:ADD R0,R0,#3:STR R0,xstore �-LDR R0,ymappos:ADD R0,R0,#2:STR R0,ystore �HBL checktile ; What type is the destination tile �BL canmove �LDR R0,canhemove � CMP R0,#0 �BEQ endmove � CMP R0,#4 �BEQ endmove �;CMP R0,#2 ; Does the tile kill ? �KBEQ endmove ; If yes dont bother scrolling onto it �;CMP R0,#5 ; Is there earth there �BLEQ getearth � CMP R0,#3 !BLEQ getgold ! MOV R0,#0 !=STR R0,scrollcounter ; Set the scrollcounter to zero ! .downscrloop !*LDR R0,startypos !4ADD R0,R0,#1280 !>STR R0,startypos !HBL screenbank !R.BL plotmap ; Redraw the map !\BL plothim !f>LDR R0,scrollcounter ; Load the scrollcounter into R0 !p:ADD R0,R0,#1 ; Add 1 to the scrollcounter !zESTR R0,scrollcounter ; Save the scrollcounter back to memory !�?CMP R0,#4 ; Have 4 scrolls been completed ? !�0BNE downscrloop ; If not loop back !�LDR R0,ymappos !�SUB R0,R0,#1 !�STR R0,ymappos !�LDR R0,startypos !�SUB R0,R0,#5120 !�STR R0,startypos !�BL newframe !�LDR R14,movelink !�MOV PC,R14 !�: !�.windowdata "EQUD 16 "EQUD 10240 "EQUD 96 "$EQUD 35840 ".: "8.screenstart "B EQUD 0 "L EQUD 0 "V.banknum "` EQUD 0 "j.startxpos "t EQUD 0 "~.startypos "�EQUD 10240 "�.xmappos "�EQUD 13 "�.ymappos "�EQUD 18 "�.xtilecount "� EQUD 0 "�.ytilecount "� EQUD 0 "�.tilepointer "�EQUD tilebitmaps "�.mappointer # EQUD mapdata # .gamemappointer #EQUD gamemaps #: #(: #2.plotmap #<GLDR R5,startxpos ; Load R5 with the start map x pos #FHLDR R6,startypos ; Load R6 with the start y position #P?MOV R2,#0 ; Load R2 with the value 0 #ZFSTR R2,ytilecount ; And set the y tile counter to 0 #d .mapyloop #n?MOV R2,#0 ; Load R2 with the value 0 #xFSTR R2,xtilecount ; And set the x tile counter to 0 #�LDR R5,startxpos #� .mapxloop #�SUB R6,R6,#5120 #�: #�GLDR R1,tilepointer ; Put address of tilebitmaps in R1 #�ALDR R3,xmappos ; Load R3 with the x map pos #�EADD R3,R3,R2 ; Add the x counter to the x pos #�ALDR R4,ymappos ; Load R4 with the y map pos #�LDR R2,ytilecount #�ADD R4,R4,R2 #�@MOV R2,#40 ; Load R2 with the value 40 #�8MUL R4,R2,R4 ; Multiply R4 by 40 #�HADD R2,R3,R4 ; R2 = X map pos + (Y map pos * 40) $LDR R3,mappointer $KADD R3,R3,R2 ; Set R3 to point to a tile in the map $FLDRB R2,[R3] ; And load the value of that tile $"KSUB R2,R2,#32 ; Set the letter A of map data to be 0 $,AMOV R4,#512 ; Load R4 with the value 512 $6LMUL R3,R2,R4 ; Multiply the value of the tile by 512 $@NADD R1,R1,R3 ; And set R1 to point to the correct tile $JLDR R2,banknum $TADR R9,screenstart $^LDR R0,[R2,R9] $h: $rHADR R2,windowdata ; Get the address of the windowdata $|MLDMIA R2,{R9-R12} ; Load the window boundaries into R9-R12 $�CMOV R7,R5 ; Copy the start x pos into R7 $�LADD R7,R7,#16 ; And then set R7 to point to end x pos $�DMOV R4,#0 ; Set the y pos counter to zero $� .ysprloop $�NMOV R3,R5 ; Load the x counter with the start x pos $�NCMP R6,R10 ; Compare the y pos against top of window $�BLT jumpxloop $�NCMP R6,R12 ; Compare the y pos against bot of window $�BGE jumpxloop $� .xsprloop $�CLDR R2,[R1] ; Load a word from tile bitmap $�JADD R1,R1,#4 ; Add 4 to the sprite pointer address $�JCMP R3,R9 ; Compare X pos against LHS of window %BLT pixcellplotted %CMP R3,R11 %BGE pixcellplotted %&HADD R8,R0,R6 ; Add Screenstart + Y address in R8 %0ASTR R2,[R8,R3] ; Plot word to screen memory %:.pixcellplotted %D=ADD R3,R3,#4 ; Add 4 to the X counter %NICMP R3,R7 ; Compare x counter with final x pos %XDBNE xsprloop ; If they arent equal loop back %b.jumpxloopa %lJADD R6,R6,#160 ; Add 160 to the y address to plot at %vAADD R4,R4,#1 ; Add 1 to the y pos counter %�LCMP R4,#32 ; Compare the Y counter with the height %�DBNE ysprloop ; If they arent equal loop back %�: %�ADD R5,R5,#16 %�LDR R2,xtilecount %�ADD R2,R2,#1 %�STR R2,xtilecount %� CMP R2,#7 %�BNE mapxloop %�ADD R6,R6,#5120 %�LDR R2,ytilecount %�ADD R2,R2,#1 %�STR R2,ytilecount & CMP R2,#7 &BNE mapyloop &JMOV PC,R14 ; End the routine, the map is plotted & .jumpxloop &*ADD R1,R1,#16 &4B jumpxloopa &>: &H.direction &R EQUD 0 &\ .frame &f EQUD 0 &p.characterpointer &zEQUD characters &�.manypos &�EQUD (160*32)*4 &�.plothim &�LDR R2,banknum &�ADR R9,screenstart &�LDR R0,[R2,R9] &�LDR R1,characterpointer &�JLDR R8,direction ; Load the variable direction into R8 &�7MOV R7,#512 ; Load 512 into R7 &�;MUL R9,R8,R7 ; R9 = direction * 512 &�GADD R1,R9,R1 ; Add the direction to the pointer &�DLDR R8,frame ; Load the frame number into R8 &�GMUL R9,R8,R7 ; Multiply the frame number by 512 '@ADD R1,R1,R9 ; And add it to the pointer 'KLDR R2,manypos ; Load the y screen address to plot at 'CADD R0,R0,R2 ; Add the screen address to R0 '$MOV R3,#(16*3) '.ADD R0,R0,R3 '8MOV R4,#32 'B .ymanloop 'LALDMIA R1!,{R5-R8} ; Load four words into R5-R8 'VDSTMIA R0,{R5-R8} ; Save four words to the screen '`>ADD R0,R0,#160 ; Add a line to y address 'jGSUBS R4,R4,#1 ; Subtract 1 from the line counter 'tIBNE ymanloop ; If all lines not plotted loop back '~5MOV PC,R14 ; End of routine '�: '�.bytesinlevel '� EQUD 1136 '�: '�.downloadlevel '�HLDR R0,level ; Load the level to download into R0 '�ILDR R1,bytesinlevel ; Load the number of bytes in a level '�HLDR R2,gamemappointer ; Set R2 to point to the main levels '�DADR R3,startmanx ; Set R3 to point to the gamemap '�>MUL R4,R0,R1 ; R4= level * bytesinlevel '�LADD R2,R2,R4 ; Set R2 to point to the map to download '�:MOV R0,#0 ; Set the counter to 0 ( .downloadloop ( CLDRB R4,[R2] ; Load a byte from the main map (DSTRB R4,[R3] ; Store the byte in the game map (CADD R3,R3,#1 ; Add 1 to the game map pointer ((CADD R2,R2,#1 ; Add 1 to the main map pointer (2:ADD R0,R0,#1 ; Add 1 to the counter (<NCMP R0,R1 ; Have all the bytes been downloaded yet ? (FBNE downloadloop (PMOV PC,R14 (Z: (d.startmanx (n EQUD 0 (x.startmany (� EQUD 0 (� .password (�EQUS " ":EQUB 13 (�.mapdata (�]:P%=P%+(40*28):[OPT opt% (�: (�&; The gamefile is loaded into here (�: (�.loadgamefile (�.tilebitmaps (�]:P%=P%+(512*28):[OPT opt% (�.characters (�]:P%=P%+(512*10):[OPT opt% ) .gamemaps )]:P%=P%+5680:[OPT opt% ).pallete )"]:P%=P%+130:[OPT opt% ), .gamename )6]:P%=P%+20:[OPT opt% )@.gamedesigner )J]:P%=P%+20:[OPT opt% )T .gametime )^]:P%=P%+25:[OPT opt% )h ALIGN )r.spritearea )|EQUD &2800 )� EQUD 0 )�EQUD 16 )�]:P%=P%+&2800:[OPT opt% )�: )�] )��:� )�: )���drawscreen )��"FX 112,2":� )�+�background:�box(80,80,732,732):�scores )��"FX 112,1":� )�+�background:�box(80,80,732,732):�scores )�� *: * ��game *=!level=startlevel%:!dead=0:!finishedmap=0:� downloadlevel *&=X%=!startmanx:Y%=!startmany:!xmappos=X%:!ymappos=Y%:�fade *0�"FX 112,2":�"FX 113,1" *:,�resetscores:� plotmap:� plothim:�scores *D�"FX 112,1" *N�scores:� plotmap:� plothim *X: *b� *lG� mainloop:�=0:���>50:�("FX 112,1"):�("FX 113,1"):�fade:�handledead *v+� (!dead=1 � !lives=0) � !finishedmap=1 *�: *� *FX 113,1 *�� !dead=1 � !lives=0 �dead *�2� !finishedmap=1 � !level<4 �finishedmap:�Dbj *�,� !finishedmap=1 � !level=4 �finishedall *� �fade *�� *�: *� ��fade *�� 0,7:� X%=0 � 31 � 4:Ȗ:Ȗ *�� Y%=128+X% � 740+X% � 32 *�� 128,Y%:� 764,Y% *��:� +� +: +ݤfancytext(text$,X%,Y%) + �5:� 0,14 +*)� X%-4,Y%-4:�text$:� X%+4,Y%-4:�text$ +4)� X%-4,Y%+4:�text$:� X%+4,Y%+4:�text$ +>+� 0,9:� X%-4,Y%:�text$:� X%+4,Y%:�text$ +H%� X%,Y%-4:�text$:� X%,Y%+4:�text$ +R � 0,11:� X%,Y%:�text$:�4:="" +\: +f ��dead +p�=0:���>30 +z�outline +�*FX 15,1 +�<A$="Hard Luck!":�fancytext(A$,124+(322-(�(A$)*16)),550) +�>A$="You are dead":�fancytext(A$,124+(322-(�(A$)*16)),500) +�AA$="Press Space Bar":�fancytext(A$,124+(322-(�(A$)*16)),300) +����-99:� +�: +���finishedmap +�5!level+=1:�"FX 112,2":�scores:�"FX 112,1":�scores +�� downloadlevel +�7X%=!startmanx:Y%=!startmany:!xmappos=X%:!ymappos=Y% +��=0:���>30:�outline +�*FX 15,1 +�BA$="Congratulations!":�fancytext(A$,124+(322-(�(A$)*16)),550) ,DA$="You have completed":�fancytext(A$,124+(322-(�(A$)*16)),500) ,BA$="Level "+�(!level):�fancytext(A$,124+(322-(�(A$)*16)),450) ,AA$="Press Space Bar":�fancytext(A$,124+(322-(�(A$)*16)),300) ,$@�"FX112,2":�scores:�"FX112,1":�scores:!dead=0:!finishedmap=0 ,.�resetscores ,8���-99:� ,B: ,L ��outline ,V� 0,11:ȓ 128,128,636,636 ,`� 0,14:ȓ 136,136,620,620 ,j� ,t: ,~��resetscores ,�9� countdiamonds:!goldcount=0:!lives=3:!earthcount=0:� ,�: ,���scores ,��box(844,80,384,732) ,�.�tabtext(" Gold:",28,9);�34,9);!goldtotal ,�1�tabtext("Earth:",28,11);�34,11);!earthcount ,�'�tabtext("Lives:"+�(!lives),28,13) ,� �tabtext("Sound:Yes",28,15) ,�+�tabtext("Level:"+�((!level)+1),28,17) ,�*�tabtext(">"+pass$(!level)+"<",28,20) ,� �tabtext("BY DUNCAN",28,24) ,� �tabtext("McPHERSON",28,26) - �11:�0,0); - � -: -��handledead -(+� !dead=1 � !lives=1 !lives=0:�scores:� -2� !finishedmap=1 � -<%� !dead=1 !lives=!lives-1:!dead=0 -F�"FX 112,2":�scores -P�"FX 112,1":�scores -Z7X%=!startmanx:Y%=!startmany:!xmappos=X%:!ymappos=Y% -d!direction=0 -n� -x: -�ݤenterpassword -��fade:�128+7:�11 -�@A$="Please enter a":�fancytext(A$,124+(322-(�(A$)*16)),600) -�:A$="password":�fancytext(A$,124+(322-(�(A$)*16)),550) -�P%=0:A$="":�printpass:� -�I�:G$=�:A%=�(G$):� (A%>64 � A%<91) � (A%>96 � A%<123) � A%=127 � A%=13 -�� A%>96 � A%<123 A%-=32 -�"� A%=127 �delete:�printpass:�� -�� P%=7 � G$<>�13 � � -�� A%<>13 A$=A$+�A%:P%+=1 -��printpass -�� A%=13:G$="":=A$ -�: .��delete .� P%=0 � .A$=�A$,�(A$)-1):P%-=1:� .": .,��printpass .6B$=">"+A$+�7-�(A$),".")+"<" .@*Ȗ:� 0,7:� 128,400:� 97,600,60:�0,0); .J.�fancytext(B$,124+(322-(�(B$)*16)),450):� .T: .^��entryscrn .h�fade:�128+7:�11 .r<A$="Welcome to":�fancytext(A$,124+(322-(�(A$)*16)),700) .|?A$="CAVES OF DOOM":�fancytext(A$,124+(322-(�(A$)*16)),650) .�� 0,14:ȓ 226,610,440,108 .�'� 0,11:ȓ 226-8,610-8,440+16,108+16 .�EA$="Z - Left X - Right":�fancytext(A$,124+(322-(�(A$)*16)),550) .�EA$="' - Up / - Down ":�fancytext(A$,124+(322-(�(A$)*16)),500) .�EA$="Tab - Kill yourself":�fancytext(A$,124+(322-(�(A$)*16)),450) .�DA$=" P = Password ":�fancytext(A$,124+(322-(�(A$)*16)),350) .�DA$=" Space = Play game":�fancytext(A$,124+(322-(�(A$)*16)),300) .�DA$="Return = Desktop ":�fancytext(A$,124+(322-(�(A$)*16)),250) .� �0,0);:� .�: .���startscreen .��drawscreen:�entryscrn:� .�<startlevel%=0:�:G$=�:� G$=�13 � G$="P" � G$="p" � G$=" " /+� G$=" " �game:�entryscrn:�"FX 15,1":�� /"� G$="P" � G$="p" �getstartlev /3� startlevel%<>0 �game:�entryscrn:�"FX 15,1":�� /&� G$=�13:�fade:�:� /0: /:ݤtabtext(txt$,xtab,ytab%) /D0xtab=xtab*32:ytab%=ytab%*32:ytab%=1024-ytab% /N$�fancytext(txt$,xtab,ytab%):="" /X: /b ��getpass /lHaddress%=gamemaps:address%+=8:� X%=0 � 4:A$=$address%:address%+=1136 /vpass$(X%)=A$:�:� /�: /���getstartlev /�@C$=�enterpassword:lev%=100:� X%=0 � 4:� C$=pass$(X%) lev%=X% /�j�:� lev%=100 A$="Not accepted!":�fancytext(A$,124+(322-(�(A$)*16)),250):�=0:���>60:�fade:�entryscrn:� /�astartlevel%=lev%:A$="Password accepted":�fancytext(A$,124+(322-(�(A$)*16)),250):�=0:���>60:� /�: /���finishedall /��fade:�128+7:�11 /�?A$="CAVES OF DOOM":�fancytext(A$,124+(322-(�(A$)*16)),700) /�BA$="Congratulations!":�fancytext(A$,124+(322-(�(A$)*16)),600) /�DA$="You have completed":�fancytext(A$,124+(322-(�(A$)*16)),550) /�@A$="the WHOLE game":�fancytext(A$,124+(322-(�(A$)*16)),500) /�EA$="Now load up another":�fancytext(A$,124+(322-(�(A$)*16)),400) 0BA$="And complete it!":�fancytext(A$,124+(322-(�(A$)*16)),350) 0AA$="Press space bar":�fancytext(A$,124+(322-(�(A$)*16)),250) 0���-99:�fade:� 0 : 0*��box(x%,y%,w%,h%) 04� �DRp:� X%=0 � 47 � 4 0>6� A%:� 0,A%:� x%+X%,y%+X%:� 97,w%-(X%*2),h%-(X%*2) 0H�:� 0R2� 5,4,3,2,1,0,1,2,3,4,5,7:REM Data for colours 0\: 0f��background 0p+� x%=0 � 1280 � 128:� y%=0 � 1024 � 128 0z2ș "OS_SpriteOp",290,spritearea,"tile",x%,y%,8 0��:� 0�5ș "OS_SpriteOp",290,spritearea,"caves",132,856,8 0�� �
00000000 0d 00 0a 10 f4 20 3e 21 52 75 6e 49 6d 61 67 65 |..... >!RunImage| 00000010 0d 00 14 05 3a 0d 00 1e 23 f4 20 20 2a 2a 2a 2a |....:...#. ****| 00000020 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 00000030 2a 2a 2a 2a 2a 2a 2a 2a 0d 00 28 23 f4 20 20 2a |********..(#. *| 00000040 20 20 20 20 20 20 43 61 76 65 73 20 6f 66 20 44 | Caves of D| 00000050 6f 6f 6d 20 20 20 20 20 20 20 2a 0d 00 32 23 f4 |oom *..2#.| 00000060 20 20 2a 20 20 42 79 20 44 75 6e 63 61 6e 20 46 | * By Duncan F| 00000070 2e 20 4d 63 50 68 65 72 73 6f 6e 20 20 2a 0d 00 |. McPherson *..| 00000080 3c 23 f4 20 20 2a 20 28 63 29 20 36 74 68 20 6f |<#. * (c) 6th o| 00000090 66 20 44 65 63 65 6d 62 65 72 20 31 39 39 31 20 |f December 1991 | 000000a0 2a 0d 00 46 23 f4 20 20 2a 20 20 20 20 20 20 20 |*..F#. * | 000000b0 56 65 72 73 69 6f 6e 20 31 2e 30 20 20 20 20 20 |Version 1.0 | 000000c0 20 20 20 2a 0d 00 50 23 f4 20 20 2a 2a 2a 2a 2a | *..P#. *****| 000000d0 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a |****************| 000000e0 2a 2a 2a 2a 2a 2a 2a 0d 00 5a 05 3a 0d 00 64 1a |*******..Z.:..d.| 000000f0 c8 99 20 22 4f 53 5f 47 65 74 45 6e 76 22 20 b8 |.. "OS_GetEnv" .| 00000100 20 63 6f 6d 6d 24 0d 00 6e 21 70 3d a7 63 6f 6d | comm$..n!p=.com| 00000110 6d 24 2c 22 22 22 22 2c a7 63 6f 6d 6d 24 2c 22 |m$,"""",.comm$,"| 00000120 22 22 22 29 2b 31 29 0d 00 78 15 63 6f 6d 6d 24 |""")+1)..x.comm$| 00000130 3d c1 63 6f 6d 6d 24 2c 70 2b 31 29 0d 00 82 14 |=.comm$,p+1)....| 00000140 c8 95 20 c0 63 6f 6d 6d 24 2c 31 29 3d 22 20 22 |.. .comm$,1)=" "| 00000150 0d 00 8c 13 63 6f 6d 6d 24 3d c1 63 6f 6d 6d 24 |....comm$=.comm$| 00000160 2c 32 29 0d 00 96 05 ce 0d 00 a0 05 3a 0d 00 aa |,2).........:...| 00000170 1e de 20 74 61 73 6b 69 64 25 34 3a 24 74 61 73 |.. taskid%4:$tas| 00000180 6b 69 64 25 3d 22 54 41 53 4b 22 0d 00 b4 38 c8 |kid%="TASK"...8.| 00000190 99 20 22 57 69 6d 70 5f 49 6e 69 74 69 61 6c 69 |. "Wimp_Initiali| 000001a0 73 65 22 2c 32 30 30 2c 21 74 61 73 6b 69 64 25 |se",200,!taskid%| 000001b0 2c 22 43 61 76 65 73 22 20 b8 20 76 65 72 73 69 |,"Caves" . versi| 000001c0 6f 6e 25 0d 00 be 4b de 20 71 25 20 26 33 30 30 |on%...K. q% &300| 000001d0 3a 21 71 25 3d 2d 31 3a 71 25 21 34 3d 2d 31 36 |:!q%=-1:q%!4=-16| 000001e0 3a 71 25 21 38 3d 30 3a 71 25 21 31 32 3d 36 38 |:q%!8=0:q%!12=68| 000001f0 3a 71 25 21 32 30 3d 26 33 30 30 32 3a 24 28 71 |:q%!20=&3002:$(q| 00000200 25 2b 32 34 29 3d 22 21 43 61 76 65 73 22 0d 00 |%+24)="!Caves"..| 00000210 c8 1e de 20 62 75 66 66 65 72 25 20 26 33 30 30 |... buffer% &300| 00000220 2c 62 6c 6f 63 6b 25 20 26 34 30 30 0d 00 d2 24 |,block% &400...$| 00000230 c8 99 20 22 57 69 6d 70 5f 43 72 65 61 74 65 49 |.. "Wimp_CreateI| 00000240 63 6f 6e 22 2c 2c 71 25 20 b8 20 69 63 6f 6e 25 |con",,q% . icon%| 00000250 0d 00 dc 17 f2 61 73 73 65 6d 62 6c 65 3a f2 6c |.....assemble:.l| 00000260 6f 61 64 64 61 74 61 0d 00 e6 0e ee 20 85 20 f2 |oaddata..... . .| 00000270 65 72 72 6f 72 0d 00 f0 22 e7 20 63 6f 6d 6d 24 |error...". comm$| 00000280 3c 3e 22 22 20 f2 70 6c 61 79 67 61 6d 65 3a 63 |<>"" .playgame:c| 00000290 6f 6d 6d 24 3d 22 22 0d 00 fa 0d 71 75 69 74 25 |omm$=""....quit%| 000002a0 3d a3 3a f5 0d 01 04 1c c8 99 20 22 57 69 6d 70 |=.:....... "Wimp| 000002b0 5f 50 6f 6c 6c 22 2c 30 2c 71 25 20 b8 20 41 25 |_Poll",0,q% . A%| 000002c0 0d 01 0e 0b c8 8e 20 41 25 20 ca 0d 01 18 40 c9 |...... A% ....@.| 000002d0 20 32 3a f2 6f 70 65 6e 77 69 6e 64 6f 77 28 21 | 2:.openwindow(!| 000002e0 71 25 2c 71 25 21 34 2c 71 25 21 38 2c 71 25 21 |q%,q%!4,q%!8,q%!| 000002f0 31 32 2c 71 25 21 31 36 2c 71 25 21 32 30 2c 71 |12,q%!16,q%!20,q| 00000300 25 21 32 34 2c 71 25 21 32 38 29 0d 01 22 14 c9 |%!24,q%!28).."..| 00000310 20 36 3a f2 6d 6f 75 73 65 62 75 74 74 6f 6e 0d | 6:.mousebutton.| 00000320 01 2c 15 c9 20 39 3a f2 6d 65 6e 75 73 65 6c 28 |.,.. 9:.menusel(| 00000330 21 71 25 29 0d 01 36 14 c9 20 31 37 2c 31 38 3a |!q%)..6.. 17,18:| 00000340 f2 6d 65 73 73 61 67 65 0d 01 40 05 cb 0d 01 4a |.message..@....J| 00000350 0a fd 71 75 69 74 25 0d 01 54 17 c8 99 20 22 57 |..quit%..T... "W| 00000360 69 6d 70 5f 43 6c 6f 73 65 44 6f 77 6e 22 0d 01 |imp_CloseDown"..| 00000370 5e 05 e0 0d 01 68 05 3a 0d 01 72 0d dd f2 6d 65 |^....h.:..r...me| 00000380 73 73 61 67 65 0d 01 7c 0e c8 8e 20 71 25 21 31 |ssage..|... q%!1| 00000390 36 20 ca 0d 01 86 0f c9 20 30 3a 71 75 69 74 25 |6 ...... 0:quit%| 000003a0 3d b9 0d 01 90 14 c9 20 33 3a f2 6e 65 77 67 61 |=...... 3:.newga| 000003b0 6d 65 6c 6f 61 64 0d 01 9a 14 c9 20 35 3a f2 6e |meload..... 5:.n| 000003c0 65 77 67 61 6d 65 6c 6f 61 64 0d 01 a4 07 cb 3a |ewgameload.....:| 000003d0 e1 0d 01 ae 05 3a 0d 01 b8 11 dd f2 6e 65 77 67 |.....:......newg| 000003e0 61 6d 65 6c 6f 61 64 0d 01 c2 13 e7 20 71 25 21 |ameload..... q%!| 000003f0 34 30 3c 3e 26 30 34 39 20 e1 0d 01 cc 37 71 25 |40<>&049 ....7q%| 00000400 21 31 32 3d 71 25 21 38 3a 71 25 21 31 36 3d 34 |!12=q%!8:q%!16=4| 00000410 3a c8 99 20 22 57 69 6d 70 5f 53 65 6e 64 4d 65 |:.. "Wimp_SendMe| 00000420 73 73 61 67 65 22 2c 31 37 2c 71 25 2c 71 25 21 |ssage",17,q%,q%!| 00000430 34 0d 01 d6 1f f2 6c 6f 61 64 67 61 6d 65 28 a4 |4.....loadgame(.| 00000440 66 69 6c 65 6e 61 6d 65 28 71 25 2b 34 34 29 29 |filename(q%+44))| 00000450 0d 01 e0 0d f2 70 6c 61 79 67 61 6d 65 0d 01 ea |.....playgame...| 00000460 05 e1 0d 01 f4 05 3a 0d 01 fe 18 dd a4 66 69 6c |......:......fil| 00000470 65 6e 61 6d 65 28 61 64 64 72 65 73 73 25 29 0d |ename(address%).| 00000480 02 08 27 41 24 3d 22 22 3a f5 3a 42 24 3d bd 28 |..'A$="":.:B$=.(| 00000490 3f 61 64 64 72 65 73 73 25 29 3a 61 64 64 72 65 |?address%):addre| 000004a0 73 73 25 2b 3d 31 0d 02 12 1f e7 20 42 24 3c 3e |ss%+=1..... B$<>| 000004b0 bd 30 20 80 20 42 24 3c 3e bd 31 33 20 41 24 3d |.0 . B$<>.13 A$=| 000004c0 41 24 2b 42 24 0d 02 1c 18 fd 20 42 24 3d bd 30 |A$+B$..... B$=.0| 000004d0 20 84 20 42 24 3d bd 31 33 3a 3d 41 24 0d 02 26 | . B$=.13:=A$..&| 000004e0 05 3a 0d 02 30 0e dd f2 70 6c 61 79 67 61 6d 65 |.:..0...playgame| 000004f0 0d 02 3a 23 6f 6c 64 6d 6f 64 65 25 3d eb 3a c8 |..:#oldmode%=.:.| 00000500 99 20 22 57 69 6d 70 5f 53 65 74 4d 6f 64 65 22 |. "Wimp_SetMode"| 00000510 2c 31 35 0d 02 44 40 e7 20 eb 3c 3e 31 35 20 85 |,15..D@. .<>15 .| 00000520 20 32 35 35 2c 22 49 20 6e 65 65 64 20 31 36 30 | 255,"I need 160| 00000530 4b 20 66 72 65 65 20 6d 65 6d 6f 72 79 20 66 6f |K free memory fo| 00000540 72 20 74 68 65 20 67 61 6d 65 20 73 63 72 65 65 |r the game scree| 00000550 6e 21 22 0d 02 4e 26 c8 99 20 22 4f 53 5f 43 68 |n!"..N&.. "OS_Ch| 00000560 65 63 6b 4d 6f 64 65 56 61 6c 69 64 22 2c 31 35 |eckModeValid",15| 00000570 20 b8 20 76 61 6c 69 64 25 0d 02 58 44 e7 20 76 | . valid%..XD. v| 00000580 61 6c 69 64 25 3d 2d 32 20 85 20 32 35 35 2c 22 |alid%=-2 . 255,"| 00000590 49 20 6e 65 65 64 20 31 36 30 4b 20 66 72 65 65 |I need 160K free| 000005a0 20 6d 65 6d 6f 72 79 20 66 6f 72 20 74 68 65 20 | memory for the | 000005b0 67 61 6d 65 20 73 63 72 65 65 6e 21 22 0d 02 62 |game screen!"..b| 000005c0 22 eb 39 3a f2 70 61 6c 6c 65 74 65 3a fb 31 32 |".9:.pallete:.12| 000005d0 38 2b 37 3a f2 72 65 61 64 73 63 72 65 65 6e 0d |8+7:.readscreen.| 000005e0 02 6c 2d f2 73 74 61 72 74 73 63 72 65 65 6e 3a |.l-.startscreen:| 000005f0 c8 99 20 22 57 69 6d 70 5f 53 65 74 4d 6f 64 65 |.. "Wimp_SetMode| 00000600 22 2c 6f 6c 64 6d 6f 64 65 25 3a e1 0d 02 76 05 |",oldmode%:...v.| 00000610 3a 0d 02 80 16 dd f2 6d 65 6e 75 73 65 6c 28 6f |:......menusel(o| 00000620 70 74 69 6f 6e 25 29 0d 02 8a 17 e7 20 6f 70 74 |ption%)..... opt| 00000630 69 6f 6e 25 3d 32 20 71 75 69 74 25 3d b9 0d 02 |ion%=2 quit%=...| 00000640 94 05 e1 0d 02 9e 05 3a 0d 02 a8 3c dd f2 6f 70 |.......:...<..op| 00000650 65 6e 77 69 6e 64 6f 77 28 68 61 6e 64 6c 65 25 |enwindow(handle%| 00000660 2c 78 30 25 2c 79 30 25 2c 78 31 25 2c 79 31 25 |,x0%,y0%,x1%,y1%| 00000670 2c 73 63 78 25 2c 73 63 79 25 2c 62 68 61 6e 64 |,scx%,scy%,bhand| 00000680 6c 65 25 29 0d 02 b2 14 e7 20 68 61 6e 64 6c 65 |le%)..... handle| 00000690 25 3d 2d 31 20 8c 20 e1 0d 02 bc 45 71 25 21 30 |%=-1 . ....Eq%!0| 000006a0 3d 68 61 6e 64 6c 65 25 3a 71 25 21 32 38 3d 62 |=handle%:q%!28=b| 000006b0 68 61 6e 64 6c 65 25 3a 71 25 21 34 3d 78 30 25 |handle%:q%!4=x0%| 000006c0 3a 71 25 21 38 3d 79 30 25 3a 71 25 21 31 32 3d |:q%!8=y0%:q%!12=| 000006d0 78 31 25 3a 71 25 21 31 36 3d 79 31 25 0d 02 c6 |x1%:q%!16=y1%...| 000006e0 32 71 25 21 32 30 3d 73 63 78 25 3a 71 25 21 32 |2q%!20=scx%:q%!2| 000006f0 34 3d 73 63 79 25 3a c8 99 20 22 57 69 6d 70 5f |4=scy%:.. "Wimp_| 00000700 4f 70 65 6e 57 69 6e 64 6f 77 22 2c 2c 71 25 0d |OpenWindow",,q%.| 00000710 02 d0 05 e1 0d 02 da 05 3a 0d 02 e4 11 dd f2 6d |........:......m| 00000720 6f 75 73 65 62 75 74 74 6f 6e 0d 02 ee 3d e7 20 |ousebutton...=. | 00000730 71 25 21 31 32 3d 2d 32 20 80 20 71 25 21 38 3d |q%!12=-2 . q%!8=| 00000740 32 20 f2 64 6f 6d 65 6e 75 28 31 30 31 2c 22 49 |2 .domenu(101,"I| 00000750 6e 66 6f 2c 47 61 6d 65 2c 51 75 69 74 22 2c 22 |nfo,Game,Quit","| 00000760 43 61 76 65 73 22 29 0d 02 f8 33 e7 20 71 25 21 |Caves")...3. q%!| 00000770 31 32 3d 2d 32 20 80 20 71 25 21 38 3d 34 20 80 |12=-2 . q%!8=4 .| 00000780 20 66 69 6c 65 73 74 61 74 24 3d 22 79 65 73 22 | filestat$="yes"| 00000790 20 f2 70 6c 61 79 67 61 6d 65 0d 03 02 2f e7 20 | .playgame.../. | 000007a0 71 25 21 31 32 3d 2d 32 20 80 20 71 25 21 38 3d |q%!12=-2 . q%!8=| 000007b0 34 20 80 20 66 69 6c 65 73 74 61 74 24 3d 22 6e |4 . filestat$="n| 000007c0 6f 22 20 f2 73 6f 72 72 79 0d 03 0c 05 e1 0d 03 |o" .sorry.......| 000007d0 16 05 3a 0d 03 20 0b dd f2 73 6f 72 72 79 0d 03 |..:.. ...sorry..| 000007e0 2a 8b 62 6c 6f 63 6b 25 21 30 3d 32 35 35 3a 24 |*.block%!0=255:$| 000007f0 28 62 6c 6f 63 6b 25 2b 34 29 3d 22 57 65 6c 63 |(block%+4)="Welc| 00000800 6f 6d 65 20 74 6f 20 63 61 76 65 73 20 6f 66 20 |ome to caves of | 00000810 64 6f 6f 6d 2e 54 6f 20 70 6c 61 79 20 61 20 67 |doom.To play a g| 00000820 61 6d 65 20 64 6f 75 62 6c 65 20 63 6c 69 63 6b |ame double click| 00000830 20 6f 6e 20 61 20 63 61 76 65 20 66 69 6c 65 20 | on a cave file | 00000840 6f 72 20 64 72 61 67 20 6f 6e 65 20 6f 6e 74 6f |or drag one onto| 00000850 20 6d 79 20 69 63 6f 6e 20 6f 6e 20 74 68 65 20 | my icon on the | 00000860 69 63 6f 6e 62 61 72 2e 22 0d 03 34 33 c8 99 20 |iconbar."..43.. | 00000870 22 57 69 6d 70 5f 52 65 70 6f 72 74 45 72 72 6f |"Wimp_ReportErro| 00000880 72 22 2c 62 6c 6f 63 6b 25 2c 31 37 2c 22 43 61 |r",block%,17,"Ca| 00000890 76 65 73 20 6f 66 20 44 6f 6f 6d 22 0d 03 3e 05 |ves of Doom"..>.| 000008a0 e1 0d 03 48 05 3a 0d 03 52 0b dd f2 65 72 72 6f |...H.:..R...erro| 000008b0 72 0d 03 5c 3b 21 71 25 3d 9f 3a 24 28 71 25 2b |r..\;!q%=.:$(q%+| 000008c0 34 29 3d f6 24 2b 22 20 28 69 6e 74 65 72 6e 61 |4)=.$+" (interna| 000008d0 6c 20 65 72 72 6f 72 20 6e 75 6d 62 65 72 20 22 |l error number "| 000008e0 2b c3 28 9e 29 2b 22 29 22 2b bd 30 0d 03 66 16 |+.(.)+")"+.0..f.| 000008f0 e7 20 9f 3d 32 35 35 20 24 28 71 25 2b 34 29 3d |. .=255 $(q%+4)=| 00000900 f6 24 0d 03 70 26 c8 99 20 22 57 69 6d 70 5f 52 |.$..p&.. "Wimp_R| 00000910 65 70 6f 72 74 45 72 72 6f 72 22 2c 71 25 2c 31 |eportError",q%,1| 00000920 2c 22 43 61 76 65 73 22 0d 03 7a 05 e1 0d 03 84 |,"Caves"..z.....| 00000930 05 3a 0d 03 8e 26 dd f2 64 6f 6d 65 6e 75 28 68 |.:...&..domenu(h| 00000940 61 6e 64 6c 65 25 2c 6d 65 6e 75 24 2c 6d 65 6e |andle%,menu$,men| 00000950 75 74 69 74 6c 65 24 29 0d 03 98 2d 6d 65 6e 75 |utitle$)...-menu| 00000960 68 61 6e 64 6c 65 25 3d 68 61 6e 64 6c 65 25 3a |handle%=handle%:| 00000970 6d 65 6e 75 70 74 72 25 3d 62 75 66 66 65 72 25 |menuptr%=buffer%| 00000980 3a 69 25 3d 30 0d 03 a2 27 6d 65 6e 75 70 74 72 |:i%=0...'menuptr| 00000990 25 21 32 30 3d 34 30 3a 24 6d 65 6e 75 70 74 72 |%!20=40:$menuptr| 000009a0 25 3d 6d 65 6e 75 74 69 74 6c 65 24 0d 03 ac 3b |%=menutitle$...;| 000009b0 6d 65 6e 75 70 74 72 25 3f 31 32 3d 37 3a 6d 65 |menuptr%?12=7:me| 000009c0 6e 75 70 74 72 25 3f 31 33 3d 32 3a 6d 65 6e 75 |nuptr%?13=2:menu| 000009d0 70 74 72 25 3f 31 34 3d 37 3a 6d 65 6e 75 70 74 |ptr%?14=7:menupt| 000009e0 72 25 3f 31 35 3d 30 0d 03 b6 2d 6d 65 6e 75 70 |r%?15=0...-menup| 000009f0 74 72 25 21 31 36 3d 39 36 3a 6d 65 6e 75 70 74 |tr%!16=96:menupt| 00000a00 72 25 21 32 34 3d 30 3a 6d 65 6e 75 70 74 72 25 |r%!24=0:menuptr%| 00000a10 2b 3d 32 38 0d 03 c0 31 f5 3a 69 74 65 6d 24 3d |+=28...1.:item$=| 00000a20 a4 70 61 72 28 22 2c 22 29 3a f2 6d 65 6e 75 69 |.par(","):.menui| 00000a30 74 65 6d 28 69 74 65 6d 24 29 3a fd 20 69 74 65 |tem(item$):. ite| 00000a40 6d 24 3d 22 22 0d 03 ca 25 6d 65 6e 75 70 74 72 |m$=""...%menuptr| 00000a50 25 21 2d 32 34 3d 28 6d 65 6e 75 70 74 72 25 21 |%!-24=(menuptr%!| 00000a60 2d 32 34 29 20 84 20 26 38 30 0d 03 d4 2d c8 99 |-24) . &80...-..| 00000a70 20 22 57 69 6d 70 5f 43 72 65 61 74 65 4d 65 6e | "Wimp_CreateMen| 00000a80 75 22 2c 2c 62 75 66 66 65 72 25 2c 71 25 21 30 |u",,buffer%,q%!0| 00000a90 2d 36 34 2c 32 34 38 0d 03 de 05 e1 0d 03 e8 05 |-64,248.........| 00000aa0 3a 0d 03 f2 16 dd 20 f2 6d 65 6e 75 69 74 65 6d |:..... .menuitem| 00000ab0 28 74 65 78 74 24 29 0d 03 fc 10 e7 20 74 65 78 |(text$)..... tex| 00000ac0 74 24 3d 22 22 20 e1 0d 04 06 47 21 6d 65 6e 75 |t$="" ....G!menu| 00000ad0 70 74 72 25 3d 30 3a 6d 65 6e 75 70 74 72 25 21 |ptr%=0:menuptr%!| 00000ae0 34 3d 2d 31 3a 6d 65 6e 75 70 74 72 25 21 38 3d |4=-1:menuptr%!8=| 00000af0 26 30 37 30 30 30 30 32 31 3a 24 28 6d 65 6e 75 |&07000021:$(menu| 00000b00 70 74 72 25 2b 31 32 29 3d 74 65 78 74 24 0d 04 |ptr%+12)=text$..| 00000b10 10 23 e7 20 74 65 78 74 24 3d 22 49 6e 66 6f 22 |.#. text$="Info"| 00000b20 20 6d 65 6e 75 70 74 72 25 21 34 3d 69 6e 66 6f | menuptr%!4=info| 00000b30 25 0d 04 1a 23 e7 20 74 65 78 74 24 3d 22 47 61 |%...#. text$="Ga| 00000b40 6d 65 22 20 6d 65 6e 75 70 74 72 25 21 34 3d 67 |me" menuptr%!4=g| 00000b50 61 6d 65 25 0d 04 24 12 6d 65 6e 75 70 74 72 25 |ame%..$.menuptr%| 00000b60 2b 3d 32 34 3a e1 0d 04 2e 05 3a 0d 04 38 0f dd |+=24:.....:..8..| 00000b70 a4 70 61 72 28 73 65 70 24 29 0d 04 42 25 69 31 |.par(sep$)..B%i1| 00000b80 25 3d 69 25 2b 31 3a 69 25 3d a7 6d 65 6e 75 24 |%=i%+1:i%=.menu$| 00000b90 2b 73 65 70 24 2c 73 65 70 24 2c 69 31 25 29 0d |+sep$,sep$,i1%).| 00000ba0 04 4c 17 3d c1 6d 65 6e 75 24 2c 69 31 25 2c 69 |.L.=.menu$,i1%,i| 00000bb0 25 2d 69 31 25 29 0d 04 56 05 3a 0d 04 60 0e dd |%-i1%)..V.:..`..| 00000bc0 f2 6c 6f 61 64 64 61 74 61 0d 04 6a 24 66 69 6c |.loaddata..j$fil| 00000bd0 65 73 74 61 74 24 3d 22 6e 6f 22 3a 2a 43 48 41 |estat$="no":*CHA| 00000be0 4e 4e 45 4c 56 4f 49 43 45 20 31 20 38 0d 04 74 |NNELVOICE 1 8..t| 00000bf0 23 c8 99 20 22 4f 53 5f 53 70 72 69 74 65 4f 70 |#.. "OS_SpriteOp| 00000c00 22 2c 32 36 35 2c 73 70 72 69 74 65 61 72 65 61 |",265,spritearea| 00000c10 0d 04 7e 3a c8 99 20 22 4f 53 5f 53 70 72 69 74 |..~:.. "OS_Sprit| 00000c20 65 4f 70 22 2c 32 36 36 2c 73 70 72 69 74 65 61 |eOp",266,spritea| 00000c30 72 65 61 2c 22 3c 43 61 76 65 73 24 44 69 72 3e |rea,"<Caves$Dir>| 00000c40 2e 43 61 76 65 53 70 72 73 22 0d 04 88 36 de 20 |.CaveSprs"...6. | 00000c50 70 61 73 73 24 28 35 29 3a de 20 73 63 72 65 65 |pass$(5):. scree| 00000c60 6e 25 20 31 36 3a 73 63 72 65 65 6e 25 21 30 3d |n% 16:screen%!0=| 00000c70 31 34 38 3a 73 63 72 65 65 6e 25 21 34 3d 2d 31 |148:screen%!4=-1| 00000c80 0d 04 92 21 de 20 69 6e 66 6f 77 69 6e 25 20 26 |...!. infowin% &| 00000c90 32 30 30 2c 67 61 6d 65 77 69 6e 25 20 26 32 30 |200,gamewin% &20| 00000ca0 30 0d 04 9c 33 c8 99 20 22 57 69 6d 70 5f 4f 70 |0...3.. "Wimp_Op| 00000cb0 65 6e 54 65 6d 70 6c 61 74 65 22 2c 2c 22 3c 43 |enTemplate",,"<C| 00000cc0 61 76 65 73 24 44 69 72 3e 2e 54 65 6d 70 6c 61 |aves$Dir>.Templa| 00000cd0 74 65 73 22 0d 04 a6 43 c8 99 20 22 57 69 6d 70 |tes"...C.. "Wimp| 00000ce0 5f 4c 6f 61 64 54 65 6d 70 6c 61 74 65 22 2c 2c |_LoadTemplate",,| 00000cf0 62 6c 6f 63 6b 25 2c 69 6e 66 6f 77 69 6e 25 2c |block%,infowin%,| 00000d00 69 6e 66 6f 77 69 6e 25 2b 26 32 30 30 2c 2d 31 |infowin%+&200,-1| 00000d10 2c 22 69 6e 66 6f 22 0d 04 b0 2a c8 99 20 22 57 |,"info"...*.. "W| 00000d20 69 6d 70 5f 43 72 65 61 74 65 57 69 6e 64 6f 77 |imp_CreateWindow| 00000d30 22 2c 2c 62 6c 6f 63 6b 25 20 b8 20 69 6e 66 6f |",,block% . info| 00000d40 25 0d 04 ba 43 c8 99 20 22 57 69 6d 70 5f 4c 6f |%...C.. "Wimp_Lo| 00000d50 61 64 54 65 6d 70 6c 61 74 65 22 2c 2c 62 6c 6f |adTemplate",,blo| 00000d60 63 6b 25 2c 67 61 6d 65 77 69 6e 25 2c 67 61 6d |ck%,gamewin%,gam| 00000d70 65 77 69 6e 25 2b 26 32 30 30 2c 2d 31 2c 22 67 |ewin%+&200,-1,"g| 00000d80 61 6d 65 22 0d 04 c4 2a c8 99 20 22 57 69 6d 70 |ame"...*.. "Wimp| 00000d90 5f 43 72 65 61 74 65 57 69 6e 64 6f 77 22 2c 2c |_CreateWindow",,| 00000da0 62 6c 6f 63 6b 25 20 b8 20 67 61 6d 65 25 0d 04 |block% . game%..| 00000db0 ce 1b c8 99 20 22 57 69 6d 70 5f 43 6c 6f 73 65 |.... "Wimp_Close| 00000dc0 54 65 6d 70 6c 61 74 65 22 0d 04 d8 20 e7 20 63 |Template"... . c| 00000dd0 6f 6d 6d 24 3c 3e 22 22 20 f2 6c 6f 61 64 67 61 |omm$<>"" .loadga| 00000de0 6d 65 28 63 6f 6d 6d 24 29 0d 04 e2 05 e1 0d 04 |me(comm$).......| 00000df0 ec 05 3a 0d 04 f6 19 dd f2 6c 6f 61 64 67 61 6d |..:......loadgam| 00000e00 65 28 66 69 6c 65 6e 61 6d 65 24 29 0d 05 00 2b |e(filename$)...+| 00000e10 ff 28 22 4c 4f 41 44 20 22 2b 66 69 6c 65 6e 61 |.("LOAD "+filena| 00000e20 6d 65 24 2b 22 20 22 2b c3 7e 6c 6f 61 64 67 61 |me$+" "+.~loadga| 00000e30 6d 65 66 69 6c 65 29 0d 05 0a 0c f2 67 65 74 70 |mefile).....getp| 00000e40 61 73 73 0d 05 14 45 67 61 6d 65 6e 61 6d 65 24 |ass...Egamename$| 00000e50 3d 24 67 61 6d 65 6e 61 6d 65 3a 67 61 6d 65 64 |=$gamename:gamed| 00000e60 65 73 69 67 6e 24 3d 24 67 61 6d 65 64 65 73 69 |esign$=$gamedesi| 00000e70 67 6e 65 72 3a 67 61 6d 65 74 69 6d 65 24 3d 24 |gner:gametime$=$| 00000e80 67 61 6d 65 74 69 6d 65 0d 05 1e 30 71 25 21 30 |gametime...0q%!0| 00000e90 3d 67 61 6d 65 25 3a 71 25 21 34 3d 35 3a c8 99 |=game%:q%!4=5:..| 00000ea0 20 22 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 74 | "Wimp_GetIconSt| 00000eb0 61 74 65 22 2c 2c 71 25 0d 05 28 40 24 28 71 25 |ate",,q%..(@$(q%| 00000ec0 21 32 38 29 3d 67 61 6d 65 6e 61 6d 65 24 3a 71 |!28)=gamename$:q| 00000ed0 25 21 38 3d 30 3a 71 25 21 31 32 3d 30 3a c8 99 |%!8=0:q%!12=0:..| 00000ee0 20 22 57 69 6d 70 5f 53 65 74 49 63 6f 6e 53 74 | "Wimp_SetIconSt| 00000ef0 61 74 65 22 2c 2c 71 25 0d 05 32 30 71 25 21 30 |ate",,q%..20q%!0| 00000f00 3d 67 61 6d 65 25 3a 71 25 21 34 3d 36 3a c8 99 |=game%:q%!4=6:..| 00000f10 20 22 57 69 6d 70 5f 47 65 74 49 63 6f 6e 53 74 | "Wimp_GetIconSt| 00000f20 61 74 65 22 2c 2c 71 25 0d 05 3c 42 24 28 71 25 |ate",,q%..<B$(q%| 00000f30 21 32 38 29 3d 67 61 6d 65 64 65 73 69 67 6e 24 |!28)=gamedesign$| 00000f40 3a 71 25 21 38 3d 30 3a 71 25 21 31 32 3d 30 3a |:q%!8=0:q%!12=0:| 00000f50 c8 99 20 22 57 69 6d 70 5f 53 65 74 49 63 6f 6e |.. "Wimp_SetIcon| 00000f60 53 74 61 74 65 22 2c 2c 71 25 0d 05 46 31 71 25 |State",,q%..F1q%| 00000f70 21 30 3d 67 61 6d 65 25 3a 71 25 21 34 3d 31 31 |!0=game%:q%!4=11| 00000f80 3a c8 99 20 22 57 69 6d 70 5f 47 65 74 49 63 6f |:.. "Wimp_GetIco| 00000f90 6e 53 74 61 74 65 22 2c 2c 71 25 0d 05 50 45 24 |nState",,q%..PE$| 00000fa0 28 71 25 21 32 38 29 3d c0 67 61 6d 65 74 69 6d |(q%!28)=.gametim| 00000fb0 65 24 2c 31 35 29 3a 71 25 21 38 3d 30 3a 71 25 |e$,15):q%!8=0:q%| 00000fc0 21 31 32 3d 30 3a c8 99 20 22 57 69 6d 70 5f 53 |!12=0:.. "Wimp_S| 00000fd0 65 74 49 63 6f 6e 53 74 61 74 65 22 2c 2c 71 25 |etIconState",,q%| 00000fe0 0d 05 5a 13 66 69 6c 65 73 74 61 74 24 3d 22 79 |..Z.filestat$="y| 00000ff0 65 73 22 0d 05 64 05 e1 0d 05 6e 05 3a 0d 05 78 |es"..d....n.:..x| 00001000 0d dd f2 70 61 6c 6c 65 74 65 0d 05 82 13 e3 20 |...pallete..... | 00001010 79 25 3d 30 20 b8 20 39 35 20 88 20 36 0d 05 8c |y%=0 . 95 . 6...| 00001020 63 ef 20 3f 28 70 61 6c 6c 65 74 65 2b 79 25 29 |c. ?(pallete+y%)| 00001030 2c 3f 28 70 61 6c 6c 65 74 65 2b 79 25 2b 31 29 |,?(pallete+y%+1)| 00001040 2c 3f 28 70 61 6c 6c 65 74 65 2b 79 25 2b 32 29 |,?(pallete+y%+2)| 00001050 2c 3f 28 70 61 6c 6c 65 74 65 2b 79 25 2b 33 29 |,?(pallete+y%+3)| 00001060 2c 3f 28 70 61 6c 6c 65 74 65 2b 79 25 2b 34 29 |,?(pallete+y%+4)| 00001070 2c 3f 28 70 61 6c 6c 65 74 65 2b 79 25 2b 35 29 |,?(pallete+y%+5)| 00001080 0d 05 96 07 ed 3a e1 0d 05 a0 05 3a 0d 05 aa 10 |.....:.....:....| 00001090 dd f2 72 65 61 64 73 63 72 65 65 6e 0d 05 b4 1b |..readscreen....| 000010a0 ff 22 46 58 20 31 31 32 2c 31 22 3a ff 22 46 58 |."FX 112,1":."FX| 000010b0 20 31 31 33 2c 31 22 0d 05 be 45 c8 99 20 22 4f | 113,1"...E.. "O| 000010c0 53 5f 52 65 61 64 56 64 75 56 61 72 69 61 62 6c |S_ReadVduVariabl| 000010d0 65 73 22 2c 73 63 72 65 65 6e 25 2c 73 63 72 65 |es",screen%,scre| 000010e0 65 6e 25 2b 38 3a 73 63 72 65 65 6e 73 74 61 72 |en%+8:screenstar| 000010f0 74 25 3d 73 63 72 65 65 6e 25 21 38 0d 05 c8 1b |t%=screen%!8....| 00001100 ff 22 46 58 20 31 31 32 2c 32 22 3a ff 22 46 58 |."FX 112,2":."FX| 00001110 20 31 31 33 2c 32 22 0d 05 d2 46 c8 99 20 22 4f | 113,2"...F.. "O| 00001120 53 5f 52 65 61 64 56 64 75 56 61 72 69 61 62 6c |S_ReadVduVariabl| 00001130 65 73 22 2c 73 63 72 65 65 6e 25 2c 73 63 72 65 |es",screen%,scre| 00001140 65 6e 25 2b 38 3a 73 63 72 65 65 6e 73 74 61 72 |en%+8:screenstar| 00001150 74 31 25 3d 73 63 72 65 65 6e 25 21 38 0d 05 dc |t1%=screen%!8...| 00001160 2b ff 22 46 58 20 31 31 32 2c 31 22 3a ff 22 46 |+."FX 112,1":."F| 00001170 58 20 31 31 33 2c 31 22 3a ef 32 33 3b 38 32 30 |X 113,1":.23;820| 00001180 32 3b 30 3b 30 3b 30 3b 0d 05 e6 3f fb 31 33 35 |2;0;0;0;...?.135| 00001190 3a 73 63 72 65 65 6e 73 74 61 72 74 21 30 3d 73 |:screenstart!0=s| 000011a0 63 72 65 65 6e 73 74 61 72 74 25 3a 73 63 72 65 |creenstart%:scre| 000011b0 65 6e 73 74 61 72 74 21 34 3d 73 63 72 65 65 6e |enstart!4=screen| 000011c0 73 74 61 72 74 31 25 0d 05 f0 05 e1 0d 05 fa 05 |start1%.........| 000011d0 3a 0d 06 04 0e dd f2 61 73 73 65 6d 62 6c 65 0d |:......assemble.| 000011e0 06 0e 11 de 20 63 6f 64 65 25 20 26 42 30 30 30 |.... code% &B000| 000011f0 0d 06 18 14 e3 20 6f 70 74 25 3d 30 20 b8 20 32 |..... opt%=0 . 2| 00001200 20 88 20 32 0d 06 22 16 50 25 3d 63 6f 64 65 25 | . 2..".P%=code%| 00001210 3a 5b 4f 50 54 20 6f 70 74 25 0d 06 2c 0d 2e 6d |:[OPT opt%..,..m| 00001220 61 69 6e 6c 69 6e 6b 0d 06 36 0a 45 51 55 44 20 |ainlink..6.EQUD | 00001230 30 0d 06 40 0d 2e 6d 61 69 6e 6c 6f 6f 70 0d 06 |0..@..mainloop..| 00001240 4a 14 53 54 52 20 52 31 34 2c 6d 61 69 6e 6c 69 |J.STR R14,mainli| 00001250 6e 6b 0d 06 54 0b 2e 69 6e 6c 6f 6f 70 0d 06 5e |nk..T..inloop..^| 00001260 0d 4d 4f 56 20 52 30 2c 23 30 0d 06 68 17 53 54 |.MOV R0,#0..h.ST| 00001270 52 20 52 30 2c 64 69 64 6d 61 70 73 63 72 6f 6c |R R0,didmapscrol| 00001280 6c 0d 06 72 3c 4d 4f 56 20 52 30 2c 23 31 32 31 |l..r<MOV R0,#121| 00001290 20 20 20 20 20 20 20 20 20 20 3b 20 4f 73 62 79 | ; Osby| 000012a0 74 65 20 6e 75 6d 62 65 72 20 31 32 31 20 2d 20 |te number 121 - | 000012b0 4b 65 79 62 6f 61 72 64 20 53 63 61 6e 0d 06 7c |Keyboard Scan..|| 000012c0 14 4d 4f 56 20 52 31 2c 23 37 39 20 84 20 26 38 |.MOV R1,#79 . &8| 000012d0 30 0d 06 86 11 53 57 49 20 22 4f 53 5f 42 79 74 |0....SWI "OS_Byt| 000012e0 65 22 0d 06 90 0f 43 4d 50 20 52 31 2c 23 26 46 |e"....CMP R1,#&F| 000012f0 46 0d 06 9a 13 42 4c 45 51 20 73 63 72 6f 6c 6c |F....BLEQ scroll| 00001300 64 6f 77 6e 0d 06 a4 15 4d 4f 56 20 52 31 2c 23 |down....MOV R1,#| 00001310 31 30 34 20 84 20 26 38 30 0d 06 ae 0f 4d 4f 56 |104 . &80....MOV| 00001320 20 52 30 2c 23 31 32 31 0d 06 b8 11 53 57 49 20 | R0,#121....SWI | 00001330 22 4f 53 5f 42 79 74 65 22 0d 06 c2 0f 43 4d 50 |"OS_Byte"....CMP| 00001340 20 52 31 2c 23 26 46 46 0d 06 cc 11 42 4c 45 51 | R1,#&FF....BLEQ| 00001350 20 73 63 72 6f 6c 6c 75 70 0d 06 d6 14 4d 4f 56 | scrollup....MOV| 00001360 20 52 31 2c 23 39 37 20 84 20 26 38 30 0d 06 e0 | R1,#97 . &80...| 00001370 0f 4d 4f 56 20 52 30 2c 23 31 32 31 0d 06 ea 11 |.MOV R0,#121....| 00001380 53 57 49 20 22 4f 53 5f 42 79 74 65 22 0d 06 f4 |SWI "OS_Byte"...| 00001390 0f 43 4d 50 20 52 31 2c 23 26 46 46 0d 06 fe 14 |.CMP R1,#&FF....| 000013a0 42 4c 45 51 20 73 63 72 6f 6c 6c 72 69 67 68 74 |BLEQ scrollright| 000013b0 0d 07 08 14 4d 4f 56 20 52 31 2c 23 36 36 20 84 |....MOV R1,#66 .| 000013c0 20 26 38 30 0d 07 12 0f 4d 4f 56 20 52 30 2c 23 | &80....MOV R0,#| 000013d0 31 32 31 0d 07 1c 11 53 57 49 20 22 4f 53 5f 42 |121....SWI "OS_B| 000013e0 79 74 65 22 0d 07 26 0f 43 4d 50 20 52 31 2c 23 |yte"..&.CMP R1,#| 000013f0 26 46 46 0d 07 30 13 42 4c 45 51 20 73 63 72 6f |&FF..0.BLEQ scro| 00001400 6c 6c 6c 65 66 74 0d 07 3a 05 3a 0d 07 44 12 42 |llleft..:.:..D.B| 00001410 4c 20 75 70 64 61 74 65 72 6f 63 6b 73 0d 07 4e |L updaterocks..N| 00001420 11 42 4c 20 73 63 72 65 65 6e 62 61 6e 6b 0d 07 |.BL screenbank..| 00001430 58 0e 42 4c 20 70 6c 6f 74 6d 61 70 0d 07 62 0e |X.BL plotmap..b.| 00001440 42 4c 20 70 6c 6f 74 68 69 6d 0d 07 6c 10 42 4c |BL plothim..l.BL| 00001450 20 63 6c 65 61 72 6b 65 79 73 0d 07 76 16 4c 44 | clearkeys..v.LD| 00001460 52 20 52 30 2c 66 69 6e 69 73 68 65 64 6d 61 70 |R R0,finishedmap| 00001470 0d 07 80 0d 43 4d 50 20 52 30 2c 23 31 0d 07 8a |....CMP R0,#1...| 00001480 11 42 45 51 20 65 6e 64 6f 66 67 61 6d 65 0d 07 |.BEQ endofgame..| 00001490 94 05 3a 0d 07 9e 3e 4d 4f 56 20 52 31 2c 23 39 |..:...>MOV R1,#9| 000014a0 36 20 84 20 26 38 30 20 20 20 20 20 20 20 20 20 |6 . &80 | 000014b0 3b 20 4c 6f 61 64 20 52 31 20 77 69 74 68 20 31 |; Load R1 with 1| 000014c0 31 32 20 84 20 26 38 30 20 28 39 36 3d 54 41 42 |12 . &80 (96=TAB| 000014d0 29 0d 07 a8 3b 4d 4f 56 20 52 30 2c 23 31 32 31 |)...;MOV R0,#121| 000014e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000014f0 3b 20 4f 53 42 59 54 45 20 31 32 31 20 2d 20 6b |; OSBYTE 121 - k| 00001500 65 79 62 6f 61 72 64 20 73 63 61 6e 0d 07 b2 2c |eyboard scan...,| 00001510 53 57 49 20 22 4f 53 5f 42 79 74 65 22 20 20 20 |SWI "OS_Byte" | 00001520 20 20 20 20 20 20 20 20 20 20 20 3b 20 43 61 6c | ; Cal| 00001530 6c 20 4f 53 42 59 54 45 0d 07 bc 0f 4c 44 52 20 |l OSBYTE....LDR | 00001540 52 30 2c 64 65 61 64 0d 07 c6 0f 43 4d 50 20 52 |R0,dead....CMP R| 00001550 31 2c 23 26 46 46 0d 07 d0 0c ec 51 20 52 30 2c |1,#&FF.....Q R0,| 00001560 23 31 0d 07 da 0f 53 54 52 20 52 30 2c 64 65 61 |#1....STR R0,dea| 00001570 64 0d 07 e4 3f 4c 44 52 20 52 30 2c 64 65 61 64 |d...?LDR R0,dead| 00001580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001590 3b 20 4c 6f 61 64 20 74 68 65 20 76 61 72 69 61 |; Load the varia| 000015a0 62 6c 65 20 64 65 61 64 20 69 6e 74 6f 20 52 30 |ble dead into R0| 000015b0 0d 07 ee 33 43 4d 50 20 52 30 2c 23 31 20 20 20 |...3CMP R0,#1 | 000015c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000015d0 20 49 73 20 74 68 65 20 70 6c 61 79 65 72 20 64 | Is the player d| 000015e0 65 61 64 0d 07 f8 11 42 45 51 20 65 6e 64 6f 66 |ead....BEQ endof| 000015f0 67 61 6d 65 0d 08 02 30 42 20 69 6e 6c 6f 6f 70 |game...0B inloop| 00001600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001610 20 20 20 3b 20 4c 6f 6f 70 20 62 61 63 6b 20 61 | ; Loop back a| 00001620 67 61 69 6e 0d 08 0c 0e 2e 65 6e 64 6f 66 67 61 |gain.....endofga| 00001630 6d 65 0d 08 16 11 42 4c 20 73 63 72 65 65 6e 62 |me....BL screenb| 00001640 61 6e 6b 0d 08 20 0e 42 4c 20 70 6c 6f 74 6d 61 |ank.. .BL plotma| 00001650 70 0d 08 2a 0e 42 4c 20 70 6c 6f 74 68 69 6d 0d |p..*.BL plothim.| 00001660 08 34 0f 4c 44 52 20 52 30 2c 64 65 61 64 0d 08 |.4.LDR R0,dead..| 00001670 3e 0d 43 4d 50 20 52 30 2c 23 31 0d 08 48 17 42 |>.CMP R0,#1..H.B| 00001680 4c 45 51 20 64 65 61 74 68 61 6e 69 6d 61 74 69 |LEQ deathanimati| 00001690 6f 6e 0d 08 52 14 4c 44 52 20 52 31 34 2c 6d 61 |on..R.LDR R14,ma| 000016a0 69 6e 6c 69 6e 6b 0d 08 5c 0e 4d 4f 56 20 50 43 |inlink..\.MOV PC| 000016b0 2c 52 31 34 0d 08 66 05 3a 0d 08 70 0f 2e 65 61 |,R14..f.:..p..ea| 000016c0 72 74 68 63 6f 75 6e 74 0d 08 7a 0a 45 51 55 44 |rthcount..z.EQUD| 000016d0 20 30 0d 08 84 0e 2e 67 6f 6c 64 63 6f 75 6e 74 | 0.....goldcount| 000016e0 0d 08 8e 0a 45 51 55 44 20 30 0d 08 98 0e 2e 67 |....EQUD 0.....g| 000016f0 6f 6c 64 74 6f 74 61 6c 0d 08 a2 0a 45 51 55 44 |oldtotal....EQUD| 00001700 20 30 0d 08 ac 0a 2e 6c 65 76 65 6c 0d 08 b6 0a | 0.....level....| 00001710 45 51 55 44 20 30 0d 08 c0 09 2e 64 65 61 64 0d |EQUD 0.....dead.| 00001720 08 ca 0a 45 51 55 44 20 30 0d 08 d4 0a 2e 6c 69 |...EQUD 0.....li| 00001730 76 65 73 0d 08 de 0a 45 51 55 44 20 33 0d 08 e8 |ves....EQUD 3...| 00001740 10 2e 66 69 6e 69 73 68 65 64 6d 61 70 0d 08 f2 |..finishedmap...| 00001750 0a 45 51 55 44 20 30 0d 08 fc 0d 2e 6d 6f 76 65 |.EQUD 0.....move| 00001760 6c 69 6e 6b 0d 09 06 0a 45 51 55 44 20 30 0d 09 |link....EQUD 0..| 00001770 10 12 2e 73 63 72 6f 6c 6c 63 6f 75 6e 74 65 72 |...scrollcounter| 00001780 0d 09 1a 0a 45 51 55 44 20 30 0d 09 24 0b 2e 78 |....EQUD 0..$..x| 00001790 73 74 6f 72 65 0d 09 2e 0a 45 51 55 44 20 30 0d |store....EQUD 0.| 000017a0 09 38 0b 2e 79 73 74 6f 72 65 0d 09 42 0a 45 51 |.8..ystore..B.EQ| 000017b0 55 44 20 30 0d 09 4c 0b 2e 72 65 73 75 6c 74 0d |UD 0..L..result.| 000017c0 09 56 0a 45 51 55 44 20 30 0d 09 60 0e 2e 63 61 |.V.EQUD 0..`..ca| 000017d0 6e 68 65 6d 6f 76 65 0d 09 6a 0a 45 51 55 44 20 |nhemove..j.EQUD | 000017e0 30 0d 09 74 0c 2e 6e 65 77 74 69 6c 65 0d 09 7e |0..t..newtile..~| 000017f0 0a 45 51 55 44 20 30 0d 09 88 05 3a 0d 09 92 0e |.EQUD 0....:....| 00001800 2e 72 6f 63 6b 73 6c 69 6e 6b 0d 09 9c 0a 45 51 |.rockslink....EQ| 00001810 55 44 20 30 0d 09 a6 0e 2e 75 70 64 61 74 65 6d |UD 0.....updatem| 00001820 61 70 0d 09 b0 0a 45 51 55 44 20 30 0d 09 ba 0d |ap....EQUD 0....| 00001830 2e 65 6e 64 6f 66 6d 61 70 0d 09 c4 0e 45 51 55 |.endofmap....EQU| 00001840 44 20 32 37 2a 34 30 0d 09 ce 05 3a 0d 09 d8 13 |D 27*40....:....| 00001850 2e 64 65 61 74 68 61 6e 69 6d 61 74 69 6f 6e 0d |.deathanimation.| 00001860 09 e2 15 53 54 52 20 52 31 34 2c 72 6f 63 6b 73 |...STR R14,rocks| 00001870 6c 69 6e 6b 0d 09 ec 30 4d 4f 56 20 52 30 2c 23 |link...0MOV R0,#| 00001880 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |1 | 00001890 20 20 20 20 20 20 20 20 20 3b 20 43 68 61 6e 6e | ; Chann| 000018a0 65 6c 20 31 0d 09 f6 31 4d 4f 56 20 52 31 2c 23 |el 1...1MOV R1,#| 000018b0 31 35 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |15 | 000018c0 20 20 20 20 20 20 20 20 20 3b 20 56 6f 6c 75 6d | ; Volum| 000018d0 65 20 2b 31 35 0d 0a 00 41 52 53 42 20 52 31 2c |e +15...ARSB R1,| 000018e0 52 31 2c 23 30 20 20 20 20 20 20 20 20 20 20 20 |R1,#0 | 000018f0 20 20 20 20 20 20 20 20 20 20 3b 20 4d 61 6b 65 | ; Make| 00001900 20 76 6f 6c 75 6d 65 20 6e 65 67 61 74 69 76 65 | volume negative| 00001910 20 28 2d 31 35 29 0d 0a 0a 30 4d 4f 56 20 52 32 | (-15)...0MOV R2| 00001920 2c 23 32 30 30 20 20 20 20 20 20 20 20 20 20 20 |,#200 | 00001930 20 20 20 20 20 20 20 20 20 20 20 3b 20 50 69 74 | ; Pit| 00001940 63 68 20 32 30 30 0d 0a 14 32 4d 4f 56 20 52 33 |ch 200...2MOV R3| 00001950 2c 23 34 20 20 20 20 20 20 20 20 20 20 20 20 20 |,#4 | 00001960 20 20 20 20 20 20 20 20 20 20 20 3b 20 44 75 72 | ; Dur| 00001970 61 74 69 6f 6e 20 34 30 0d 0a 1e 39 53 57 49 20 |ation 40...9SWI | 00001980 22 53 6f 75 6e 64 5f 43 6f 6e 74 72 6f 6c 22 20 |"Sound_Control" | 00001990 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 47 | ; G| 000019a0 65 6e 65 72 61 74 65 20 74 68 65 20 73 6f 75 6e |enerate the soun| 000019b0 64 0d 0a 28 47 4d 4f 56 20 52 30 2c 23 38 20 20 |d..(GMOV R0,#8 | 000019c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000019d0 20 20 20 20 20 20 3b 20 53 65 74 20 72 30 20 74 | ; Set r0 t| 000019e0 6f 20 38 20 28 64 69 72 65 63 74 69 6f 6e 20 38 |o 8 (direction 8| 000019f0 20 3d 20 64 65 61 64 29 0d 0a 32 47 53 54 52 20 | = dead)..2GSTR | 00001a00 52 30 2c 64 69 72 65 63 74 69 6f 6e 20 20 20 20 |R0,direction | 00001a10 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 41 | ; A| 00001a20 6e 64 20 70 75 74 20 38 20 69 6e 74 6f 20 74 68 |nd put 8 into th| 00001a30 65 20 76 61 72 20 64 69 72 65 63 74 69 6f 6e 0d |e var direction.| 00001a40 0a 3c 0d 4d 4f 56 20 52 30 2c 23 30 0d 0a 46 10 |.<.MOV R0,#0..F.| 00001a50 53 54 52 20 52 30 2c 66 72 61 6d 65 0d 0a 50 10 |STR R0,frame..P.| 00001a60 42 4c 20 72 6f 63 6b 73 6f 75 6e 64 0d 0a 5a 10 |BL rocksound..Z.| 00001a70 42 4c 20 66 6f 75 72 73 79 6e 63 73 0d 0a 64 11 |BL foursyncs..d.| 00001a80 42 4c 20 73 63 72 65 65 6e 62 61 6e 6b 0d 0a 6e |BL screenbank..n| 00001a90 0e 42 4c 20 70 6c 6f 74 6d 61 70 0d 0a 78 0e 42 |.BL plotmap..x.B| 00001aa0 4c 20 70 6c 6f 74 68 69 6d 0d 0a 82 10 42 4c 20 |L plothim....BL | 00001ab0 66 6f 75 72 73 79 6e 63 73 0d 0a 8c 0f 42 4c 20 |foursyncs....BL | 00001ac0 6e 65 77 66 72 61 6d 65 0d 0a 96 11 42 4c 20 73 |newframe....BL s| 00001ad0 63 72 65 65 6e 62 61 6e 6b 0d 0a a0 0e 42 4c 20 |creenbank....BL | 00001ae0 70 6c 6f 74 6d 61 70 0d 0a aa 0e 42 4c 20 70 6c |plotmap....BL pl| 00001af0 6f 74 68 69 6d 0d 0a b4 11 42 4c 20 73 63 72 65 |othim....BL scre| 00001b00 65 6e 62 61 6e 6b 0d 0a be 10 42 4c 20 66 6f 75 |enbank....BL fou| 00001b10 72 73 79 6e 63 73 0d 0a c8 0e 42 4c 20 70 6c 6f |rsyncs....BL plo| 00001b20 74 6d 61 70 0d 0a d2 11 42 4c 20 73 63 72 65 65 |tmap....BL scree| 00001b30 6e 62 61 6e 6b 0d 0a dc 10 42 4c 20 66 6f 75 72 |nbank....BL four| 00001b40 73 79 6e 63 73 0d 0a e6 0e 42 4c 20 70 6c 6f 74 |syncs....BL plot| 00001b50 6d 61 70 0d 0a f0 15 4c 44 52 20 52 31 34 2c 72 |map....LDR R14,r| 00001b60 6f 63 6b 73 6c 69 6e 6b 0d 0a fa 0e 4d 4f 56 20 |ockslink....MOV | 00001b70 50 43 2c 52 31 34 0d 0b 04 05 3a 0d 0b 0e 0e 2e |PC,R14....:.....| 00001b80 72 6f 63 6b 73 6f 75 6e 64 0d 0b 18 30 4d 4f 56 |rocksound...0MOV| 00001b90 20 52 30 2c 23 31 20 20 20 20 20 20 20 20 20 20 | R0,#1 | 00001ba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00001bb0 43 68 61 6e 6e 65 6c 20 31 0d 0b 22 31 4d 4f 56 |Channel 1.."1MOV| 00001bc0 20 52 31 2c 23 31 35 20 20 20 20 20 20 20 20 20 | R1,#15 | 00001bd0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00001be0 56 6f 6c 75 6d 65 20 2b 31 35 0d 0b 2c 41 52 53 |Volume +15..,ARS| 00001bf0 42 20 52 31 2c 52 31 2c 23 30 20 20 20 20 20 20 |B R1,R1,#0 | 00001c00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00001c10 20 4d 61 6b 65 20 76 6f 6c 75 6d 65 20 6e 65 67 | Make volume neg| 00001c20 61 74 69 76 65 20 28 2d 31 35 29 0d 0b 36 30 4d |ative (-15)..60M| 00001c30 4f 56 20 52 32 2c 23 32 30 30 20 20 20 20 20 20 |OV R2,#200 | 00001c40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001c50 3b 20 50 69 74 63 68 20 32 30 30 0d 0b 40 32 4d |; Pitch 200..@2M| 00001c60 4f 56 20 52 33 2c 23 34 20 20 20 20 20 20 20 20 |OV R3,#4 | 00001c70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001c80 3b 20 44 75 72 61 74 69 6f 6e 20 31 30 0d 0b 4a |; Duration 10..J| 00001c90 39 53 57 49 20 22 53 6f 75 6e 64 5f 43 6f 6e 74 |9SWI "Sound_Cont| 00001ca0 72 6f 6c 22 20 20 20 20 20 20 20 20 20 20 20 20 |rol" | 00001cb0 20 20 3b 20 47 65 6e 65 72 61 74 65 20 74 68 65 | ; Generate the| 00001cc0 20 73 6f 75 6e 64 0d 0b 54 0e 4d 4f 56 20 50 43 | sound..T.MOV PC| 00001cd0 2c 52 31 34 0d 0b 5e 12 2e 63 6f 75 6e 74 64 69 |,R14..^..countdi| 00001ce0 61 6d 6f 6e 64 73 0d 0b 68 15 4c 44 52 20 52 30 |amonds..h.LDR R0| 00001cf0 2c 6d 61 70 70 6f 69 6e 74 65 72 0d 0b 72 49 4d |,mappointer..rIM| 00001d00 4f 56 20 52 31 2c 23 30 20 20 20 20 20 20 20 20 |OV R1,#0 | 00001d10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001d20 3b 20 53 65 74 20 74 68 65 20 6e 75 6d 62 65 72 |; Set the number| 00001d30 20 6f 66 20 64 69 61 6d 6f 6e 64 73 20 74 6f 20 | of diamonds to | 00001d40 7a 65 72 6f 0d 0b 7c 40 4d 4f 56 20 52 32 2c 23 |zero..|@MOV R2,#| 00001d50 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0 | 00001d60 20 20 20 20 20 20 20 20 20 3b 20 53 65 74 20 74 | ; Set t| 00001d70 68 65 20 79 20 63 6f 75 6e 74 65 72 20 74 6f 20 |he y counter to | 00001d80 7a 65 72 6f 0d 0b 86 0f 2e 79 63 6f 75 6e 74 6c |zero.....ycountl| 00001d90 6f 6f 70 0d 0b 90 40 4d 4f 56 20 52 33 2c 23 30 |oop...@MOV R3,#0| 00001da0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001db0 20 20 20 20 20 20 20 20 3b 20 53 65 74 20 74 68 | ; Set th| 00001dc0 65 20 78 20 63 6f 75 6e 74 65 72 20 74 6f 20 7a |e x counter to z| 00001dd0 65 72 6f 0d 0b 9a 0f 2e 78 63 6f 75 6e 74 6c 6f |ero.....xcountlo| 00001de0 6f 70 0d 0b a4 3a 4c 44 52 42 20 52 34 2c 5b 52 |op...:LDRB R4,[R| 00001df0 30 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0] | 00001e00 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 61 20 | ; Load a | 00001e10 74 69 6c 65 20 69 6e 74 6f 20 52 34 0d 0b ae 3f |tile into R4...?| 00001e20 41 44 44 20 52 30 2c 52 30 2c 23 31 20 20 20 20 |ADD R0,R0,#1 | 00001e30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001e40 20 3b 20 41 64 64 20 31 20 74 6f 20 74 68 65 20 | ; Add 1 to the | 00001e50 6d 61 70 20 70 6f 69 6e 74 65 72 0d 0b b8 3e 43 |map pointer...>C| 00001e60 4d 50 20 52 34 2c 23 33 32 2b 31 39 20 20 20 20 |MP R4,#32+19 | 00001e70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001e80 3b 20 49 73 20 74 68 65 20 74 69 6c 65 20 61 20 |; Is the tile a | 00001e90 64 69 61 6d 6f 6e 64 20 3f 0d 0b c2 4a 41 44 44 |diamond ?...JADD| 00001ea0 45 51 20 52 31 2c 52 31 2c 23 31 20 20 20 20 20 |EQ R1,R1,#1 | 00001eb0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00001ec0 49 66 20 79 65 73 20 61 64 64 20 31 20 74 6f 20 |If yes add 1 to | 00001ed0 74 68 65 20 64 69 61 6d 6f 6e 64 20 63 6f 75 6e |the diamond coun| 00001ee0 74 65 72 0d 0b cc 3d 41 44 44 20 52 33 2c 52 33 |ter...=ADD R3,R3| 00001ef0 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 20 20 |,#1 | 00001f00 20 20 20 20 20 20 20 20 3b 20 41 64 64 20 31 20 | ; Add 1 | 00001f10 74 6f 20 74 68 65 20 78 20 63 6f 75 6e 74 65 72 |to the x counter| 00001f20 0d 0b d6 3e 43 4d 50 20 52 33 2c 23 34 30 20 20 |...>CMP R3,#40 | 00001f30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001f40 20 20 20 20 20 3b 20 49 73 20 61 20 6c 69 6e 65 | ; Is a line| 00001f50 20 73 63 61 6e 6e 65 64 20 79 65 74 20 3f 0d 0b | scanned yet ?..| 00001f60 e0 12 42 4e 45 20 78 63 6f 75 6e 74 6c 6f 6f 70 |..BNE xcountloop| 00001f70 0d 0b ea 3d 41 44 44 20 52 32 2c 52 32 2c 23 31 |...=ADD R2,R2,#1| 00001f80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001f90 20 20 20 20 20 3b 20 41 64 64 20 31 20 74 6f 20 | ; Add 1 to | 00001fa0 74 68 65 20 79 20 63 6f 75 6e 74 65 72 0d 0b f4 |the y counter...| 00001fb0 45 43 4d 50 20 52 32 2c 23 32 38 20 20 20 20 20 |ECMP R2,#28 | 00001fc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001fd0 20 20 3b 20 48 61 73 20 74 68 65 20 6d 61 70 20 | ; Has the map | 00001fe0 62 65 65 6e 20 73 63 61 6e 6e 65 64 20 79 65 74 |been scanned yet| 00001ff0 20 3f 0d 0b fe 12 42 4e 45 20 79 63 6f 75 6e 74 | ?....BNE ycount| 00002000 6c 6f 6f 70 0d 0c 08 4b 53 54 52 20 52 31 2c 67 |loop...KSTR R1,g| 00002010 6f 6c 64 74 6f 74 61 6c 20 20 20 20 20 20 20 20 |oldtotal | 00002020 20 20 20 20 20 20 20 20 20 3b 20 53 74 6f 72 65 | ; Store| 00002030 20 74 68 65 20 64 69 61 6d 6f 6e 64 20 63 6f 75 | the diamond cou| 00002040 6e 74 20 61 74 20 67 6f 6c 64 74 6f 74 61 6c 0d |nt at goldtotal.| 00002050 0c 12 0e 4d 4f 56 20 50 43 2c 52 31 34 0d 0c 1c |...MOV PC,R14...| 00002060 05 3a 0d 0c 26 0d 2e 6e 65 77 66 72 61 6d 65 0d |.:..&..newframe.| 00002070 0c 30 10 4c 44 52 20 52 30 2c 66 72 61 6d 65 0d |.0.LDR R0,frame.| 00002080 0c 3a 0d 43 4d 50 20 52 30 2c 23 31 0d 0c 44 0c |.:.CMP R0,#1..D.| 00002090 ec 51 20 52 30 2c 23 30 0d 0c 4e 0f 4d 4f 56 4e |.Q R0,#0..N.MOVN| 000020a0 45 20 52 30 2c 23 31 0d 0c 58 10 53 54 52 20 52 |E R0,#1..X.STR R| 000020b0 30 2c 66 72 61 6d 65 0d 0c 62 0e 4d 4f 56 20 50 |0,frame..b.MOV P| 000020c0 43 2c 52 31 34 0d 0c 6c 05 3a 0d 0c 76 10 2e 75 |C,R14..l.:..v..u| 000020d0 70 64 61 74 65 72 6f 63 6b 73 0d 0c 80 4b 53 54 |pdaterocks...KST| 000020e0 52 20 52 31 34 2c 72 6f 63 6b 73 6c 69 6e 6b 20 |R R14,rockslink | 000020f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00002100 20 53 74 6f 72 65 20 74 68 65 20 6c 69 6e 6b 20 | Store the link | 00002110 72 65 67 69 73 74 65 72 20 69 6e 20 72 6f 63 6b |register in rock| 00002120 73 6c 69 6e 6b 0d 0c 8a 48 4c 44 52 20 52 35 2c |slink...HLDR R5,| 00002130 78 6d 61 70 70 6f 73 3a 41 44 44 20 52 35 2c 52 |xmappos:ADD R5,R| 00002140 35 2c 23 33 20 20 20 20 20 20 3b 20 53 65 74 20 |5,#3 ; Set | 00002150 52 35 20 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 |R5 to point to t| 00002160 68 65 20 6d 61 6e 73 20 78 20 70 6f 73 0d 0c 94 |he mans x pos...| 00002170 48 4c 44 52 20 52 36 2c 79 6d 61 70 70 6f 73 3a |HLDR R6,ymappos:| 00002180 41 44 44 20 52 36 2c 52 36 2c 23 33 20 20 20 20 |ADD R6,R6,#3 | 00002190 20 20 3b 20 53 65 74 20 52 36 20 74 6f 20 70 6f | ; Set R6 to po| 000021a0 69 6e 74 20 74 6f 20 74 68 65 20 6d 61 6e 73 20 |int to the mans | 000021b0 79 20 70 6f 73 0d 0c 9e 11 53 54 52 20 52 35 2c |y pos....STR R5,| 000021c0 78 73 74 6f 72 65 0d 0c a8 11 53 54 52 20 52 36 |xstore....STR R6| 000021d0 2c 79 73 74 6f 72 65 0d 0c b2 0e 4d 4f 56 20 52 |,ystore....MOV R| 000021e0 30 2c 23 32 38 0d 0c bc 12 53 54 52 20 52 30 2c |0,#28....STR R0,| 000021f0 6e 65 77 74 69 6c 65 0d 0c c6 11 42 4c 20 63 68 |newtile....BL ch| 00002200 61 6e 67 65 74 69 6c 65 0d 0c d0 3d 4c 44 52 20 |angetile...=LDR | 00002210 52 31 30 2c 6d 61 70 70 6f 69 6e 74 65 72 20 20 |R10,mappointer | 00002220 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 52 | ; R| 00002230 31 30 20 70 6f 69 6e 74 73 20 74 6f 20 6d 61 70 |10 points to map| 00002240 20 64 61 74 61 0d 0c da 4a 4c 44 52 20 52 31 31 | data...JLDR R11| 00002250 2c 65 6e 64 6f 66 6d 61 70 20 20 20 20 20 20 20 |,endofmap | 00002260 20 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 | ; Load| 00002270 20 52 31 31 20 77 69 74 68 20 74 68 65 20 76 61 | R11 with the va| 00002280 6c 75 65 20 6f 66 20 65 6e 64 6f 66 6d 61 70 0d |lue of endofmap.| 00002290 0c e4 4b 41 44 44 20 52 31 30 2c 52 31 30 2c 52 |..KADD R10,R10,R| 000022a0 31 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |11 | 000022b0 20 20 20 20 3b 20 41 64 64 20 74 68 65 20 6d 61 | ; Add the ma| 000022c0 70 20 79 20 70 6f 69 6e 74 65 72 20 74 6f 20 6d |p y pointer to m| 000022d0 61 70 20 70 6f 69 6e 74 65 72 0d 0c ee 42 4d 4f |ap pointer...BMO| 000022e0 56 20 52 39 2c 23 32 37 20 20 20 20 20 20 20 20 |V R9,#27 | 000022f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00002300 20 53 65 74 20 74 68 65 20 6d 61 70 20 79 20 63 | Set the map y c| 00002310 6f 75 6e 74 65 72 20 74 6f 20 32 37 0d 0c f8 0e |ounter to 27....| 00002320 2e 79 72 6f 63 6b 6c 6f 6f 70 0d 0d 02 41 4d 4f |.yrockloop...AMO| 00002330 56 20 52 38 2c 23 30 20 20 20 20 20 20 20 20 20 |V R8,#0 | 00002340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00002350 20 53 65 74 20 74 68 65 20 78 20 6d 61 70 20 63 | Set the x map c| 00002360 6f 75 6e 74 65 72 20 74 6f 20 30 0d 0d 0c 0e 2e |ounter to 0.....| 00002370 78 72 6f 63 6b 6c 6f 6f 70 0d 0d 16 3b 4c 44 52 |xrockloop...;LDR| 00002380 42 20 52 31 31 2c 5b 52 31 30 5d 20 20 20 20 20 |B R11,[R10] | 00002390 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 000023a0 4c 6f 61 64 20 61 20 74 69 6c 65 20 69 6e 74 6f |Load a tile into| 000023b0 20 52 31 31 0d 0d 20 39 43 4d 50 20 52 31 31 2c | R11.. 9CMP R11,| 000023c0 23 33 2b 33 32 20 20 20 20 20 20 20 20 20 20 20 |#3+32 | 000023d0 20 20 20 20 20 20 20 20 20 3b 20 49 73 20 74 68 | ; Is th| 000023e0 65 20 74 69 6c 65 20 61 20 72 6f 63 6b 0d 0d 2a |e tile a rock..*| 000023f0 38 42 4c 45 51 20 72 6f 63 6b 66 6f 75 6e 64 20 |8BLEQ rockfound | 00002400 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002410 20 20 3b 20 49 66 20 69 74 20 69 73 20 63 68 65 | ; If it is che| 00002420 63 6b 20 69 74 0d 0d 34 46 53 55 42 20 52 31 30 |ck it..4FSUB R10| 00002430 2c 52 31 30 2c 23 31 20 20 20 20 20 20 20 20 20 |,R10,#1 | 00002440 20 20 20 20 20 20 20 20 20 20 3b 20 53 75 62 74 | ; Subt| 00002450 72 61 63 74 20 31 20 66 72 6f 6d 20 74 68 65 20 |ract 1 from the | 00002460 6d 61 70 20 70 6f 69 6e 74 65 72 0d 0d 3e 41 41 |map pointer..>AA| 00002470 44 44 20 52 38 2c 52 38 2c 23 31 20 20 20 20 20 |DD R8,R8,#1 | 00002480 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002490 3b 20 41 64 64 20 31 20 74 6f 20 74 68 65 20 78 |; Add 1 to the x| 000024a0 20 6d 61 70 20 63 6f 75 6e 74 65 72 0d 0d 48 44 | map counter..HD| 000024b0 43 4d 50 20 52 38 2c 23 34 30 20 20 20 20 20 20 |CMP R8,#40 | 000024c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000024d0 20 3b 20 49 73 20 74 68 61 74 20 74 68 65 20 65 | ; Is that the e| 000024e0 6e 64 20 6f 66 20 74 68 65 20 6c 69 6e 65 20 3f |nd of the line ?| 000024f0 0d 0d 52 37 42 4e 45 20 78 72 6f 63 6b 6c 6f 6f |..R7BNE xrockloo| 00002500 70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |p | 00002510 20 20 20 20 20 3b 20 49 66 20 6e 6f 74 20 6c 6f | ; If not lo| 00002520 6f 70 20 62 61 63 6b 0d 0d 5c 48 53 55 42 20 52 |op back..\HSUB R| 00002530 39 2c 52 39 2c 23 31 20 20 20 20 20 20 20 20 20 |9,R9,#1 | 00002540 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 75 | ; Su| 00002550 62 74 72 61 63 74 20 31 20 66 72 6f 6d 20 74 68 |btract 1 from th| 00002560 65 20 79 20 6d 61 70 20 63 6f 75 6e 74 65 72 0d |e y map counter.| 00002570 0d 66 49 43 4d 4e 20 52 39 2c 23 31 20 20 20 20 |.fICMN R9,#1 | 00002580 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002590 20 20 20 20 3b 20 48 61 73 20 74 68 65 20 79 20 | ; Has the y | 000025a0 63 6f 75 6e 74 65 72 20 72 65 61 63 68 65 64 20 |counter reached | 000025b0 2d 31 20 79 65 74 20 3f 0d 0d 70 37 42 4e 45 20 |-1 yet ?..p7BNE | 000025c0 79 72 6f 63 6b 6c 6f 6f 70 20 20 20 20 20 20 20 |yrockloop | 000025d0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 | ; I| 000025e0 66 20 6e 6f 74 20 6c 6f 6f 70 20 62 61 63 6b 0d |f not loop back.| 000025f0 0d 7a 0d 4d 4f 56 20 52 30 2c 23 30 0d 0d 84 12 |.z.MOV R0,#0....| 00002600 53 54 52 20 52 30 2c 6e 65 77 74 69 6c 65 0d 0d |STR R0,newtile..| 00002610 8e 11 42 4c 20 63 68 61 6e 67 65 74 69 6c 65 0d |..BL changetile.| 00002620 0d 98 3f 4c 44 52 20 52 31 34 2c 72 6f 63 6b 73 |..?LDR R14,rocks| 00002630 6c 69 6e 6b 20 20 20 20 20 20 20 20 20 20 20 20 |link | 00002640 20 20 20 20 3b 20 52 65 6c 6f 61 64 20 74 68 65 | ; Reload the| 00002650 20 6c 69 6e 6b 20 72 65 67 69 73 74 65 72 0d 0d | link register..| 00002660 a2 0e 4d 4f 56 20 50 43 2c 52 31 34 0d 0d ac 05 |..MOV PC,R14....| 00002670 3a 0d 0d b6 0e 2e 72 6f 63 6b 66 6f 75 6e 64 0d |:.....rockfound.| 00002680 0d c0 48 4d 4f 56 20 52 30 2c 52 31 30 20 20 20 |..HMOV R0,R10 | 00002690 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000026a0 20 20 20 20 3b 20 50 75 74 20 74 68 65 20 61 64 | ; Put the ad| 000026b0 64 72 65 73 73 20 6f 66 20 74 68 65 20 72 6f 63 |dress of the roc| 000026c0 6b 20 69 6e 20 52 30 0d 0d ca 4c 41 44 44 20 52 |k in R0...LADD R| 000026d0 30 2c 52 30 2c 23 34 30 20 20 20 20 20 20 20 20 |0,R0,#40 | 000026e0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 47 65 | ; Ge| 000026f0 74 20 74 68 65 20 61 64 64 72 65 73 73 20 31 20 |t the address 1 | 00002700 74 69 6c 65 20 62 65 6c 6f 77 20 74 68 65 20 72 |tile below the r| 00002710 6f 63 6b 0d 0d d4 47 4c 44 52 42 20 52 31 31 2c |ock...GLDRB R11,| 00002720 5b 52 30 5d 20 20 20 20 20 20 20 20 20 20 20 20 |[R0] | 00002730 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 74 | ; Load t| 00002740 68 65 20 74 69 6c 65 20 66 72 6f 6d 20 74 68 65 |he tile from the| 00002750 72 65 20 69 6e 74 6f 20 52 30 0d 0d de 42 43 4d |re into R0...BCM| 00002760 50 20 52 31 31 2c 23 33 32 2b 30 20 20 20 20 20 |P R11,#32+0 | 00002770 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00002780 20 49 73 20 74 68 65 20 74 69 6c 65 20 61 20 62 | Is the tile a b| 00002790 6c 61 6e 6b 20 73 70 61 63 65 20 3f 0d 0d e8 11 |lank space ?....| 000027a0 42 4e 45 20 6e 6f 74 61 62 6c 61 6e 6b 0d 0d f2 |BNE notablank...| 000027b0 47 53 54 52 42 20 52 31 31 2c 5b 52 31 30 5d 20 |GSTRB R11,[R10] | 000027c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000027d0 20 20 3b 20 53 74 6f 72 65 20 61 20 62 6c 61 6e | ; Store a blan| 000027e0 6b 20 74 69 6c 65 20 6f 76 65 72 20 74 68 65 20 |k tile over the | 000027f0 72 6f 63 6b 0d 0d fc 3b 4d 4f 56 20 52 31 31 2c |rock...;MOV R11,| 00002800 23 33 32 2b 33 20 20 20 20 20 20 20 20 20 20 20 |#32+3 | 00002810 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 | ; Load | 00002820 52 31 31 20 77 69 74 68 20 61 20 72 6f 63 6b 0d |R11 with a rock.| 00002830 0e 06 4d 53 54 52 42 20 52 31 31 2c 5b 52 30 5d |..MSTRB R11,[R0]| 00002840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002850 20 20 20 20 3b 20 41 6e 64 20 70 6c 61 63 65 20 | ; And place | 00002860 74 68 65 20 72 6f 63 6b 20 69 6e 20 69 74 73 20 |the rock in its | 00002870 6e 65 77 20 70 6f 73 69 74 69 6f 6e 0d 0e 10 4a |new position...J| 00002880 42 20 63 68 65 63 6b 66 6f 72 6d 61 6e 62 65 6c |B checkformanbel| 00002890 6f 77 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |ow | 000028a0 20 3b 20 43 68 65 63 6b 20 74 6f 20 73 65 65 20 | ; Check to see | 000028b0 69 66 20 6d 61 6e 20 77 61 73 20 68 69 74 20 62 |if man was hit b| 000028c0 79 20 72 6f 63 6b 0d 0e 1a 0e 2e 6e 6f 74 61 62 |y rock.....notab| 000028d0 6c 61 6e 6b 0d 0e 24 46 4d 4f 56 20 52 35 2c 52 |lank..$FMOV R5,R| 000028e0 31 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |11 | 000028f0 20 20 20 20 20 20 20 20 20 3b 20 50 75 74 20 74 | ; Put t| 00002900 68 65 20 76 61 6c 75 65 20 6f 66 20 74 68 65 20 |he value of the | 00002910 74 69 6c 65 20 69 6e 20 52 35 0d 0e 2e 41 43 4d |tile in R5...ACM| 00002920 50 20 52 31 31 2c 23 33 32 2b 34 20 20 20 20 20 |P R11,#32+4 | 00002930 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00002940 20 49 73 20 74 68 65 20 74 69 6c 65 20 61 20 6c | Is the tile a l| 00002950 65 66 74 20 73 6c 6f 70 65 20 3f 0d 0e 38 11 42 |eft slope ?..8.B| 00002960 45 51 20 6c 65 66 74 73 6c 6f 70 65 0d 0e 42 42 |EQ leftslope..BB| 00002970 43 4d 50 20 52 31 31 2c 23 33 32 2b 36 20 20 20 |CMP R11,#32+6 | 00002980 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002990 20 3b 20 49 73 20 74 68 65 20 74 69 6c 65 20 61 | ; Is the tile a| 000029a0 20 72 69 67 68 74 20 73 6c 6f 70 65 20 3f 0d 0e | right slope ?..| 000029b0 4c 12 42 45 51 20 72 69 67 68 74 73 6c 6f 70 65 |L.BEQ rightslope| 000029c0 0d 0e 56 3c 43 4d 50 20 52 35 2c 23 33 32 2b 31 |..V<CMP R5,#32+1| 000029d0 39 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |9 | 000029e0 20 20 20 20 20 3b 20 49 73 20 74 68 65 20 74 69 | ; Is the ti| 000029f0 6c 65 20 61 20 64 69 61 6d 6f 6e 64 0d 0e 60 11 |le a diamond..`.| 00002a00 42 45 51 20 6c 65 66 74 73 6c 6f 70 65 0d 0e 6a |BEQ leftslope..j| 00002a10 39 43 4d 50 20 52 35 2c 23 33 32 2b 33 20 20 20 |9CMP R5,#32+3 | 00002a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002a30 20 20 3b 20 49 73 20 74 68 65 20 74 69 6c 65 20 | ; Is the tile | 00002a40 61 20 72 6f 63 6b 0d 0e 74 11 42 45 51 20 6c 65 |a rock..t.BEQ le| 00002a50 66 74 73 6c 6f 70 65 0d 0e 7e 3f 43 4d 50 20 52 |ftslope..~?CMP R| 00002a60 35 2c 23 33 32 2b 32 32 20 20 20 20 20 20 20 20 |5,#32+22 | 00002a70 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 73 | ; Is| 00002a80 20 74 68 65 20 74 69 6c 65 20 61 20 70 6f 77 65 | the tile a powe| 00002a90 72 20 70 69 6c 6c 0d 0e 88 11 42 45 51 20 6c 65 |r pill....BEQ le| 00002aa0 66 74 73 6c 6f 70 65 0d 0e 92 14 2e 72 65 74 75 |ftslope.....retu| 00002ab0 72 6e 66 72 6f 6d 73 6c 6f 70 65 0d 0e 9c 3f 43 |rnfromslope...?C| 00002ac0 4d 50 20 52 35 2c 23 33 32 2b 32 32 20 20 20 20 |MP R5,#32+22 | 00002ad0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002ae0 3b 20 49 73 20 74 68 65 20 74 69 6c 65 20 61 20 |; Is the tile a | 00002af0 70 6f 77 65 72 20 70 69 6c 6c 0d 0e a6 12 42 45 |power pill....BE| 00002b00 51 20 72 69 67 68 74 73 6c 6f 70 65 0d 0e b0 39 |Q rightslope...9| 00002b10 43 4d 50 20 52 35 2c 23 33 32 2b 33 20 20 20 20 |CMP R5,#32+3 | 00002b20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002b30 20 3b 20 49 73 20 74 68 65 20 74 69 6c 65 20 61 | ; Is the tile a| 00002b40 20 72 6f 63 6b 0d 0e ba 12 42 45 51 20 72 69 67 | rock....BEQ rig| 00002b50 68 74 73 6c 6f 70 65 0d 0e c4 3c 43 4d 50 20 52 |htslope...<CMP R| 00002b60 35 2c 23 33 32 2b 31 39 20 20 20 20 20 20 20 20 |5,#32+19 | 00002b70 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 73 | ; Is| 00002b80 20 74 68 65 20 74 69 6c 65 20 61 20 64 69 61 6d | the tile a diam| 00002b90 6f 6e 64 0d 0e ce 12 42 45 51 20 72 69 67 68 74 |ond....BEQ right| 00002ba0 73 6c 6f 70 65 0d 0e d8 0e 4d 4f 56 20 50 43 2c |slope....MOV PC,| 00002bb0 52 31 34 0d 0e e2 15 2e 63 68 65 63 6b 66 6f 72 |R14.....checkfor| 00002bc0 6d 61 6e 62 65 6c 6f 77 0d 0e ec 49 41 44 44 20 |manbelow...IADD | 00002bd0 52 30 2c 52 30 2c 23 34 30 20 20 20 20 20 20 20 |R0,R0,#40 | 00002be0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 47 | ; G| 00002bf0 65 74 20 74 68 65 20 61 64 64 72 65 73 73 20 31 |et the address 1| 00002c00 20 74 69 6c 65 20 62 65 6c 6f 77 20 61 67 61 69 | tile below agai| 00002c10 6e 0d 0e f6 41 4c 44 52 42 20 52 31 31 2c 5b 52 |n...ALDRB R11,[R| 00002c20 30 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0] | 00002c30 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 74 69 6c | ; Load til| 00002c40 65 20 66 72 6f 6d 20 74 68 65 20 61 64 64 72 65 |e from the addre| 00002c50 73 73 0d 0f 00 45 4c 44 52 20 52 31 2c 64 65 61 |ss...ELDR R1,dea| 00002c60 64 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |d | 00002c70 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 52 31 | ; Load R1| 00002c80 20 77 69 74 68 20 74 68 65 20 76 61 72 69 61 62 | with the variab| 00002c90 6c 65 20 64 65 61 64 0d 0f 0a 40 43 4d 50 20 52 |le dead...@CMP R| 00002ca0 31 31 2c 23 32 38 2b 33 32 20 20 20 20 20 20 20 |11,#28+32 | 00002cb0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 73 | ; Is| 00002cc0 20 74 68 65 20 6d 61 6e 20 69 6e 20 74 68 61 74 | the man in that| 00002cd0 20 74 69 6c 65 20 3f 0d 0f 14 3a ec 51 20 52 31 | tile ?...:.Q R1| 00002ce0 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 20 20 |,#1 | 00002cf0 20 20 20 20 20 20 20 20 20 3b 20 49 66 20 79 65 | ; If ye| 00002d00 73 2c 20 68 65 20 69 73 20 6e 6f 77 20 64 65 61 |s, he is now dea| 00002d10 64 0d 0f 1e 3e 53 54 52 20 52 31 2c 64 65 61 64 |d...>STR R1,dead| 00002d20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002d30 20 20 20 20 20 20 3b 20 53 74 6f 72 65 20 74 68 | ; Store th| 00002d40 65 20 76 61 72 69 61 62 6c 65 20 64 65 61 64 0d |e variable dead.| 00002d50 0f 28 0f 42 20 72 6f 63 6b 73 6f 75 6e 64 0d 0f |.(.B rocksound..| 00002d60 32 0e 4d 4f 56 20 50 43 2c 52 31 34 0d 0f 3c 05 |2.MOV PC,R14..<.| 00002d70 3a 0d 0f 46 0e 2e 6c 65 66 74 73 6c 6f 70 65 0d |:..F..leftslope.| 00002d80 0f 50 0e 4d 4f 56 20 52 36 2c 52 31 30 0d 0f 5a |.P.MOV R6,R10..Z| 00002d90 4a 53 55 42 20 52 36 2c 52 36 2c 23 31 20 20 20 |JSUB R6,R6,#1 | 00002da0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002db0 20 20 3b 20 4d 6f 76 65 20 74 68 65 20 61 64 64 | ; Move the add| 00002dc0 72 65 73 73 20 31 20 74 69 6c 65 20 74 6f 20 74 |ress 1 tile to t| 00002dd0 68 65 20 6c 65 66 74 0d 0f 64 42 4c 44 52 42 20 |he left..dBLDRB | 00002de0 52 31 31 2c 5b 52 36 5d 20 20 20 20 20 20 20 20 |R11,[R6] | 00002df0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 41 6e | ; An| 00002e00 64 20 67 65 74 20 74 68 65 20 74 69 6c 65 20 66 |d get the tile f| 00002e10 72 6f 6d 20 74 68 65 72 65 0d 0f 6e 3c 43 4d 50 |rom there..n<CMP| 00002e20 20 52 31 31 2c 23 33 32 2b 30 20 20 20 20 20 20 | R11,#32+0 | 00002e30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00002e40 49 73 20 69 74 20 61 20 62 6c 61 6e 6b 20 73 70 |Is it a blank sp| 00002e50 61 63 65 20 3f 0d 0f 78 4e 42 4e 45 20 72 65 74 |ace ?..xNBNE ret| 00002e60 75 72 6e 66 72 6f 6d 73 6c 6f 70 65 20 20 20 20 |urnfromslope | 00002e70 20 20 20 20 20 20 20 20 20 20 3b 20 49 66 20 6e | ; If n| 00002e80 6f 74 20 65 78 69 74 20 74 68 69 73 20 73 75 62 |ot exit this sub| 00002e90 72 6f 75 74 69 6e 65 20 69 6d 6d 65 64 69 61 74 |routine immediat| 00002ea0 65 6c 79 0d 0f 82 11 41 44 44 20 52 36 2c 52 36 |ely....ADD R6,R6| 00002eb0 2c 23 34 30 0d 0f 8c 42 4c 44 52 42 20 52 31 31 |,#40...BLDRB R11| 00002ec0 2c 5b 52 36 5d 20 20 20 20 20 20 20 20 20 20 20 |,[R6] | 00002ed0 20 20 20 20 20 20 20 20 20 3b 20 41 6e 64 20 67 | ; And g| 00002ee0 65 74 20 74 68 65 20 74 69 6c 65 20 66 72 6f 6d |et the tile from| 00002ef0 20 74 68 65 72 65 0d 0f 96 3c 43 4d 50 20 52 31 | there...<CMP R1| 00002f00 31 2c 23 33 32 2b 30 20 20 20 20 20 20 20 20 20 |1,#32+0 | 00002f10 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 73 20 | ; Is | 00002f20 69 74 20 61 20 62 6c 61 6e 6b 20 73 70 61 63 65 |it a blank space| 00002f30 20 3f 0d 0f a0 4e 42 4e 45 20 72 65 74 75 72 6e | ?...NBNE return| 00002f40 66 72 6f 6d 73 6c 6f 70 65 20 20 20 20 20 20 20 |fromslope | 00002f50 20 20 20 20 20 20 20 3b 20 49 66 20 6e 6f 74 20 | ; If not | 00002f60 65 78 69 74 20 74 68 69 73 20 73 75 62 72 6f 75 |exit this subrou| 00002f70 74 69 6e 65 20 69 6d 6d 65 64 69 61 74 65 6c 79 |tine immediately| 00002f80 0d 0f aa 47 4d 4f 56 20 52 37 2c 23 33 32 2b 33 |...GMOV R7,#32+3| 00002f90 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002fa0 20 20 20 20 20 3b 20 4c 6f 61 64 20 52 37 20 77 | ; Load R7 w| 00002fb0 69 74 68 20 74 68 65 20 76 61 6c 75 65 20 6f 66 |ith the value of| 00002fc0 20 61 20 72 6f 63 6b 0d 0f b4 4b 53 54 52 42 20 | a rock...KSTRB | 00002fd0 52 37 2c 5b 52 36 5d 20 20 20 20 20 20 20 20 20 |R7,[R6] | 00002fe0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 41 6e | ; An| 00002ff0 64 20 70 75 74 20 74 68 65 20 72 6f 63 6b 20 69 |d put the rock i| 00003000 6e 20 69 74 73 20 6e 65 77 20 70 6f 73 69 74 69 |n its new positi| 00003010 6f 6e 0d 0f be 4e 4d 4f 56 20 52 37 2c 23 33 32 |on...NMOV R7,#32| 00003020 2b 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |+0 | 00003030 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 52 37 | ; Load R7| 00003040 20 77 69 74 68 20 74 68 65 20 76 61 6c 75 65 20 | with the value | 00003050 6f 66 20 61 20 62 6c 61 6e 6b 20 73 70 61 63 65 |of a blank space| 00003060 0d 0f c8 4e 53 54 52 42 20 52 37 2c 5b 52 31 30 |...NSTRB R7,[R10| 00003070 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |] | 00003080 20 20 20 20 20 3b 20 41 6e 64 20 70 75 74 20 74 | ; And put t| 00003090 68 65 20 73 70 61 63 65 20 6f 76 65 72 20 74 68 |he space over th| 000030a0 65 20 6f 6c 64 20 72 6f 63 6b 20 70 6f 73 0d 0f |e old rock pos..| 000030b0 d2 49 41 44 44 20 52 36 2c 52 36 2c 23 34 30 20 |.IADD R6,R6,#40 | 000030c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000030d0 20 20 20 3b 20 47 65 74 20 74 68 65 20 61 64 64 | ; Get the add| 000030e0 72 65 73 73 20 31 20 74 69 6c 65 20 62 65 6c 6f |ress 1 tile belo| 000030f0 77 20 61 67 61 69 6e 0d 0f dc 41 4c 44 52 42 20 |w again...ALDRB | 00003100 52 31 31 2c 5b 52 36 5d 20 20 20 20 20 20 20 20 |R11,[R6] | 00003110 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 4c 6f | ; Lo| 00003120 61 64 20 74 69 6c 65 20 66 72 6f 6d 20 74 68 65 |ad tile from the| 00003130 20 61 64 64 72 65 73 73 0d 0f e6 45 4c 44 52 20 | address...ELDR | 00003140 52 31 2c 64 65 61 64 20 20 20 20 20 20 20 20 20 |R1,dead | 00003150 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 4c | ; L| 00003160 6f 61 64 20 52 31 20 77 69 74 68 20 74 68 65 20 |oad R1 with the | 00003170 76 61 72 69 61 62 6c 65 20 64 65 61 64 0d 0f f0 |variable dead...| 00003180 40 43 4d 50 20 52 31 31 2c 23 32 38 2b 33 32 20 |@CMP R11,#28+32 | 00003190 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000031a0 20 20 3b 20 49 73 20 74 68 65 20 6d 61 6e 20 69 | ; Is the man i| 000031b0 6e 20 74 68 61 74 20 74 69 6c 65 20 3f 0d 0f fa |n that tile ?...| 000031c0 3a ec 51 20 52 31 2c 23 31 20 20 20 20 20 20 20 |:.Q R1,#1 | 000031d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000031e0 20 49 66 20 79 65 73 2c 20 68 65 20 69 73 20 6e | If yes, he is n| 000031f0 6f 77 20 64 65 61 64 0d 10 04 45 43 4d 50 20 52 |ow dead...ECMP R| 00003200 31 31 2c 23 33 32 2b 33 20 20 20 20 20 20 20 20 |11,#32+3 | 00003210 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 73 | ; Is| 00003220 20 74 68 65 72 65 20 61 20 72 6f 63 6b 20 69 6e | there a rock in| 00003230 20 74 68 61 74 20 74 69 6c 65 20 3f 0d 10 0e 4f | that tile ?...O| 00003240 42 45 51 20 63 68 65 63 6b 6c 65 66 74 64 65 61 |BEQ checkleftdea| 00003250 64 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |d | 00003260 20 3b 20 49 66 20 79 65 73 20 63 68 65 63 6b 20 | ; If yes check | 00003270 74 6f 20 73 65 65 20 69 66 20 6d 61 6e 20 69 73 |to see if man is| 00003280 20 6e 65 78 74 20 74 6f 20 69 74 0d 10 18 48 43 | next to it...HC| 00003290 4d 50 20 52 31 31 2c 23 33 32 2b 31 39 20 20 20 |MP R11,#32+19 | 000032a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000032b0 3b 20 49 73 20 74 68 65 72 65 20 61 20 64 69 61 |; Is there a dia| 000032c0 6d 6f 6e 64 20 69 6e 20 74 68 61 74 20 74 69 6c |mond in that til| 000032d0 65 20 3f 0d 10 22 4f 42 45 51 20 63 68 65 63 6b |e ?.."OBEQ check| 000032e0 6c 65 66 74 64 65 61 64 20 20 20 20 20 20 20 20 |leftdead | 000032f0 20 20 20 20 20 20 20 20 3b 20 49 66 20 79 65 73 | ; If yes| 00003300 20 63 68 65 63 6b 20 74 6f 20 73 65 65 20 69 66 | check to see if| 00003310 20 6d 61 6e 20 69 73 20 6e 65 78 74 20 74 6f 20 | man is next to | 00003320 69 74 0d 10 2c 4b 43 4d 50 20 52 31 31 2c 23 33 |it..,KCMP R11,#3| 00003330 32 2b 32 32 20 20 20 20 20 20 20 20 20 20 20 20 |2+22 | 00003340 20 20 20 20 20 20 20 3b 20 49 73 20 74 68 65 72 | ; Is ther| 00003350 65 20 61 20 70 6f 77 65 72 20 70 69 6c 6c 20 69 |e a power pill i| 00003360 6e 20 74 68 61 74 20 74 69 6c 65 20 3f 0d 10 36 |n that tile ?..6| 00003370 4f 42 45 51 20 63 68 65 63 6b 6c 65 66 74 64 65 |OBEQ checkleftde| 00003380 61 64 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |ad | 00003390 20 20 3b 20 49 66 20 79 65 73 20 63 68 65 63 6b | ; If yes check| 000033a0 20 74 6f 20 73 65 65 20 69 66 20 6d 61 6e 20 69 | to see if man i| 000033b0 73 20 6e 65 78 74 20 74 6f 20 69 74 0d 10 40 4b |s next to it..@K| 000033c0 43 4d 50 20 52 31 31 2c 23 33 32 2b 34 20 20 20 |CMP R11,#32+4 | 000033d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000033e0 20 3b 20 49 73 20 74 68 65 72 65 20 61 20 6c 65 | ; Is there a le| 000033f0 66 74 20 73 6c 6f 70 65 20 69 6e 20 74 68 61 74 |ft slope in that| 00003400 20 74 69 6c 65 20 3f 0d 10 4a 3e 53 54 52 20 52 | tile ?..J>STR R| 00003410 31 2c 64 65 61 64 20 20 20 20 20 20 20 20 20 20 |1,dead | 00003420 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 74 | ; St| 00003430 6f 72 65 20 74 68 65 20 76 61 72 69 61 62 6c 65 |ore the variable| 00003440 20 64 65 61 64 0d 10 54 0f 42 20 72 6f 63 6b 73 | dead..T.B rocks| 00003450 6f 75 6e 64 0d 10 5e 0e 4d 4f 56 20 50 43 2c 52 |ound..^.MOV PC,R| 00003460 31 34 0d 10 68 12 2e 63 68 65 63 6b 6c 65 66 74 |14..h..checkleft| 00003470 64 65 61 64 0d 10 72 48 53 55 42 20 52 36 2c 52 |dead..rHSUB R6,R| 00003480 36 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 20 |6,#1 | 00003490 20 20 20 20 20 20 20 20 20 3b 20 47 65 74 20 61 | ; Get a| 000034a0 64 64 72 65 73 73 20 6f 66 20 74 69 6c 65 20 31 |ddress of tile 1| 000034b0 20 74 6f 20 74 68 65 20 6c 65 66 74 0d 10 7c 41 | to the left..|A| 000034c0 4c 44 52 42 20 52 31 31 2c 5b 52 36 5d 20 20 20 |LDRB R11,[R6] | 000034d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000034e0 20 3b 20 4c 6f 61 64 20 74 69 6c 65 20 66 72 6f | ; Load tile fro| 000034f0 6d 20 74 68 65 20 61 64 64 72 65 73 73 0d 10 86 |m the address...| 00003500 40 43 4d 50 20 52 31 31 2c 23 32 38 2b 33 32 20 |@CMP R11,#28+32 | 00003510 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003520 20 20 3b 20 49 73 20 74 68 65 20 6d 61 6e 20 69 | ; Is the man i| 00003530 6e 20 74 68 61 74 20 74 69 6c 65 20 3f 0d 10 90 |n that tile ?...| 00003540 3a ec 51 20 52 31 2c 23 31 20 20 20 20 20 20 20 |:.Q R1,#1 | 00003550 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00003560 20 49 66 20 79 65 73 2c 20 68 65 20 69 73 20 6e | If yes, he is n| 00003570 6f 77 20 64 65 61 64 0d 10 9a 3e 53 54 52 20 52 |ow dead...>STR R| 00003580 31 2c 64 65 61 64 20 20 20 20 20 20 20 20 20 20 |1,dead | 00003590 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 74 | ; St| 000035a0 6f 72 65 20 74 68 65 20 76 61 72 69 61 62 6c 65 |ore the variable| 000035b0 20 64 65 61 64 0d 10 a4 0e 4d 4f 56 20 50 43 2c | dead....MOV PC,| 000035c0 52 31 34 0d 10 ae 05 3a 0d 10 b8 0f 2e 72 69 67 |R14....:.....rig| 000035d0 68 74 73 6c 6f 70 65 0d 10 c2 0e 4d 4f 56 20 52 |htslope....MOV R| 000035e0 36 2c 52 31 30 0d 10 cc 4b 41 44 44 20 52 36 2c |6,R10...KADD R6,| 000035f0 52 36 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 |R6,#1 | 00003600 20 20 20 20 20 20 20 20 20 20 3b 20 4d 6f 76 65 | ; Move| 00003610 20 74 68 65 20 61 64 64 72 65 73 73 20 31 20 74 | the address 1 t| 00003620 69 6c 65 20 74 6f 20 74 68 65 20 72 69 67 68 74 |ile to the right| 00003630 0d 10 d6 42 4c 44 52 42 20 52 31 31 2c 5b 52 36 |...BLDRB R11,[R6| 00003640 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |] | 00003650 20 20 20 20 20 3b 20 41 6e 64 20 67 65 74 20 74 | ; And get t| 00003660 68 65 20 74 69 6c 65 20 66 72 6f 6d 20 74 68 65 |he tile from the| 00003670 72 65 0d 10 e0 3c 43 4d 50 20 52 31 31 2c 23 33 |re...<CMP R11,#3| 00003680 32 2b 30 20 20 20 20 20 20 20 20 20 20 20 20 20 |2+0 | 00003690 20 20 20 20 20 20 20 3b 20 49 73 20 69 74 20 61 | ; Is it a| 000036a0 20 62 6c 61 6e 6b 20 73 70 61 63 65 20 3f 0d 10 | blank space ?..| 000036b0 ea 10 4d 4f 56 4e 45 20 50 43 2c 52 31 34 0d 10 |..MOVNE PC,R14..| 000036c0 f4 11 41 44 44 20 52 36 2c 52 36 2c 23 34 30 0d |..ADD R6,R6,#40.| 000036d0 10 fe 42 4c 44 52 42 20 52 31 31 2c 5b 52 36 5d |..BLDRB R11,[R6]| 000036e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000036f0 20 20 20 20 3b 20 41 6e 64 20 67 65 74 20 74 68 | ; And get th| 00003700 65 20 74 69 6c 65 20 66 72 6f 6d 20 74 68 65 72 |e tile from ther| 00003710 65 0d 11 08 3c 43 4d 50 20 52 31 31 2c 23 33 32 |e...<CMP R11,#32| 00003720 2b 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |+0 | 00003730 20 20 20 20 20 20 3b 20 49 73 20 69 74 20 61 20 | ; Is it a | 00003740 62 6c 61 6e 6b 20 73 70 61 63 65 20 3f 0d 11 12 |blank space ?...| 00003750 10 4d 4f 56 4e 45 20 50 43 2c 52 31 34 0d 11 1c |.MOVNE PC,R14...| 00003760 47 4d 4f 56 20 52 37 2c 23 33 32 2b 33 20 20 20 |GMOV R7,#32+3 | 00003770 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003780 20 20 3b 20 4c 6f 61 64 20 52 37 20 77 69 74 68 | ; Load R7 with| 00003790 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 61 20 | the value of a | 000037a0 72 6f 63 6b 0d 11 26 4b 53 54 52 42 20 52 37 2c |rock..&KSTRB R7,| 000037b0 5b 52 36 5d 20 20 20 20 20 20 20 20 20 20 20 20 |[R6] | 000037c0 20 20 20 20 20 20 20 20 20 3b 20 41 6e 64 20 70 | ; And p| 000037d0 75 74 20 74 68 65 20 72 6f 63 6b 20 69 6e 20 69 |ut the rock in i| 000037e0 74 73 20 6e 65 77 20 70 6f 73 69 74 69 6f 6e 0d |ts new position.| 000037f0 11 30 4e 4d 4f 56 20 52 37 2c 23 33 32 2b 30 20 |.0NMOV R7,#32+0 | 00003800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003810 20 20 20 20 3b 20 4c 6f 61 64 20 52 37 20 77 69 | ; Load R7 wi| 00003820 74 68 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 |th the value of | 00003830 61 20 62 6c 61 6e 6b 20 73 70 61 63 65 0d 11 3a |a blank space..:| 00003840 4e 53 54 52 42 20 52 37 2c 5b 52 31 30 5d 20 20 |NSTRB R7,[R10] | 00003850 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003860 20 20 3b 20 41 6e 64 20 70 75 74 20 74 68 65 20 | ; And put the | 00003870 73 70 61 63 65 20 6f 76 65 72 20 74 68 65 20 6f |space over the o| 00003880 6c 64 20 72 6f 63 6b 20 70 6f 73 0d 11 44 4b 41 |ld rock pos..DKA| 00003890 44 44 20 52 36 2c 52 36 2c 23 34 30 20 20 20 20 |DD R6,R6,#40 | 000038a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000038b0 3b 20 47 65 74 20 74 68 65 20 61 64 64 72 65 73 |; Get the addres| 000038c0 73 20 31 20 62 65 6c 6f 77 20 74 68 65 20 6e 65 |s 1 below the ne| 000038d0 77 20 72 6f 63 6b 0d 11 4e 3d 4c 44 52 20 52 31 |w rock..N=LDR R1| 000038e0 2c 64 65 61 64 20 20 20 20 20 20 20 20 20 20 20 |,dead | 000038f0 20 20 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 | ; Loa| 00003900 64 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 64 |d the variable d| 00003910 65 61 64 0d 11 58 3d 4c 44 52 42 20 52 31 31 2c |ead..X=LDRB R11,| 00003920 5b 52 36 5d 20 20 20 20 20 20 20 20 20 20 20 20 |[R6] | 00003930 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 74 | ; Load t| 00003940 68 65 20 74 69 6c 65 20 69 6e 74 6f 20 52 31 31 |he tile into R11| 00003950 0d 11 62 40 43 4d 50 20 52 31 31 2c 23 32 38 2b |..b@CMP R11,#28+| 00003960 33 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |32 | 00003970 20 20 20 20 20 3b 20 49 73 20 74 68 65 20 6d 61 | ; Is the ma| 00003980 6e 20 69 6e 20 74 68 61 74 20 74 69 6c 65 20 3f |n in that tile ?| 00003990 0d 11 6c 3a ec 51 20 52 31 2c 23 31 20 20 20 20 |..l:.Q R1,#1 | 000039a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000039b0 20 20 3b 20 49 66 20 79 65 73 2c 20 68 65 20 69 | ; If yes, he i| 000039c0 73 20 6e 6f 77 20 64 65 61 64 0d 11 76 3d 43 4d |s now dead..v=CM| 000039d0 50 20 52 31 31 2c 23 33 32 2b 33 20 20 20 20 20 |P R11,#32+3 | 000039e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000039f0 20 49 73 20 61 20 72 6f 63 6b 20 69 6e 20 74 68 | Is a rock in th| 00003a00 61 74 20 74 69 6c 65 0d 11 80 16 42 45 51 20 63 |at tile....BEQ c| 00003a10 68 65 63 6b 72 69 67 68 74 64 65 61 64 0d 11 8a |heckrightdead...| 00003a20 43 43 4d 50 20 52 31 31 2c 23 33 32 2b 32 32 20 |CCMP R11,#32+22 | 00003a30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003a40 20 20 3b 20 49 73 20 61 20 70 6f 77 65 72 20 70 | ; Is a power p| 00003a50 69 6c 6c 20 69 6e 20 74 68 61 74 20 74 69 6c 65 |ill in that tile| 00003a60 0d 11 94 16 42 45 51 20 63 68 65 63 6b 72 69 67 |....BEQ checkrig| 00003a70 68 74 64 65 61 64 0d 11 9e 46 43 4d 50 20 52 31 |htdead...FCMP R1| 00003a80 31 2c 23 33 32 2b 36 20 20 20 20 20 20 20 20 20 |1,#32+6 | 00003a90 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 73 20 | ; Is | 00003aa0 61 20 72 69 67 68 74 20 73 6c 6f 70 65 20 69 6e |a right slope in| 00003ab0 20 74 68 61 74 20 74 69 6c 65 20 3f 0d 11 a8 16 | that tile ?....| 00003ac0 42 45 51 20 63 68 65 63 6b 72 69 67 68 74 64 65 |BEQ checkrightde| 00003ad0 61 64 0d 11 b2 42 43 4d 50 20 52 31 31 2c 23 33 |ad...BCMP R11,#3| 00003ae0 32 2b 31 39 20 20 20 20 20 20 20 20 20 20 20 20 |2+19 | 00003af0 20 20 20 20 20 20 20 3b 20 49 73 20 61 20 64 69 | ; Is a di| 00003b00 61 6d 6f 6e 64 20 69 6e 20 74 68 61 74 20 74 69 |amond in that ti| 00003b10 6c 65 20 3f 0d 11 bc 16 42 45 51 20 63 68 65 63 |le ?....BEQ chec| 00003b20 6b 72 69 67 68 74 64 65 61 64 0d 11 c6 3e 53 54 |krightdead...>ST| 00003b30 52 20 52 31 2c 64 65 61 64 20 20 20 20 20 20 20 |R R1,dead | 00003b40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00003b50 20 53 74 6f 72 65 20 74 68 65 20 76 61 72 69 61 | Store the varia| 00003b60 62 6c 65 20 64 65 61 64 0d 11 d0 0e 4d 4f 56 20 |ble dead....MOV | 00003b70 50 43 2c 52 31 34 0d 11 da 13 2e 63 68 65 63 6b |PC,R14.....check| 00003b80 72 69 67 68 74 64 65 61 64 0d 11 e4 10 41 44 44 |rightdead....ADD| 00003b90 20 52 36 2c 52 36 2c 23 31 0d 11 ee 11 4c 44 52 | R6,R6,#1....LDR| 00003ba0 42 20 52 31 31 2c 5b 52 36 5d 0d 11 f8 12 43 4d |B R11,[R6]....CM| 00003bb0 50 20 52 31 31 2c 23 32 38 2b 33 32 0d 12 02 0c |P R11,#28+32....| 00003bc0 ec 51 20 52 31 2c 23 31 0d 12 0c 0f 53 54 52 20 |.Q R1,#1....STR | 00003bd0 52 31 2c 64 65 61 64 0d 12 16 0f 42 20 72 6f 63 |R1,dead....B roc| 00003be0 6b 73 6f 75 6e 64 0d 12 20 0e 4d 4f 56 20 50 43 |ksound.. .MOV PC| 00003bf0 2c 52 31 34 0d 12 2a 05 3a 0d 12 34 0d 2e 77 61 |,R14..*.:..4..wa| 00003c00 73 74 68 65 72 65 0d 12 3e 0a 45 51 55 44 20 30 |sthere..>.EQUD 0| 00003c10 0d 12 48 10 2e 64 6f 75 70 64 61 74 65 6d 61 70 |..H..doupdatemap| 00003c20 0d 12 52 0a 45 51 55 44 20 30 0d 12 5c 11 2e 69 |..R.EQUD 0..\..i| 00003c30 73 72 6f 63 6b 73 74 61 62 6c 65 0d 12 66 15 53 |srockstable..f.S| 00003c40 54 52 20 52 31 34 2c 63 68 65 63 6b 6c 69 6e 6b |TR R14,checklink| 00003c50 0d 12 70 0e 4d 4f 56 20 52 31 30 2c 23 30 0d 12 |..p.MOV R10,#0..| 00003c60 7a 2c 4c 44 52 20 52 30 2c 79 73 74 6f 72 65 3a |z,LDR R0,ystore:| 00003c70 41 44 44 20 52 30 2c 52 30 2c 23 31 3a 53 54 52 |ADD R0,R0,#1:STR| 00003c80 20 52 30 2c 79 73 74 6f 72 65 0d 12 84 10 42 4c | R0,ystore....BL| 00003c90 20 63 68 65 63 6b 74 69 6c 65 0d 12 8e 44 4c 44 | checktile...DLD| 00003ca0 52 20 52 30 2c 72 65 73 75 6c 74 20 20 20 20 20 |R R0,result | 00003cb0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00003cc0 20 46 69 6e 64 20 6f 75 74 20 77 68 61 74 73 20 | Find out whats | 00003cd0 62 65 6c 6f 77 20 74 68 65 20 72 6f 63 6b 0d 12 |below the rock..| 00003ce0 98 36 43 4d 50 20 52 30 2c 23 30 20 20 20 20 20 |.6CMP R0,#0 | 00003cf0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003d00 20 20 20 3b 20 49 73 20 69 74 20 61 20 62 6c 61 | ; Is it a bla| 00003d10 6e 6b 20 3f 0d 12 a2 41 ec 51 20 52 31 30 2c 23 |nk ?...A.Q R10,#| 00003d20 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |1 | 00003d30 20 20 20 20 20 20 3b 20 49 66 20 69 74 20 69 73 | ; If it is| 00003d40 20 74 68 65 20 72 6f 63 6b 20 69 73 20 75 6e 73 | the rock is uns| 00003d50 74 61 62 6c 65 0d 12 ac 4d 53 54 52 45 51 20 52 |table...MSTREQ R| 00003d60 31 30 2c 64 6f 75 70 64 61 74 65 6d 61 70 20 20 |10,doupdatemap | 00003d70 20 20 20 20 20 20 20 20 20 20 3b 20 41 6e 64 20 | ; And | 00003d80 74 68 65 20 6d 61 70 20 6d 75 73 74 20 62 65 20 |the map must be | 00003d90 75 70 64 61 74 65 64 20 74 6f 20 73 68 6f 77 20 |updated to show | 00003da0 69 74 0d 12 b6 42 42 45 51 20 65 6e 64 72 6f 63 |it...BBEQ endroc| 00003db0 6b 73 74 61 62 6c 65 20 20 20 20 20 20 20 20 20 |kstable | 00003dc0 20 20 20 20 20 20 20 3b 20 53 6f 20 66 69 6e 69 | ; So fini| 00003dd0 73 68 20 69 66 20 69 74 20 69 73 20 75 6e 73 74 |sh if it is unst| 00003de0 61 62 6c 65 0d 12 c0 12 2e 65 6e 64 72 6f 63 6b |able.....endrock| 00003df0 73 74 61 62 6c 65 0d 12 ca 12 53 54 52 20 52 31 |stable....STR R1| 00003e00 30 2c 72 65 73 75 6c 74 0d 12 d4 15 4c 44 52 20 |0,result....LDR | 00003e10 52 31 34 2c 63 68 65 63 6b 6c 69 6e 6b 0d 12 de |R14,checklink...| 00003e20 0e 4d 4f 56 20 50 43 2c 52 31 34 0d 12 e8 05 3a |.MOV PC,R14....:| 00003e30 0d 12 f2 0e 2e 63 68 65 63 6b 74 69 6c 65 0d 12 |.....checktile..| 00003e40 fc 46 4c 44 52 20 52 33 2c 78 73 74 6f 72 65 20 |.FLDR R3,xstore | 00003e50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003e60 20 20 20 3b 20 67 65 74 20 74 68 65 20 78 20 63 | ; get the x c| 00003e70 6f 6f 72 64 20 6f 66 20 74 69 6c 65 20 74 6f 20 |oord of tile to | 00003e80 66 69 6e 64 0d 13 06 46 4c 44 52 20 52 34 2c 79 |find...FLDR R4,y| 00003e90 73 74 6f 72 65 20 20 20 20 20 20 20 20 20 20 20 |store | 00003ea0 20 20 20 20 20 20 20 20 20 3b 20 67 65 74 20 74 | ; get t| 00003eb0 68 65 20 79 20 63 6f 6f 72 64 20 6f 66 20 74 69 |he y coord of ti| 00003ec0 6c 65 20 74 6f 20 66 69 6e 64 0d 13 10 40 4d 4f |le to find...@MO| 00003ed0 56 20 52 32 2c 23 34 30 20 20 20 20 20 20 20 20 |V R2,#40 | 00003ee0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00003ef0 20 4c 6f 61 64 20 52 32 20 77 69 74 68 20 74 68 | Load R2 with th| 00003f00 65 20 76 61 6c 75 65 20 34 30 0d 13 1a 38 4d 55 |e value 40...8MU| 00003f10 4c 20 52 34 2c 52 32 2c 52 34 20 20 20 20 20 20 |L R4,R2,R4 | 00003f20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00003f30 20 4d 75 6c 74 69 70 6c 79 20 52 34 20 62 79 20 | Multiply R4 by | 00003f40 34 30 0d 13 24 48 41 44 44 20 52 32 2c 52 33 2c |40..$HADD R2,R3,| 00003f50 52 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |R4 | 00003f60 20 20 20 20 20 20 20 3b 20 52 32 20 3d 20 58 20 | ; R2 = X | 00003f70 6d 61 70 20 70 6f 73 20 2b 20 28 59 20 6d 61 70 |map pos + (Y map| 00003f80 20 70 6f 73 20 2a 20 34 30 29 0d 13 2e 15 4c 44 | pos * 40)....LD| 00003f90 52 20 52 33 2c 6d 61 70 70 6f 69 6e 74 65 72 0d |R R3,mappointer.| 00003fa0 13 38 4b 41 44 44 20 52 33 2c 52 33 2c 52 32 20 |.8KADD R3,R3,R2 | 00003fb0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00003fc0 20 20 20 20 3b 20 53 65 74 20 52 33 20 74 6f 20 | ; Set R3 to | 00003fd0 70 6f 69 6e 74 20 74 6f 20 61 20 74 69 6c 65 20 |point to a tile | 00003fe0 69 6e 20 74 68 65 20 6d 61 70 0d 13 42 46 4c 44 |in the map..BFLD| 00003ff0 52 42 20 52 32 2c 5b 52 33 5d 20 20 20 20 20 20 |RB R2,[R3] | 00004000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00004010 20 41 6e 64 20 6c 6f 61 64 20 74 68 65 20 76 61 | And load the va| 00004020 6c 75 65 20 6f 66 20 74 68 61 74 20 74 69 6c 65 |lue of that tile| 00004030 0d 13 4c 4b 53 55 42 20 52 32 2c 52 32 2c 23 33 |..LKSUB R2,R2,#3| 00004040 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |2 | 00004050 20 20 20 20 20 3b 20 53 65 74 20 74 68 65 20 6c | ; Set the l| 00004060 65 74 74 65 72 20 41 20 6f 66 20 6d 61 70 20 64 |etter A of map d| 00004070 61 74 61 20 74 6f 20 62 65 20 30 0d 13 56 48 53 |ata to be 0..VHS| 00004080 54 52 20 52 32 2c 72 65 73 75 6c 74 20 20 20 20 |TR R2,result | 00004090 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000040a0 3b 20 53 74 6f 72 65 20 74 68 65 20 74 69 6c 65 |; Store the tile| 000040b0 20 6e 75 6d 62 65 72 20 69 6e 20 22 72 65 73 75 | number in "resu| 000040c0 6c 74 22 0d 13 60 0e 4d 4f 56 20 50 43 2c 52 31 |lt"..`.MOV PC,R1| 000040d0 34 0d 13 6a 05 3a 0d 13 74 0c 2e 67 65 74 67 6f |4..j.:..t..getgo| 000040e0 6c 64 0d 13 7e 14 4c 44 52 20 52 30 2c 67 6f 6c |ld..~.LDR R0,gol| 000040f0 64 63 6f 75 6e 74 0d 13 88 10 41 44 44 20 52 30 |dcount....ADD R0| 00004100 2c 52 30 2c 23 31 0d 13 92 14 53 54 52 20 52 30 |,R0,#1....STR R0| 00004110 2c 67 6f 6c 64 63 6f 75 6e 74 0d 13 9c 0d 4d 4f |,goldcount....MO| 00004120 56 20 52 30 2c 23 30 0d 13 a6 12 53 54 52 20 52 |V R0,#0....STR R| 00004130 30 2c 6e 65 77 74 69 6c 65 0d 13 b0 14 4c 44 52 |0,newtile....LDR| 00004140 20 52 30 2c 67 6f 6c 64 63 6f 75 6e 74 0d 13 ba | R0,goldcount...| 00004150 15 4c 44 52 20 52 31 32 2c 67 6f 6c 64 74 6f 74 |.LDR R12,goldtot| 00004160 61 6c 0d 13 c4 0e 43 4d 50 20 52 30 2c 52 31 32 |al....CMP R0,R12| 00004170 0d 13 ce 0c ec 51 20 52 30 2c 23 31 0d 13 d8 18 |.....Q R0,#1....| 00004180 53 54 52 45 51 20 52 30 2c 66 69 6e 69 73 68 65 |STREQ R0,finishe| 00004190 64 6d 61 70 0d 13 e2 14 4c 44 52 20 52 30 2c 67 |dmap....LDR R0,g| 000041a0 6f 6c 64 63 6f 75 6e 74 0d 13 ec 14 4c 44 52 20 |oldcount....LDR | 000041b0 52 31 2c 67 6f 6c 64 74 6f 74 61 6c 0d 13 f6 49 |R1,goldtotal...I| 000041c0 53 55 42 20 52 30 2c 52 31 2c 52 30 20 20 20 20 |SUB R0,R1,R0 | 000041d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000041e0 20 3b 20 50 6c 61 63 65 20 6e 75 6d 62 65 72 20 | ; Place number | 000041f0 6f 66 20 74 69 6c 65 73 20 74 6f 20 67 65 74 20 |of tiles to get | 00004200 69 6e 20 52 30 0d 14 00 3c 41 44 52 20 52 31 2c |in R0...<ADR R1,| 00004210 6e 75 6d 62 65 72 62 75 66 66 65 72 20 20 20 20 |numberbuffer | 00004220 20 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 | ; Load| 00004230 20 52 31 20 77 69 74 68 20 61 20 62 75 66 66 65 | R1 with a buffe| 00004240 72 0d 14 0a 40 4d 4f 56 20 52 32 2c 23 32 30 20 |r...@MOV R2,#20 | 00004250 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004260 20 20 20 20 20 20 3b 20 53 65 74 20 52 32 20 74 | ; Set R2 t| 00004270 6f 20 74 68 65 20 62 75 66 66 65 72 20 73 69 7a |o the buffer siz| 00004280 65 0d 14 14 39 53 57 49 20 22 4f 53 5f 43 6f 6e |e...9SWI "OS_Con| 00004290 76 65 72 74 49 6e 74 65 67 65 72 34 22 20 20 20 |vertInteger4" | 000042a0 20 20 20 20 20 20 3b 20 43 6f 6e 76 65 72 74 20 | ; Convert | 000042b0 74 68 65 20 6e 75 6d 62 65 72 0d 14 1e 27 4d 4f |the number...'MO| 000042c0 56 20 52 30 2c 23 31 31 32 3a 4d 4f 56 20 52 31 |V R0,#112:MOV R1| 000042d0 2c 23 32 3a 53 57 49 20 22 4f 53 5f 42 79 74 65 |,#2:SWI "OS_Byte| 000042e0 22 0d 14 28 42 53 57 49 20 32 35 36 2b 33 31 20 |"..(BSWI 256+31 | 000042f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004300 20 20 20 20 20 20 3b 20 50 72 69 6e 74 20 63 68 | ; Print ch| 00004310 72 24 20 33 31 20 28 6d 6f 76 65 20 63 75 72 73 |r$ 31 (move curs| 00004320 6f 72 29 0d 14 32 0e 4d 4f 56 20 52 30 2c 23 33 |or)..2.MOV R0,#3| 00004330 34 0d 14 3c 13 53 57 49 20 22 4f 53 5f 57 72 69 |4..<.SWI "OS_Wri| 00004340 74 65 43 22 0d 14 46 0d 4d 4f 56 20 52 30 2c 23 |teC"..F.MOV R0,#| 00004350 39 0d 14 50 13 53 57 49 20 22 4f 53 5f 57 72 69 |9..P.SWI "OS_Wri| 00004360 74 65 43 22 0d 14 5a 16 41 44 52 20 52 30 2c 62 |teC"..Z.ADR R0,b| 00004370 6c 61 6e 6b 62 75 66 66 65 72 0d 14 64 13 53 57 |lankbuffer..d.SW| 00004380 49 20 22 4f 53 5f 57 72 69 74 65 30 22 0d 14 6e |I "OS_Write0"..n| 00004390 43 53 57 49 20 32 35 36 2b 33 31 3a 4d 4f 56 20 |CSWI 256+31:MOV | 000043a0 52 30 2c 23 33 34 3a 53 57 49 20 22 4f 53 5f 57 |R0,#34:SWI "OS_W| 000043b0 72 69 74 65 43 22 3a 4d 4f 56 20 52 30 2c 23 39 |riteC":MOV R0,#9| 000043c0 3a 53 57 49 20 22 4f 53 5f 57 72 69 74 65 43 22 |:SWI "OS_WriteC"| 000043d0 0d 14 78 3e 41 44 52 20 52 30 2c 6e 75 6d 62 65 |..x>ADR R0,numbe| 000043e0 72 62 75 66 66 65 72 20 20 20 20 20 20 20 20 20 |rbuffer | 000043f0 20 20 20 20 20 3b 20 4c 6f 61 64 20 52 30 20 77 | ; Load R0 w| 00004400 69 74 68 20 74 68 65 20 62 75 66 66 65 72 0d 14 |ith the buffer..| 00004410 82 37 53 57 49 20 22 4f 53 5f 57 72 69 74 65 30 |.7SWI "OS_Write0| 00004420 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |" | 00004430 20 20 20 3b 20 50 72 69 6e 74 20 74 68 65 20 73 | ; Print the s| 00004440 74 72 69 6e 67 0d 14 8c 27 4d 4f 56 20 52 30 2c |tring...'MOV R0,| 00004450 23 31 31 32 3a 4d 4f 56 20 52 31 2c 23 31 3a 53 |#112:MOV R1,#1:S| 00004460 57 49 20 22 4f 53 5f 42 79 74 65 22 0d 14 96 42 |WI "OS_Byte"...B| 00004470 53 57 49 20 32 35 36 2b 33 31 20 20 20 20 20 20 |SWI 256+31 | 00004480 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004490 20 3b 20 50 72 69 6e 74 20 63 68 72 24 20 33 31 | ; Print chr$ 31| 000044a0 20 28 6d 6f 76 65 20 63 75 72 73 6f 72 29 0d 14 | (move cursor)..| 000044b0 a0 0e 4d 4f 56 20 52 30 2c 23 33 34 0d 14 aa 13 |..MOV R0,#34....| 000044c0 53 57 49 20 22 4f 53 5f 57 72 69 74 65 43 22 0d |SWI "OS_WriteC".| 000044d0 14 b4 0d 4d 4f 56 20 52 30 2c 23 39 0d 14 be 13 |...MOV R0,#9....| 000044e0 53 57 49 20 22 4f 53 5f 57 72 69 74 65 43 22 0d |SWI "OS_WriteC".| 000044f0 14 c8 16 41 44 52 20 52 30 2c 62 6c 61 6e 6b 62 |...ADR R0,blankb| 00004500 75 66 66 65 72 0d 14 d2 13 53 57 49 20 22 4f 53 |uffer....SWI "OS| 00004510 5f 57 72 69 74 65 30 22 0d 14 dc 43 53 57 49 20 |_Write0"...CSWI | 00004520 32 35 36 2b 33 31 3a 4d 4f 56 20 52 30 2c 23 33 |256+31:MOV R0,#3| 00004530 34 3a 53 57 49 20 22 4f 53 5f 57 72 69 74 65 43 |4:SWI "OS_WriteC| 00004540 22 3a 4d 4f 56 20 52 30 2c 23 39 3a 53 57 49 20 |":MOV R0,#9:SWI | 00004550 22 4f 53 5f 57 72 69 74 65 43 22 0d 14 e6 3e 41 |"OS_WriteC"...>A| 00004560 44 52 20 52 30 2c 6e 75 6d 62 65 72 62 75 66 66 |DR R0,numberbuff| 00004570 65 72 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |er | 00004580 3b 20 4c 6f 61 64 20 52 30 20 77 69 74 68 20 74 |; Load R0 with t| 00004590 68 65 20 62 75 66 66 65 72 0d 14 f0 13 53 57 49 |he buffer....SWI| 000045a0 20 22 4f 53 5f 57 72 69 74 65 30 22 0d 14 fa 10 | "OS_Write0"....| 000045b0 42 20 63 68 61 6e 67 65 74 69 6c 65 0d 15 04 05 |B changetile....| 000045c0 3a 0d 15 0e 10 2e 62 6c 61 6e 6b 62 75 66 66 65 |:.....blankbuffe| 000045d0 72 0d 15 18 11 45 51 55 53 20 22 20 20 20 22 2b |r....EQUS " "+| 000045e0 bd 30 0d 15 22 11 2e 6e 75 6d 62 65 72 62 75 66 |.0.."..numberbuf| 000045f0 66 65 72 0d 15 2c 25 45 51 55 53 20 22 20 20 20 |fer..,%EQUS " | 00004600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004610 20 22 3a 41 4c 49 47 4e 0d 15 36 0d 2e 67 65 74 | ":ALIGN..6..get| 00004620 65 61 72 74 68 0d 15 40 15 4c 44 52 20 52 30 2c |earth..@.LDR R0,| 00004630 65 61 72 74 68 63 6f 75 6e 74 0d 15 4a 10 41 44 |earthcount..J.AD| 00004640 44 20 52 30 2c 52 30 2c 23 31 0d 15 54 15 53 54 |D R0,R0,#1..T.ST| 00004650 52 20 52 30 2c 65 61 72 74 68 63 6f 75 6e 74 0d |R R0,earthcount.| 00004660 15 5e 48 4d 4f 56 20 52 30 2c 23 30 20 20 20 20 |.^HMOV R0,#0 | 00004670 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004680 20 20 20 20 3b 20 4c 6f 61 64 20 52 30 20 77 69 | ; Load R0 wi| 00004690 74 68 20 7a 65 72 6f 20 28 30 3d 42 6c 61 6e 6b |th zero (0=Blank| 000046a0 20 73 70 61 63 65 29 0d 15 68 41 53 54 52 20 52 | space)..hASTR R| 000046b0 30 2c 6e 65 77 74 69 6c 65 20 20 20 20 20 20 20 |0,newtile | 000046c0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 65 | ; Se| 000046d0 74 20 6e 65 77 74 69 6c 65 20 74 6f 20 62 6c 61 |t newtile to bla| 000046e0 6e 6b 20 73 70 61 63 65 0d 15 72 0f 2e 63 68 61 |nk space..r..cha| 000046f0 6e 67 65 74 69 6c 65 0d 15 7c 48 4c 44 52 20 52 |ngetile..|HLDR R| 00004700 33 2c 78 73 74 6f 72 65 20 20 20 20 20 20 20 20 |3,xstore | 00004710 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 67 65 | ; ge| 00004720 74 20 74 68 65 20 78 20 63 6f 6f 72 64 20 6f 66 |t the x coord of| 00004730 20 74 69 6c 65 20 74 6f 20 63 68 61 6e 67 65 0d | tile to change.| 00004740 15 86 48 4c 44 52 20 52 34 2c 79 73 74 6f 72 65 |..HLDR R4,ystore| 00004750 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004760 20 20 20 20 3b 20 67 65 74 20 74 68 65 20 79 20 | ; get the y | 00004770 63 6f 6f 72 64 20 6f 66 20 74 69 6c 65 20 74 6f |coord of tile to| 00004780 20 63 68 61 6e 67 65 0d 15 90 40 4d 4f 56 20 52 | change...@MOV R| 00004790 32 2c 23 34 30 20 20 20 20 20 20 20 20 20 20 20 |2,#40 | 000047a0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 4c 6f | ; Lo| 000047b0 61 64 20 52 32 20 77 69 74 68 20 74 68 65 20 76 |ad R2 with the v| 000047c0 61 6c 75 65 20 34 30 0d 15 9a 38 4d 55 4c 20 52 |alue 40...8MUL R| 000047d0 34 2c 52 32 2c 52 34 20 20 20 20 20 20 20 20 20 |4,R2,R4 | 000047e0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 4d 75 | ; Mu| 000047f0 6c 74 69 70 6c 79 20 52 34 20 62 79 20 34 30 0d |ltiply R4 by 40.| 00004800 15 a4 48 41 44 44 20 52 32 2c 52 33 2c 52 34 20 |..HADD R2,R3,R4 | 00004810 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004820 20 20 20 20 3b 20 52 32 20 3d 20 58 20 6d 61 70 | ; R2 = X map| 00004830 20 70 6f 73 20 2b 20 28 59 20 6d 61 70 20 70 6f | pos + (Y map po| 00004840 73 20 2a 20 34 30 29 0d 15 ae 46 4c 44 52 20 52 |s * 40)...FLDR R| 00004850 33 2c 6d 61 70 70 6f 69 6e 74 65 72 20 20 20 20 |3,mappointer | 00004860 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 47 65 | ; Ge| 00004870 74 20 74 68 65 20 70 6f 69 6e 74 65 72 20 74 6f |t the pointer to| 00004880 20 74 68 65 20 6d 61 70 20 64 61 74 61 0d 15 b8 | the map data...| 00004890 4b 41 44 44 20 52 33 2c 52 33 2c 52 32 20 20 20 |KADD R3,R3,R2 | 000048a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000048b0 20 20 3b 20 53 65 74 20 52 33 20 74 6f 20 70 6f | ; Set R3 to po| 000048c0 69 6e 74 20 74 6f 20 61 20 74 69 6c 65 20 69 6e |int to a tile in| 000048d0 20 74 68 65 20 6d 61 70 0d 15 c2 4c 4c 44 52 20 | the map...LLDR | 000048e0 52 34 2c 6e 65 77 74 69 6c 65 20 20 20 20 20 20 |R4,newtile | 000048f0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 4c | ; L| 00004900 6f 61 64 20 52 34 20 77 69 74 68 20 74 68 65 20 |oad R4 with the | 00004910 76 61 6c 75 65 20 6f 66 20 74 68 65 20 6e 65 77 |value of the new| 00004920 74 69 6c 65 0d 15 cc 43 41 44 44 20 52 34 2c 52 |tile...CADD R4,R| 00004930 34 2c 23 33 32 20 20 20 20 20 20 20 20 20 20 20 |4,#32 | 00004940 20 20 20 20 20 20 20 20 20 3b 20 52 65 73 65 74 | ; Reset| 00004950 20 72 34 20 73 6f 20 74 68 61 74 20 74 69 6c 65 | r4 so that tile| 00004960 20 30 20 3d 20 33 32 0d 15 d6 46 53 54 52 42 20 | 0 = 32...FSTRB | 00004970 52 34 2c 5b 52 33 5d 20 20 20 20 20 20 20 20 20 |R4,[R3] | 00004980 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 41 6e | ; An| 00004990 64 20 73 61 76 65 20 74 68 65 20 6e 65 77 74 69 |d save the newti| 000049a0 6c 65 20 74 6f 20 74 68 65 20 6d 61 70 0d 15 e0 |le to the map...| 000049b0 15 4c 44 52 20 52 30 2c 65 61 72 74 68 63 6f 75 |.LDR R0,earthcou| 000049c0 6e 74 0d 15 ea 3c 41 44 52 20 52 31 2c 6e 75 6d |nt...<ADR R1,num| 000049d0 62 65 72 62 75 66 66 65 72 20 20 20 20 20 20 20 |berbuffer | 000049e0 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 52 31 | ; Load R1| 000049f0 20 77 69 74 68 20 61 20 62 75 66 66 65 72 0d 15 | with a buffer..| 00004a00 f4 40 4d 4f 56 20 52 32 2c 23 32 30 20 20 20 20 |.@MOV R2,#20 | 00004a10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004a20 20 20 20 3b 20 53 65 74 20 52 32 20 74 6f 20 74 | ; Set R2 to t| 00004a30 68 65 20 62 75 66 66 65 72 20 73 69 7a 65 0d 15 |he buffer size..| 00004a40 fe 39 53 57 49 20 22 4f 53 5f 43 6f 6e 76 65 72 |.9SWI "OS_Conver| 00004a50 74 49 6e 74 65 67 65 72 34 22 20 20 20 20 20 20 |tInteger4" | 00004a60 20 20 20 3b 20 43 6f 6e 76 65 72 74 20 74 68 65 | ; Convert the| 00004a70 20 6e 75 6d 62 65 72 0d 16 08 27 4d 4f 56 20 52 | number...'MOV R| 00004a80 30 2c 23 31 31 32 3a 4d 4f 56 20 52 31 2c 23 32 |0,#112:MOV R1,#2| 00004a90 3a 53 57 49 20 22 4f 53 5f 42 79 74 65 22 0d 16 |:SWI "OS_Byte"..| 00004aa0 12 42 53 57 49 20 32 35 36 2b 33 31 20 20 20 20 |.BSWI 256+31 | 00004ab0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004ac0 20 20 20 3b 20 50 72 69 6e 74 20 63 68 72 24 20 | ; Print chr$ | 00004ad0 33 31 20 28 6d 6f 76 65 20 63 75 72 73 6f 72 29 |31 (move cursor)| 00004ae0 0d 16 1c 0e 4d 4f 56 20 52 30 2c 23 33 34 0d 16 |....MOV R0,#34..| 00004af0 26 13 53 57 49 20 22 4f 53 5f 57 72 69 74 65 43 |&.SWI "OS_WriteC| 00004b00 22 0d 16 30 0e 4d 4f 56 20 52 30 2c 23 31 31 0d |"..0.MOV R0,#11.| 00004b10 16 3a 13 53 57 49 20 22 4f 53 5f 57 72 69 74 65 |.:.SWI "OS_Write| 00004b20 43 22 0d 16 44 3e 41 44 52 20 52 30 2c 6e 75 6d |C"..D>ADR R0,num| 00004b30 62 65 72 62 75 66 66 65 72 20 20 20 20 20 20 20 |berbuffer | 00004b40 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 52 30 | ; Load R0| 00004b50 20 77 69 74 68 20 74 68 65 20 62 75 66 66 65 72 | with the buffer| 00004b60 0d 16 4e 37 53 57 49 20 22 4f 53 5f 57 72 69 74 |..N7SWI "OS_Writ| 00004b70 65 30 22 20 20 20 20 20 20 20 20 20 20 20 20 20 |e0" | 00004b80 20 20 20 20 20 3b 20 50 72 69 6e 74 20 74 68 65 | ; Print the| 00004b90 20 73 74 72 69 6e 67 0d 16 58 27 4d 4f 56 20 52 | string..X'MOV R| 00004ba0 30 2c 23 31 31 32 3a 4d 4f 56 20 52 31 2c 23 31 |0,#112:MOV R1,#1| 00004bb0 3a 53 57 49 20 22 4f 53 5f 42 79 74 65 22 0d 16 |:SWI "OS_Byte"..| 00004bc0 62 42 53 57 49 20 32 35 36 2b 33 31 20 20 20 20 |bBSWI 256+31 | 00004bd0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004be0 20 20 20 3b 20 50 72 69 6e 74 20 63 68 72 24 20 | ; Print chr$ | 00004bf0 33 31 20 28 6d 6f 76 65 20 63 75 72 73 6f 72 29 |31 (move cursor)| 00004c00 0d 16 6c 0e 4d 4f 56 20 52 30 2c 23 33 34 0d 16 |..l.MOV R0,#34..| 00004c10 76 13 53 57 49 20 22 4f 53 5f 57 72 69 74 65 43 |v.SWI "OS_WriteC| 00004c20 22 0d 16 80 0e 4d 4f 56 20 52 30 2c 23 31 31 0d |"....MOV R0,#11.| 00004c30 16 8a 13 53 57 49 20 22 4f 53 5f 57 72 69 74 65 |...SWI "OS_Write| 00004c40 43 22 0d 16 94 3d 41 44 52 20 52 30 2c 6e 75 6d |C"...=ADR R0,num| 00004c50 62 65 72 62 75 66 66 65 72 20 20 20 20 20 20 20 |berbuffer | 00004c60 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 52 30 20 | ; Load R0 | 00004c70 77 69 74 68 20 74 68 65 20 62 75 66 66 65 72 0d |with the buffer.| 00004c80 16 9e 37 53 57 49 20 22 4f 53 5f 57 72 69 74 65 |..7SWI "OS_Write| 00004c90 30 22 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0" | 00004ca0 20 20 20 20 3b 20 50 72 69 6e 74 20 74 68 65 20 | ; Print the | 00004cb0 73 74 72 69 6e 67 0d 16 a8 0e 4d 4f 56 20 50 43 |string....MOV PC| 00004cc0 2c 52 31 34 0d 16 b2 05 3a 0d 16 bc 0c 2e 63 61 |,R14....:.....ca| 00004cd0 6e 6d 6f 76 65 0d 16 c6 3f 4c 44 52 20 52 30 2c |nmove...?LDR R0,| 00004ce0 72 65 73 75 6c 74 20 20 20 20 20 20 20 20 20 20 |result | 00004cf0 20 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 | ; Load| 00004d00 20 69 6e 20 74 68 65 20 74 79 70 65 20 6f 66 20 | in the type of | 00004d10 74 69 6c 65 0d 16 d0 0d 4d 4f 56 20 52 31 2c 23 |tile....MOV R1,#| 00004d20 30 0d 16 da 3a 43 4d 50 20 52 30 2c 23 30 20 20 |0...:CMP R0,#0 | 00004d30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004d40 20 20 20 20 20 20 3b 20 49 73 20 74 68 65 20 74 | ; Is the t| 00004d50 69 6c 65 20 62 6c 61 6e 6b 20 3f 0d 16 e4 47 ec |ile blank ?...G.| 00004d60 51 20 52 31 2c 23 31 20 20 20 20 20 20 20 20 20 |Q R1,#1 | 00004d70 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 | ; I| 00004d80 66 20 69 74 20 69 73 2c 20 73 65 74 20 52 31 20 |f it is, set R1 | 00004d90 74 6f 20 79 65 73 20 68 65 20 63 61 6e 20 6d 6f |to yes he can mo| 00004da0 76 65 0d 16 ee 3b 43 4d 50 20 52 30 2c 23 33 20 |ve...;CMP R0,#3 | 00004db0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004dc0 20 20 20 20 20 20 20 3b 20 49 73 20 74 68 65 20 | ; Is the | 00004dd0 74 69 6c 65 20 61 20 72 6f 63 6b 20 3f 0d 16 f8 |tile a rock ?...| 00004de0 45 ec 51 20 52 31 2c 23 34 20 20 20 20 20 20 20 |E.Q R1,#4 | 00004df0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00004e00 20 49 66 20 69 74 20 69 73 2c 20 73 65 74 20 52 | If it is, set R| 00004e10 31 20 74 6f 20 69 6e 64 69 63 61 74 65 20 74 68 |1 to indicate th| 00004e20 61 74 0d 17 02 38 43 4d 50 20 52 30 2c 23 32 30 |at...8CMP R0,#20| 00004e30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004e40 20 20 20 20 20 20 20 3b 20 49 73 20 74 68 65 20 | ; Is the | 00004e50 74 69 6c 65 20 65 61 72 74 68 0d 17 0c 3a ec 51 |tile earth...:.Q| 00004e60 20 52 31 2c 23 35 20 20 20 20 20 20 20 20 20 20 | R1,#5 | 00004e70 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 66 | ; If| 00004e80 20 69 74 20 69 73 20 69 6e 64 69 63 61 74 65 20 | it is indicate | 00004e90 74 68 61 74 0d 17 16 37 43 4d 50 20 52 30 2c 23 |that...7CMP R0,#| 00004ea0 31 39 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |19 | 00004eb0 20 20 20 20 20 20 20 20 20 3b 20 49 73 20 74 68 | ; Is th| 00004ec0 65 20 74 69 6c 65 20 67 6f 6c 64 0d 17 20 3a ec |e tile gold.. :.| 00004ed0 51 20 52 31 2c 23 33 20 20 20 20 20 20 20 20 20 |Q R1,#3 | 00004ee0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 | ; I| 00004ef0 66 20 69 74 20 69 73 20 69 6e 64 69 63 61 74 65 |f it is indicate| 00004f00 20 74 68 61 74 0d 17 2a 3f 43 4d 50 20 52 30 2c | that..*?CMP R0,| 00004f10 23 32 32 20 20 20 20 20 20 20 20 20 20 20 20 20 |#22 | 00004f20 20 20 20 20 20 20 20 20 20 20 3b 20 49 73 20 74 | ; Is t| 00004f30 68 65 20 74 69 6c 65 20 61 20 50 6f 77 65 72 20 |he tile a Power | 00004f40 50 69 6c 6c 0d 17 34 49 ec 51 20 52 31 2c 23 35 |Pill..4I.Q R1,#5| 00004f50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004f60 20 20 20 20 20 20 3b 20 3c 3c 3c 20 54 45 4d 4f | ; <<< TEMO| 00004f70 4f 52 41 52 59 20 4e 55 4d 42 45 52 20 e3 20 50 |ORARY NUMBER . P| 00004f80 4f 57 45 52 20 50 49 4c 4c 20 3e 3e 3e 0d 17 3e |OWER PILL >>>..>| 00004f90 3c 43 4d 50 20 52 30 2c 23 32 31 20 20 20 20 20 |<CMP R0,#21 | 00004fa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00004fb0 20 20 3b 20 49 73 20 74 68 65 20 74 69 6c 65 20 | ; Is the tile | 00004fc0 70 6f 69 73 69 6f 6e 20 3f 0d 17 48 3a ec 51 20 |poision ?..H:.Q | 00004fd0 52 31 2c 23 32 20 20 20 20 20 20 20 20 20 20 20 |R1,#2 | 00004fe0 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 66 20 | ; If | 00004ff0 69 74 20 69 73 20 69 6e 64 69 63 61 74 65 20 74 |it is indicate t| 00005000 68 61 74 0d 17 52 3b ec 51 20 52 32 2c 23 31 20 |hat..R;.Q R2,#1 | 00005010 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00005020 20 20 20 20 20 3b 20 4c 6f 61 64 20 72 32 20 77 | ; Load r2 w| 00005030 69 74 68 20 31 20 28 31 3d 64 65 61 64 29 0d 17 |ith 1 (1=dead)..| 00005040 5c 4a 53 54 52 45 51 20 52 32 2c 64 65 61 64 20 |\JSTREQ R2,dead | 00005050 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00005060 20 20 20 3b 20 41 6e 64 20 73 65 74 20 74 68 65 | ; And set the| 00005070 20 64 65 61 64 20 66 6c 61 67 20 74 6f 20 b9 20 | dead flag to . | 00005080 28 31 3d 44 65 61 64 29 0d 17 66 3e 53 54 52 20 |(1=Dead)..f>STR | 00005090 52 31 2c 63 61 6e 68 65 6d 6f 76 65 20 20 20 20 |R1,canhemove | 000050a0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 | ; S| 000050b0 74 6f 72 65 20 52 31 20 74 6f 20 22 63 61 6e 68 |tore R1 to "canh| 000050c0 65 6d 6f 76 65 22 0d 17 70 0e 4d 4f 56 20 50 43 |emove"..p.MOV PC| 000050d0 2c 52 31 34 0d 17 7a 05 3a 0d 17 84 0e 2e 63 68 |,R14..z.:.....ch| 000050e0 65 63 6b 6c 69 6e 6b 0d 17 8e 0a 45 51 55 44 20 |ecklink....EQUD | 000050f0 30 0d 17 98 05 3a 0d 17 a2 12 2e 63 68 65 63 6b |0....:.....check| 00005100 72 6f 63 6b 6c 65 66 74 0d 17 ac 37 53 54 52 20 |rockleft...7STR | 00005110 52 31 34 2c 63 68 65 63 6b 6c 69 6e 6b 20 20 20 |R14,checklink | 00005120 20 20 20 20 20 20 3b 20 53 74 6f 72 65 20 74 68 | ; Store th| 00005130 65 20 6c 69 6e 6b 20 72 65 67 73 69 74 65 72 0d |e link regsiter.| 00005140 17 b6 2c 4c 44 52 20 52 30 2c 78 73 74 6f 72 65 |..,LDR R0,xstore| 00005150 3a 41 44 44 20 52 30 2c 52 30 2c 23 31 3a 53 54 |:ADD R0,R0,#1:ST| 00005160 52 20 52 30 2c 78 73 74 6f 72 65 0d 17 c0 4d 42 |R R0,xstore...MB| 00005170 4c 20 63 68 65 63 6b 74 69 6c 65 20 20 20 20 20 |L checktile | 00005180 20 20 20 20 20 20 20 20 20 3b 20 46 69 6e 64 20 | ; Find | 00005190 6f 75 74 20 77 68 61 74 20 69 73 20 69 6e 20 74 |out what is in t| 000051a0 68 65 20 74 69 6c 65 20 6e 65 78 74 20 74 6f 20 |he tile next to | 000051b0 74 68 65 20 72 6f 63 6b 0d 17 ca 3b 4c 44 52 20 |the rock...;LDR | 000051c0 52 30 2c 72 65 73 75 6c 74 20 20 20 20 20 20 20 |R0,result | 000051d0 20 20 20 20 20 20 3b 20 47 65 74 20 74 68 65 20 | ; Get the | 000051e0 72 65 73 75 6c 74 20 6f 66 20 74 68 65 20 63 68 |result of the ch| 000051f0 65 63 6b 0d 17 d4 35 43 4d 50 20 52 30 2c 23 30 |eck...5CMP R0,#0| 00005200 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00005210 20 3b 20 49 73 20 69 74 20 61 20 62 6c 61 6e 6b | ; Is it a blank| 00005220 20 73 70 61 63 65 20 3f 0d 17 de 44 42 45 51 20 | space ?...DBEQ | 00005230 6d 6f 76 65 72 6f 63 6b 6c 65 66 74 20 20 20 20 |moverockleft | 00005240 20 20 20 20 20 20 3b 20 49 66 20 69 74 20 69 73 | ; If it is| 00005250 20 6d 6f 76 65 20 74 68 65 20 72 6f 63 6b 20 61 | move the rock a| 00005260 6c 6f 6e 67 20 69 6e 74 6f 20 69 74 0d 17 e8 4c |long into it...L| 00005270 4d 4f 56 20 52 30 2c 23 30 20 20 20 20 20 20 20 |MOV R0,#0 | 00005280 20 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 | ; Load| 00005290 20 52 30 20 77 69 74 68 20 74 68 65 20 76 61 6c | R0 with the val| 000052a0 75 65 20 30 20 28 30 3d 4e 6f 20 68 65 20 63 61 |ue 0 (0=No he ca| 000052b0 6e 74 20 6d 6f 76 65 29 0d 17 f2 42 53 54 52 20 |nt move)...BSTR | 000052c0 52 30 2c 63 61 6e 68 65 6d 6f 76 65 20 20 20 20 |R0,canhemove | 000052d0 20 20 20 20 20 20 3b 20 41 6e 64 20 73 65 74 20 | ; And set | 000052e0 74 68 65 20 63 61 6e 68 65 6d 6f 76 65 20 77 6f |the canhemove wo| 000052f0 72 64 20 74 6f 20 7a 65 72 6f 0d 17 fc 38 4c 44 |rd to zero...8LD| 00005300 52 20 52 31 34 2c 63 68 65 63 6b 6c 69 6e 6b 20 |R R14,checklink | 00005310 20 20 20 20 20 20 20 20 3b 20 52 65 6c 6f 61 64 | ; Reload| 00005320 20 74 68 65 20 6c 69 6e 6b 20 72 65 67 69 73 74 | the link regist| 00005330 65 72 0d 18 06 49 4d 4f 56 20 50 43 2c 52 31 34 |er...IMOV PC,R14| 00005340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00005350 3b 20 41 6e 64 20 65 78 69 74 20 74 68 65 20 72 |; And exit the r| 00005360 6f 75 74 69 6e 65 2c 20 74 68 65 20 6d 61 6e 20 |outine, the man | 00005370 63 61 6e 6e 6f 74 20 6d 6f 76 65 0d 18 10 11 2e |cannot move.....| 00005380 6d 6f 76 65 72 6f 63 6b 6c 65 66 74 0d 18 1a 3e |moverockleft...>| 00005390 4d 4f 56 20 52 30 2c 23 33 20 20 20 20 20 20 20 |MOV R0,#3 | 000053a0 20 20 20 20 20 20 20 20 20 20 3b 20 53 65 74 20 | ; Set | 000053b0 52 30 20 74 6f 20 74 68 65 20 76 61 6c 75 65 20 |R0 to the value | 000053c0 33 20 28 33 3d 52 6f 63 6b 29 0d 18 24 3e 53 54 |3 (3=Rock)..$>ST| 000053d0 52 20 52 30 2c 6e 65 77 74 69 6c 65 20 20 20 20 |R R0,newtile | 000053e0 20 20 20 20 20 20 20 20 3b 20 41 6e 64 20 73 74 | ; And st| 000053f0 6f 72 65 20 74 68 65 20 76 61 6c 75 65 20 69 6e |ore the value in| 00005400 20 6e 65 77 74 69 6c 65 0d 18 2e 40 42 4c 20 63 | newtile...@BL c| 00005410 68 61 6e 67 65 74 69 6c 65 20 20 20 20 20 20 20 |hangetile | 00005420 20 20 20 20 20 20 3b 20 54 68 65 6e 20 63 68 61 | ; Then cha| 00005430 6e 67 65 20 74 68 65 20 74 69 6c 65 20 69 6e 74 |nge the tile int| 00005440 6f 20 61 20 72 6f 63 6b 0d 18 38 45 4d 4f 56 20 |o a rock..8EMOV | 00005450 52 30 2c 23 30 20 20 20 20 20 20 20 20 20 20 20 |R0,#0 | 00005460 20 20 20 20 20 20 3b 20 53 65 74 20 52 30 20 74 | ; Set R0 t| 00005470 6f 20 74 68 65 20 76 61 6c 75 65 20 30 20 28 30 |o the value 0 (0| 00005480 3d 42 6c 61 6e 6b 20 73 70 61 63 65 29 0d 18 42 |=Blank space)..B| 00005490 3e 53 54 52 20 52 30 2c 6e 65 77 74 69 6c 65 20 |>STR R0,newtile | 000054a0 20 20 20 20 20 20 20 20 20 20 20 3b 20 41 6e 64 | ; And| 000054b0 20 73 74 6f 72 65 20 74 68 65 20 76 61 6c 75 65 | store the value| 000054c0 20 69 6e 20 6e 65 77 74 69 6c 65 0d 18 4c 2c 4c | in newtile..L,L| 000054d0 44 52 20 52 30 2c 78 73 74 6f 72 65 3a 53 55 42 |DR R0,xstore:SUB| 000054e0 20 52 30 2c 52 30 2c 23 31 3a 53 54 52 20 52 30 | R0,R0,#1:STR R0| 000054f0 2c 78 73 74 6f 72 65 0d 18 56 4b 42 4c 20 63 68 |,xstore..VKBL ch| 00005500 61 6e 67 65 74 69 6c 65 20 20 20 20 20 20 20 20 |angetile | 00005510 20 20 20 20 20 3b 20 54 68 65 6e 20 62 6c 61 6e | ; Then blan| 00005520 6b 20 6f 76 65 72 20 74 68 65 20 6f 6c 64 20 72 |k over the old r| 00005530 6f 63 6b 20 77 69 74 68 20 74 68 65 20 73 70 61 |ock with the spa| 00005540 63 65 0d 18 60 4c 4d 4f 56 20 52 30 2c 23 31 20 |ce..`LMOV R0,#1 | 00005550 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00005560 3b 20 4c 6f 61 64 20 52 30 20 77 69 74 68 20 74 |; Load R0 with t| 00005570 68 65 20 76 61 6c 75 65 20 31 20 28 31 3d 59 65 |he value 1 (1=Ye| 00005580 73 20 68 65 20 63 61 6e 20 6d 6f 76 65 29 0d 18 |s he can move)..| 00005590 6a 42 53 54 52 20 52 30 2c 63 61 6e 68 65 6d 6f |jBSTR R0,canhemo| 000055a0 76 65 20 20 20 20 20 20 20 20 20 20 3b 20 41 6e |ve ; An| 000055b0 64 20 73 65 74 20 74 68 65 20 63 61 6e 68 65 6d |d set the canhem| 000055c0 6f 76 65 20 77 6f 72 64 20 74 6f 20 7a 65 72 6f |ove word to zero| 000055d0 0d 18 74 38 4c 44 52 20 52 31 34 2c 63 68 65 63 |..t8LDR R14,chec| 000055e0 6b 6c 69 6e 6b 20 20 20 20 20 20 20 20 20 3b 20 |klink ; | 000055f0 52 65 6c 6f 61 64 20 74 68 65 20 6c 69 6e 6b 20 |Reload the link | 00005600 72 65 67 69 73 74 65 72 0d 18 7e 46 4d 4f 56 20 |register..~FMOV | 00005610 50 43 2c 52 31 34 20 20 20 20 20 20 20 20 20 20 |PC,R14 | 00005620 20 20 20 20 20 20 3b 20 41 6e 64 20 65 78 69 74 | ; And exit| 00005630 20 74 68 65 20 72 6f 75 74 69 6e 65 2c 20 74 68 | the routine, th| 00005640 65 20 6d 61 6e 20 63 61 6e 20 6d 6f 76 65 0d 18 |e man can move..| 00005650 88 05 3a 0d 18 92 13 2e 63 68 65 63 6b 72 6f 63 |..:.....checkroc| 00005660 6b 72 69 67 68 74 0d 18 9c 37 53 54 52 20 52 31 |kright...7STR R1| 00005670 34 2c 63 68 65 63 6b 6c 69 6e 6b 20 20 20 20 20 |4,checklink | 00005680 20 20 20 20 3b 20 53 74 6f 72 65 20 74 68 65 20 | ; Store the | 00005690 6c 69 6e 6b 20 72 65 67 73 69 74 65 72 0d 18 a6 |link regsiter...| 000056a0 2c 4c 44 52 20 52 30 2c 78 73 74 6f 72 65 3a 53 |,LDR R0,xstore:S| 000056b0 55 42 20 52 30 2c 52 30 2c 23 31 3a 53 54 52 20 |UB R0,R0,#1:STR | 000056c0 52 30 2c 78 73 74 6f 72 65 0d 18 b0 4d 42 4c 20 |R0,xstore...MBL | 000056d0 63 68 65 63 6b 74 69 6c 65 20 20 20 20 20 20 20 |checktile | 000056e0 20 20 20 20 20 20 20 3b 20 46 69 6e 64 20 6f 75 | ; Find ou| 000056f0 74 20 77 68 61 74 20 69 73 20 69 6e 20 74 68 65 |t what is in the| 00005700 20 74 69 6c 65 20 6e 65 78 74 20 74 6f 20 74 68 | tile next to th| 00005710 65 20 72 6f 63 6b 0d 18 ba 3b 4c 44 52 20 52 30 |e rock...;LDR R0| 00005720 2c 72 65 73 75 6c 74 20 20 20 20 20 20 20 20 20 |,result | 00005730 20 20 20 20 3b 20 47 65 74 20 74 68 65 20 72 65 | ; Get the re| 00005740 73 75 6c 74 20 6f 66 20 74 68 65 20 63 68 65 63 |sult of the chec| 00005750 6b 0d 18 c4 35 43 4d 50 20 52 30 2c 23 30 20 20 |k...5CMP R0,#0 | 00005760 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00005770 20 49 73 20 69 74 20 61 20 62 6c 61 6e 6b 20 73 | Is it a blank s| 00005780 70 61 63 65 20 3f 0d 18 ce 44 42 45 51 20 6d 6f |pace ?...DBEQ mo| 00005790 76 65 72 6f 63 6b 72 69 67 68 74 20 20 20 20 20 |verockright | 000057a0 20 20 20 20 3b 20 49 66 20 69 74 20 69 73 20 6d | ; If it is m| 000057b0 6f 76 65 20 74 68 65 20 72 6f 63 6b 20 61 6c 6f |ove the rock alo| 000057c0 6e 67 20 69 6e 74 6f 20 69 74 0d 18 d8 4c 4d 4f |ng into it...LMO| 000057d0 56 20 52 30 2c 23 30 20 20 20 20 20 20 20 20 20 |V R0,#0 | 000057e0 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 52 | ; Load R| 000057f0 30 20 77 69 74 68 20 74 68 65 20 76 61 6c 75 65 |0 with the value| 00005800 20 30 20 28 30 3d 4e 6f 20 68 65 20 63 61 6e 74 | 0 (0=No he cant| 00005810 20 6d 6f 76 65 29 0d 18 e2 42 53 54 52 20 52 30 | move)...BSTR R0| 00005820 2c 63 61 6e 68 65 6d 6f 76 65 20 20 20 20 20 20 |,canhemove | 00005830 20 20 20 20 3b 20 41 6e 64 20 73 65 74 20 74 68 | ; And set th| 00005840 65 20 63 61 6e 68 65 6d 6f 76 65 20 77 6f 72 64 |e canhemove word| 00005850 20 74 6f 20 7a 65 72 6f 0d 18 ec 38 4c 44 52 20 | to zero...8LDR | 00005860 52 31 34 2c 63 68 65 63 6b 6c 69 6e 6b 20 20 20 |R14,checklink | 00005870 20 20 20 20 20 20 3b 20 52 65 6c 6f 61 64 20 74 | ; Reload t| 00005880 68 65 20 6c 69 6e 6b 20 72 65 67 69 73 74 65 72 |he link register| 00005890 0d 18 f6 49 4d 4f 56 20 50 43 2c 52 31 34 20 20 |...IMOV PC,R14 | 000058a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 000058b0 41 6e 64 20 65 78 69 74 20 74 68 65 20 72 6f 75 |And exit the rou| 000058c0 74 69 6e 65 2c 20 74 68 65 20 6d 61 6e 20 63 61 |tine, the man ca| 000058d0 6e 6e 6f 74 20 6d 6f 76 65 0d 19 00 12 2e 6d 6f |nnot move.....mo| 000058e0 76 65 72 6f 63 6b 72 69 67 68 74 0d 19 0a 3e 4d |verockright...>M| 000058f0 4f 56 20 52 30 2c 23 33 20 20 20 20 20 20 20 20 |OV R0,#3 | 00005900 20 20 20 20 20 20 20 20 20 3b 20 53 65 74 20 52 | ; Set R| 00005910 30 20 74 6f 20 74 68 65 20 76 61 6c 75 65 20 33 |0 to the value 3| 00005920 20 28 33 3d 52 6f 63 6b 29 0d 19 14 3e 53 54 52 | (3=Rock)...>STR| 00005930 20 52 30 2c 6e 65 77 74 69 6c 65 20 20 20 20 20 | R0,newtile | 00005940 20 20 20 20 20 20 20 3b 20 41 6e 64 20 73 74 6f | ; And sto| 00005950 72 65 20 74 68 65 20 76 61 6c 75 65 20 69 6e 20 |re the value in | 00005960 6e 65 77 74 69 6c 65 0d 19 1e 40 42 4c 20 63 68 |newtile...@BL ch| 00005970 61 6e 67 65 74 69 6c 65 20 20 20 20 20 20 20 20 |angetile | 00005980 20 20 20 20 20 3b 20 54 68 65 6e 20 63 68 61 6e | ; Then chan| 00005990 67 65 20 74 68 65 20 74 69 6c 65 20 69 6e 74 6f |ge the tile into| 000059a0 20 61 20 72 6f 63 6b 0d 19 28 45 4d 4f 56 20 52 | a rock..(EMOV R| 000059b0 30 2c 23 30 20 20 20 20 20 20 20 20 20 20 20 20 |0,#0 | 000059c0 20 20 20 20 20 3b 20 53 65 74 20 52 30 20 74 6f | ; Set R0 to| 000059d0 20 74 68 65 20 76 61 6c 75 65 20 30 20 28 30 3d | the value 0 (0=| 000059e0 42 6c 61 6e 6b 20 73 70 61 63 65 29 0d 19 32 3e |Blank space)..2>| 000059f0 53 54 52 20 52 30 2c 6e 65 77 74 69 6c 65 20 20 |STR R0,newtile | 00005a00 20 20 20 20 20 20 20 20 20 20 3b 20 41 6e 64 20 | ; And | 00005a10 73 74 6f 72 65 20 74 68 65 20 76 61 6c 75 65 20 |store the value | 00005a20 69 6e 20 6e 65 77 74 69 6c 65 0d 19 3c 2c 4c 44 |in newtile..<,LD| 00005a30 52 20 52 30 2c 78 73 74 6f 72 65 3a 41 44 44 20 |R R0,xstore:ADD | 00005a40 52 30 2c 52 30 2c 23 31 3a 53 54 52 20 52 30 2c |R0,R0,#1:STR R0,| 00005a50 78 73 74 6f 72 65 0d 19 46 4b 42 4c 20 63 68 61 |xstore..FKBL cha| 00005a60 6e 67 65 74 69 6c 65 20 20 20 20 20 20 20 20 20 |ngetile | 00005a70 20 20 20 20 3b 20 54 68 65 6e 20 62 6c 61 6e 6b | ; Then blank| 00005a80 20 6f 76 65 72 20 74 68 65 20 6f 6c 64 20 72 6f | over the old ro| 00005a90 63 6b 20 77 69 74 68 20 74 68 65 20 73 70 61 63 |ck with the spac| 00005aa0 65 0d 19 50 4c 4d 4f 56 20 52 30 2c 23 31 20 20 |e..PLMOV R0,#1 | 00005ab0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00005ac0 20 4c 6f 61 64 20 52 30 20 77 69 74 68 20 74 68 | Load R0 with th| 00005ad0 65 20 76 61 6c 75 65 20 31 20 28 31 3d 59 65 73 |e value 1 (1=Yes| 00005ae0 20 68 65 20 63 61 6e 20 6d 6f 76 65 29 0d 19 5a | he can move)..Z| 00005af0 41 53 54 52 20 52 30 2c 63 61 6e 68 65 6d 6f 76 |ASTR R0,canhemov| 00005b00 65 20 20 20 20 20 20 20 20 20 20 3b 20 41 6e 64 |e ; And| 00005b10 20 73 65 74 20 74 68 65 20 63 61 6e 68 65 6d 6f | set the canhemo| 00005b20 76 65 20 77 6f 72 64 20 74 6f 20 6f 6e 65 0d 19 |ve word to one..| 00005b30 64 38 4c 44 52 20 52 31 34 2c 63 68 65 63 6b 6c |d8LDR R14,checkl| 00005b40 69 6e 6b 20 20 20 20 20 20 20 20 20 3b 20 52 65 |ink ; Re| 00005b50 6c 6f 61 64 20 74 68 65 20 6c 69 6e 6b 20 72 65 |load the link re| 00005b60 67 69 73 74 65 72 0d 19 6e 46 4d 4f 56 20 50 43 |gister..nFMOV PC| 00005b70 2c 52 31 34 20 20 20 20 20 20 20 20 20 20 20 20 |,R14 | 00005b80 20 20 20 20 3b 20 41 6e 64 20 65 78 69 74 20 74 | ; And exit t| 00005b90 68 65 20 72 6f 75 74 69 6e 65 2c 20 74 68 65 20 |he routine, the | 00005ba0 6d 61 6e 20 63 61 6e 20 6d 6f 76 65 0d 19 78 05 |man can move..x.| 00005bb0 3a 0d 19 82 0f 2e 73 63 72 65 65 6e 62 61 6e 6b |:.....screenbank| 00005bc0 0d 19 8c 2e 4d 4f 56 20 52 30 2c 23 31 39 3a 53 |....MOV R0,#19:S| 00005bd0 57 49 20 22 4f 53 5f 42 79 74 65 22 20 20 3b 20 |WI "OS_Byte" ; | 00005be0 57 61 69 74 20 66 6f 72 20 56 73 79 6e 63 0d 19 |Wait for Vsync..| 00005bf0 96 12 4c 44 52 20 52 39 2c 62 61 6e 6b 6e 75 6d |..LDR R9,banknum| 00005c00 0d 19 a0 3a 43 4d 50 20 52 39 2c 23 30 20 20 20 |...:CMP R9,#0 | 00005c10 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00005c20 57 61 73 20 62 61 6e 6b 20 30 20 77 72 69 74 74 |Was bank 0 writt| 00005c30 65 6e 20 74 6f 20 6c 61 73 74 0d 19 aa 38 ec 51 |en to last...8.Q| 00005c40 20 52 39 2c 23 34 20 20 20 20 20 20 20 20 20 20 | R9,#4 | 00005c50 20 20 20 20 20 3b 20 49 66 20 79 65 73 20 77 72 | ; If yes wr| 00005c60 69 74 65 20 74 6f 20 62 61 6e 6b 20 34 20 6e 65 |ite to bank 4 ne| 00005c70 78 74 0d 19 b4 3b 4d 4f 56 4e 45 20 52 39 2c 23 |xt...;MOVNE R9,#| 00005c80 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0 | 00005c90 3b 20 49 66 20 6e 6f 74 20 77 72 69 74 65 20 74 |; If not write t| 00005ca0 6f 20 62 61 6e 6b 20 30 20 6e 65 78 74 0d 19 be |o bank 0 next...| 00005cb0 12 53 54 52 20 52 39 2c 62 61 6e 6b 6e 75 6d 0d |.STR R9,banknum.| 00005cc0 19 c8 37 4d 4f 56 20 52 30 2c 23 31 31 33 20 20 |..7MOV R0,#113 | 00005cd0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 | ; S| 00005ce0 65 74 20 52 30 20 74 6f 20 74 68 65 20 76 61 6c |et R0 to the val| 00005cf0 75 65 20 31 31 33 0d 19 d2 12 4c 44 52 20 52 39 |ue 113....LDR R9| 00005d00 2c 62 61 6e 6b 6e 75 6d 0d 19 dc 0d 43 4d 50 20 |,banknum....CMP | 00005d10 52 39 2c 23 34 0d 19 e6 0c ec 51 20 52 31 2c 23 |R9,#4.....Q R1,#| 00005d20 31 0d 19 f0 0f 4d 4f 56 4e 45 20 52 31 2c 23 32 |1....MOVNE R1,#2| 00005d30 0d 19 fa 11 53 57 49 20 22 4f 53 5f 42 79 74 65 |....SWI "OS_Byte| 00005d40 22 0d 1a 04 0e 4d 4f 56 20 50 43 2c 52 31 34 0d |"....MOV PC,R14.| 00005d50 1a 0e 05 3a 0d 1a 18 0e 2e 66 6f 75 72 73 79 6e |...:.....foursyn| 00005d60 63 73 0d 1a 22 2e 4d 4f 56 20 52 30 2c 23 31 39 |cs..".MOV R0,#19| 00005d70 3a 53 57 49 20 22 4f 53 5f 42 79 74 65 22 20 20 |:SWI "OS_Byte" | 00005d80 3b 20 57 61 69 74 20 66 6f 72 20 56 73 79 6e 63 |; Wait for Vsync| 00005d90 0d 1a 2c 2e 4d 4f 56 20 52 30 2c 23 31 39 3a 53 |..,.MOV R0,#19:S| 00005da0 57 49 20 22 4f 53 5f 42 79 74 65 22 20 20 3b 20 |WI "OS_Byte" ; | 00005db0 57 61 69 74 20 66 6f 72 20 56 73 79 6e 63 0d 1a |Wait for Vsync..| 00005dc0 36 2e 4d 4f 56 20 52 30 2c 23 31 39 3a 53 57 49 |6.MOV R0,#19:SWI| 00005dd0 20 22 4f 53 5f 42 79 74 65 22 20 20 3b 20 57 61 | "OS_Byte" ; Wa| 00005de0 69 74 20 66 6f 72 20 56 73 79 6e 63 0d 1a 40 1c |it for Vsync..@.| 00005df0 4d 4f 56 20 52 30 2c 23 31 39 3a 53 57 49 20 22 |MOV R0,#19:SWI "| 00005e00 4f 53 5f 42 79 74 65 22 0d 1a 4a 1c 4d 4f 56 20 |OS_Byte"..J.MOV | 00005e10 52 30 2c 23 31 39 3a 53 57 49 20 22 4f 53 5f 42 |R0,#19:SWI "OS_B| 00005e20 79 74 65 22 0d 1a 54 1c 4d 4f 56 20 52 30 2c 23 |yte"..T.MOV R0,#| 00005e30 31 39 3a 53 57 49 20 22 4f 53 5f 42 79 74 65 22 |19:SWI "OS_Byte"| 00005e40 0d 1a 5e 2e 4d 4f 56 20 52 30 2c 23 31 39 3a 53 |..^.MOV R0,#19:S| 00005e50 57 49 20 22 4f 53 5f 42 79 74 65 22 20 20 3b 20 |WI "OS_Byte" ; | 00005e60 57 61 69 74 20 66 6f 72 20 56 73 79 6e 63 0d 1a |Wait for Vsync..| 00005e70 68 2e 4d 4f 56 20 52 30 2c 23 31 39 3a 53 57 49 |h.MOV R0,#19:SWI| 00005e80 20 22 4f 53 5f 42 79 74 65 22 20 20 3b 20 57 61 | "OS_Byte" ; Wa| 00005e90 69 74 20 66 6f 72 20 56 73 79 6e 63 0d 1a 72 2e |it for Vsync..r.| 00005ea0 4d 4f 56 20 52 30 2c 23 31 39 3a 53 57 49 20 22 |MOV R0,#19:SWI "| 00005eb0 4f 53 5f 42 79 74 65 22 20 20 3b 20 57 61 69 74 |OS_Byte" ; Wait| 00005ec0 20 66 6f 72 20 56 73 79 6e 63 0d 1a 7c 0e 4d 4f | for Vsync..|.MO| 00005ed0 56 20 50 43 2c 52 31 34 0d 1a 86 05 3a 0d 1a 90 |V PC,R14....:...| 00005ee0 0e 2e 63 6c 65 61 72 6b 65 79 73 0d 1a 9a 0e 4d |..clearkeys....M| 00005ef0 4f 56 20 52 30 2c 23 31 35 0d 1a a4 0d 4d 4f 56 |OV R0,#15....MOV| 00005f00 20 52 31 2c 23 31 0d 1a ae 11 53 57 49 20 22 4f | R1,#1....SWI "O| 00005f10 53 5f 42 79 74 65 22 0d 1a b8 0e 4d 4f 56 20 50 |S_Byte"....MOV P| 00005f20 43 2c 52 31 34 0d 1a c2 05 3a 0d 1a cc 11 2e 64 |C,R14....:.....d| 00005f30 69 64 6d 61 70 73 63 72 6f 6c 6c 0d 1a d6 09 45 |idmapscroll....E| 00005f40 51 55 44 30 0d 1a e0 0f 2e 73 63 72 6f 6c 6c 6c |QUD0.....scrolll| 00005f50 65 66 74 0d 1a ea 14 53 54 52 20 52 31 34 2c 6d |eft....STR R14,m| 00005f60 6f 76 65 6c 69 6e 6b 0d 1a f4 0d 4d 4f 56 20 52 |ovelink....MOV R| 00005f70 30 2c 23 30 0d 1a fe 14 53 54 52 20 52 30 2c 64 |0,#0....STR R0,d| 00005f80 69 72 65 63 74 69 6f 6e 0d 1b 08 1f 4d 4f 56 52 |irection....MOVR| 00005f90 30 2c 23 31 3a 53 54 52 52 30 2c 64 69 64 6d 61 |0,#1:STRR0,didma| 00005fa0 70 73 63 72 6f 6c 6c 0d 1b 12 2d 4c 44 52 20 52 |pscroll...-LDR R| 00005fb0 30 2c 78 6d 61 70 70 6f 73 3a 41 44 44 20 52 30 |0,xmappos:ADD R0| 00005fc0 2c 52 30 2c 23 34 3a 53 54 52 20 52 30 2c 78 73 |,R0,#4:STR R0,xs| 00005fd0 74 6f 72 65 0d 1b 1c 2d 4c 44 52 20 52 30 2c 79 |tore...-LDR R0,y| 00005fe0 6d 61 70 70 6f 73 3a 41 44 44 20 52 30 2c 52 30 |mappos:ADD R0,R0| 00005ff0 2c 23 33 3a 53 54 52 20 52 30 2c 79 73 74 6f 72 |,#3:STR R0,ystor| 00006000 65 0d 1b 26 48 42 4c 20 63 68 65 63 6b 74 69 6c |e..&HBL checktil| 00006010 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |e | 00006020 20 20 20 20 20 20 3b 20 57 68 61 74 20 74 79 70 | ; What typ| 00006030 65 20 69 73 20 74 68 65 20 64 65 73 74 69 6e 61 |e is the destina| 00006040 74 69 6f 6e 20 74 69 6c 65 0d 1b 30 38 42 4c 20 |tion tile..08BL | 00006050 63 61 6e 6d 6f 76 65 20 20 20 20 20 20 20 20 20 |canmove | 00006060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00006070 43 61 6e 20 68 65 20 77 61 6c 6b 20 6f 6e 20 69 |Can he walk on i| 00006080 74 0d 1b 3a 36 4c 44 52 20 52 30 2c 63 61 6e 68 |t..:6LDR R0,canh| 00006090 65 6d 6f 76 65 20 20 20 20 20 20 20 20 20 20 20 |emove | 000060a0 20 20 20 20 20 20 3b 20 42 65 74 74 65 72 20 66 | ; Better f| 000060b0 69 6e 64 20 6f 75 74 0d 1b 44 3c 43 4d 50 20 52 |ind out..D<CMP R| 000060c0 30 2c 23 34 20 20 20 20 20 20 20 20 20 20 20 20 |0,#4 | 000060d0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 73 | ; Is| 000060e0 20 74 68 65 72 65 20 61 20 72 6f 63 6b 20 74 68 | there a rock th| 000060f0 65 72 65 0d 1b 4e 47 42 4c 45 51 20 63 68 65 63 |ere..NGBLEQ chec| 00006100 6b 72 6f 63 6b 6c 65 66 74 20 20 20 20 20 20 20 |krockleft | 00006110 20 20 20 20 20 20 20 20 3b 20 49 66 20 73 6f 2c | ; If so,| 00006120 20 66 69 6e 64 20 6f 75 74 20 69 66 20 69 74 20 | find out if it | 00006130 69 73 20 6d 6f 76 61 62 6c 65 0d 1b 58 3b 43 4d |is movable..X;CM| 00006140 50 20 52 30 2c 23 35 20 20 20 20 20 20 20 20 20 |P R0,#5 | 00006150 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00006160 20 49 73 20 74 68 65 72 65 20 65 61 72 74 68 20 | Is there earth | 00006170 74 68 65 72 65 0d 1b 62 11 42 4c 45 51 20 67 65 |there..b.BLEQ ge| 00006180 74 65 61 72 74 68 0d 1b 6c 0d 43 4d 50 20 52 30 |tearth..l.CMP R0| 00006190 2c 23 33 0d 1b 76 10 42 4c 45 51 20 67 65 74 67 |,#3..v.BLEQ getg| 000061a0 6f 6c 64 0d 1b 80 43 4c 44 52 20 52 30 2c 63 61 |old...CLDR R0,ca| 000061b0 6e 68 65 6d 6f 76 65 20 20 20 20 20 20 20 20 20 |nhemove | 000061c0 20 20 20 20 20 20 20 20 3b 20 41 6e 64 20 72 65 | ; And re| 000061d0 6c 6f 61 64 20 52 30 20 77 69 74 68 20 63 61 6e |load R0 with can| 000061e0 68 65 6d 6f 76 65 0d 1b 8a 41 43 4d 50 20 52 30 |hemove...ACMP R0| 000061f0 2c 23 30 20 20 20 20 20 20 20 20 20 20 20 20 20 |,#0 | 00006200 20 20 20 20 20 20 20 20 20 20 20 3b 20 43 68 65 | ; Che| 00006210 63 6b 20 69 66 20 68 65 20 63 61 6e 20 77 61 6c |ck if he can wal| 00006220 6b 20 6f 6e 20 69 74 0d 1b 94 41 42 45 51 20 65 |k on it...ABEQ e| 00006230 6e 64 6d 6f 76 65 20 20 20 20 20 20 20 20 20 20 |ndmove | 00006240 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 61 6e | ; an| 00006250 64 20 69 66 20 68 65 20 63 61 6e 74 20 64 6f 6e |d if he cant don| 00006260 74 20 73 63 72 6f 6c 6c 0d 1b 9e 3b 43 4d 50 20 |t scroll...;CMP | 00006270 52 30 2c 23 32 20 20 20 20 20 20 20 20 20 20 20 |R0,#2 | 00006280 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 44 | ; D| 00006290 6f 65 73 20 74 68 65 20 74 69 6c 65 20 6b 69 6c |oes the tile kil| 000062a0 6c 20 3f 0d 1b a8 4b 42 45 51 20 65 6e 64 6d 6f |l ?...KBEQ endmo| 000062b0 76 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |ve | 000062c0 20 20 20 20 20 20 20 20 3b 20 49 66 20 79 65 73 | ; If yes| 000062d0 20 64 6f 6e 74 20 62 6f 74 68 65 72 20 73 63 72 | dont bother scr| 000062e0 6f 6c 6c 69 6e 67 20 6f 6e 74 6f 20 69 74 0d 1b |olling onto it..| 000062f0 b2 0d 4d 4f 56 20 52 30 2c 23 30 0d 1b bc 3d 53 |..MOV R0,#0...=S| 00006300 54 52 20 52 30 2c 73 63 72 6f 6c 6c 63 6f 75 6e |TR R0,scrollcoun| 00006310 74 65 72 20 20 20 20 20 20 3b 20 53 65 74 20 74 |ter ; Set t| 00006320 68 65 20 73 63 72 6f 6c 6c 63 6f 75 6e 74 65 72 |he scrollcounter| 00006330 20 74 6f 20 7a 65 72 6f 0d 1b c6 11 42 4c 20 73 | to zero....BL s| 00006340 63 72 65 65 6e 62 61 6e 6b 0d 1b d0 0e 42 4c 20 |creenbank....BL | 00006350 70 6c 6f 74 6d 61 70 0d 1b da 0e 42 4c 20 70 6c |plotmap....BL pl| 00006360 6f 74 68 69 6d 0d 1b e4 10 2e 6c 65 66 74 73 63 |othim.....leftsc| 00006370 72 6c 6f 6f 70 0d 1b ee 14 4c 44 52 20 52 30 2c |rloop....LDR R0,| 00006380 73 74 61 72 74 78 70 6f 73 0d 1b f8 10 53 55 42 |startxpos....SUB| 00006390 20 52 30 2c 52 30 2c 23 34 0d 1c 02 14 53 54 52 | R0,R0,#4....STR| 000063a0 20 52 30 2c 73 74 61 72 74 78 70 6f 73 0d 1c 0c | R0,startxpos...| 000063b0 11 42 4c 20 73 63 72 65 65 6e 62 61 6e 6b 0d 1c |.BL screenbank..| 000063c0 16 2e 42 4c 20 70 6c 6f 74 6d 61 70 20 20 20 20 |..BL plotmap | 000063d0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 52 65 | ; Re| 000063e0 64 72 61 77 20 74 68 65 20 6d 61 70 0d 1c 20 33 |draw the map.. 3| 000063f0 42 4c 20 70 6c 6f 74 68 69 6d 20 20 20 20 20 20 |BL plothim | 00006400 20 20 20 20 20 20 20 20 20 20 3b 20 50 6c 6f 74 | ; Plot| 00006410 20 74 68 65 20 63 68 61 72 61 63 74 65 72 73 0d | the characters.| 00006420 1c 2a 3e 4c 44 52 20 52 30 2c 73 63 72 6f 6c 6c |.*>LDR R0,scroll| 00006430 63 6f 75 6e 74 65 72 20 20 20 20 20 20 3b 20 4c |counter ; L| 00006440 6f 61 64 20 74 68 65 20 73 63 72 6f 6c 6c 63 6f |oad the scrollco| 00006450 75 6e 74 65 72 20 69 6e 74 6f 20 52 30 0d 1c 34 |unter into R0..4| 00006460 3a 41 44 44 20 52 30 2c 52 30 2c 23 31 20 20 20 |:ADD R0,R0,#1 | 00006470 20 20 20 20 20 20 20 20 20 20 20 3b 20 41 64 64 | ; Add| 00006480 20 31 20 74 6f 20 74 68 65 20 73 63 72 6f 6c 6c | 1 to the scroll| 00006490 63 6f 75 6e 74 65 72 0d 1c 3e 45 53 54 52 20 52 |counter..>ESTR R| 000064a0 30 2c 73 63 72 6f 6c 6c 63 6f 75 6e 74 65 72 20 |0,scrollcounter | 000064b0 20 20 20 20 20 3b 20 53 61 76 65 20 74 68 65 20 | ; Save the | 000064c0 73 63 72 6f 6c 6c 63 6f 75 6e 74 65 72 20 62 61 |scrollcounter ba| 000064d0 63 6b 20 74 6f 20 6d 65 6d 6f 72 79 0d 1c 48 3f |ck to memory..H?| 000064e0 43 4d 50 20 52 30 2c 23 34 20 20 20 20 20 20 20 |CMP R0,#4 | 000064f0 20 20 20 20 20 20 20 20 20 20 3b 20 48 61 76 65 | ; Have| 00006500 20 34 20 73 63 72 6f 6c 6c 73 20 62 65 65 6e 20 | 4 scrolls been | 00006510 63 6f 6d 70 6c 65 74 65 64 20 3f 0d 1c 52 30 42 |completed ?..R0B| 00006520 4e 45 20 6c 65 66 74 73 63 72 6c 6f 6f 70 20 20 |NE leftscrloop | 00006530 20 20 20 20 20 20 20 20 20 3b 20 49 66 20 6e 6f | ; If no| 00006540 74 20 6c 6f 6f 70 20 62 61 63 6b 0d 1c 5c 12 4c |t loop back..\.L| 00006550 44 52 20 52 30 2c 78 6d 61 70 70 6f 73 0d 1c 66 |DR R0,xmappos..f| 00006560 10 41 44 44 20 52 30 2c 52 30 2c 23 31 0d 1c 70 |.ADD R0,R0,#1..p| 00006570 12 53 54 52 20 52 30 2c 78 6d 61 70 70 6f 73 0d |.STR R0,xmappos.| 00006580 1c 7a 14 4c 44 52 20 52 30 2c 73 74 61 72 74 78 |.z.LDR R0,startx| 00006590 70 6f 73 0d 1c 84 11 41 44 44 20 52 30 2c 52 30 |pos....ADD R0,R0| 000065a0 2c 23 31 36 0d 1c 8e 14 53 54 52 20 52 30 2c 73 |,#16....STR R0,s| 000065b0 74 61 72 74 78 70 6f 73 0d 1c 98 0f 42 4c 20 6e |tartxpos....BL n| 000065c0 65 77 66 72 61 6d 65 0d 1c a2 0c 2e 65 6e 64 6d |ewframe.....endm| 000065d0 6f 76 65 0d 1c ac 14 4c 44 52 20 52 31 34 2c 6d |ove....LDR R14,m| 000065e0 6f 76 65 6c 69 6e 6b 0d 1c b6 0e 4d 4f 56 20 50 |ovelink....MOV P| 000065f0 43 2c 52 31 34 0d 1c c0 05 3a 0d 1c ca 10 2e 73 |C,R14....:.....s| 00006600 63 72 6f 6c 6c 72 69 67 68 74 0d 1c d4 14 53 54 |crollright....ST| 00006610 52 20 52 31 34 2c 6d 6f 76 65 6c 69 6e 6b 0d 1c |R R14,movelink..| 00006620 de 0d 4d 4f 56 20 52 30 2c 23 32 0d 1c e8 14 53 |..MOV R0,#2....S| 00006630 54 52 20 52 30 2c 64 69 72 65 63 74 69 6f 6e 0d |TR R0,direction.| 00006640 1c f2 1f 4d 4f 56 52 30 2c 23 31 3a 53 54 52 52 |...MOVR0,#1:STRR| 00006650 30 2c 64 69 64 6d 61 70 73 63 72 6f 6c 6c 0d 1c |0,didmapscroll..| 00006660 fc 2d 4c 44 52 20 52 30 2c 78 6d 61 70 70 6f 73 |.-LDR R0,xmappos| 00006670 3a 41 44 44 20 52 30 2c 52 30 2c 23 32 3a 53 54 |:ADD R0,R0,#2:ST| 00006680 52 20 52 30 2c 78 73 74 6f 72 65 0d 1d 06 2d 4c |R R0,xstore...-L| 00006690 44 52 20 52 30 2c 79 6d 61 70 70 6f 73 3a 41 44 |DR R0,ymappos:AD| 000066a0 44 20 52 30 2c 52 30 2c 23 33 3a 53 54 52 20 52 |D R0,R0,#3:STR R| 000066b0 30 2c 79 73 74 6f 72 65 0d 1d 10 48 42 4c 20 63 |0,ystore...HBL c| 000066c0 68 65 63 6b 74 69 6c 65 20 20 20 20 20 20 20 20 |hecktile | 000066d0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 57 | ; W| 000066e0 68 61 74 20 74 79 70 65 20 69 73 20 74 68 65 20 |hat type is the | 000066f0 64 65 73 74 69 6e 61 74 69 6f 6e 20 74 69 6c 65 |destination tile| 00006700 0d 1d 1a 38 42 4c 20 63 61 6e 6d 6f 76 65 20 20 |...8BL canmove | 00006710 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006720 20 20 20 20 20 3b 20 43 61 6e 20 68 65 20 77 61 | ; Can he wa| 00006730 6c 6b 20 6f 6e 20 69 74 0d 1d 24 36 4c 44 52 20 |lk on it..$6LDR | 00006740 52 30 2c 63 61 6e 68 65 6d 6f 76 65 20 20 20 20 |R0,canhemove | 00006750 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 42 | ; B| 00006760 65 74 74 65 72 20 66 69 6e 64 20 6f 75 74 0d 1d |etter find out..| 00006770 2e 3c 43 4d 50 20 52 30 2c 23 34 20 20 20 20 20 |.<CMP R0,#4 | 00006780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006790 20 20 20 3b 20 49 73 20 74 68 65 72 65 20 61 20 | ; Is there a | 000067a0 72 6f 63 6b 20 74 68 65 72 65 0d 1d 38 47 42 4c |rock there..8GBL| 000067b0 45 51 20 63 68 65 63 6b 72 6f 63 6b 72 69 67 68 |EQ checkrockrigh| 000067c0 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b |t ;| 000067d0 20 49 66 20 73 6f 2c 20 66 69 6e 64 20 6f 75 74 | If so, find out| 000067e0 20 69 66 20 69 74 20 69 73 20 6d 6f 76 61 62 6c | if it is movabl| 000067f0 65 0d 1d 42 3b 43 4d 50 20 52 30 2c 23 35 20 20 |e..B;CMP R0,#5 | 00006800 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006810 20 20 20 20 20 20 3b 20 49 73 20 74 68 65 72 65 | ; Is there| 00006820 20 65 61 72 74 68 20 74 68 65 72 65 0d 1d 4c 11 | earth there..L.| 00006830 42 4c 45 51 20 67 65 74 65 61 72 74 68 0d 1d 56 |BLEQ getearth..V| 00006840 0d 43 4d 50 20 52 30 2c 23 33 0d 1d 60 10 42 4c |.CMP R0,#3..`.BL| 00006850 45 51 20 67 65 74 67 6f 6c 64 0d 1d 6a 43 4c 44 |EQ getgold..jCLD| 00006860 52 20 52 30 2c 63 61 6e 68 65 6d 6f 76 65 20 20 |R R0,canhemove | 00006870 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00006880 20 41 6e 64 20 72 65 6c 6f 61 64 20 52 30 20 77 | And reload R0 w| 00006890 69 74 68 20 63 61 6e 68 65 6d 6f 76 65 0d 1d 74 |ith canhemove..t| 000068a0 41 43 4d 50 20 52 30 2c 23 30 20 20 20 20 20 20 |ACMP R0,#0 | 000068b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000068c0 20 20 3b 20 43 68 65 63 6b 20 69 66 20 68 65 20 | ; Check if he | 000068d0 63 61 6e 20 77 61 6c 6b 20 6f 6e 20 69 74 0d 1d |can walk on it..| 000068e0 7e 41 42 45 51 20 65 6e 64 6d 6f 76 65 20 20 20 |~ABEQ endmove | 000068f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006900 20 20 20 3b 20 61 6e 64 20 69 66 20 68 65 20 63 | ; and if he c| 00006910 61 6e 74 20 64 6f 6e 74 20 73 63 72 6f 6c 6c 0d |ant dont scroll.| 00006920 1d 88 3b 43 4d 50 20 52 30 2c 23 32 20 20 20 20 |..;CMP R0,#2 | 00006930 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006940 20 20 20 20 3b 20 44 6f 65 73 20 74 68 65 20 74 | ; Does the t| 00006950 69 6c 65 20 6b 69 6c 6c 20 3f 0d 1d 92 4b 42 45 |ile kill ?...KBE| 00006960 51 20 65 6e 64 6d 6f 76 65 20 20 20 20 20 20 20 |Q endmove | 00006970 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00006980 20 49 66 20 79 65 73 20 64 6f 6e 74 20 62 6f 74 | If yes dont bot| 00006990 68 65 72 20 73 63 72 6f 6c 6c 69 6e 67 20 6f 6e |her scrolling on| 000069a0 74 6f 20 69 74 0d 1d 9c 0d 4d 4f 56 20 52 30 2c |to it....MOV R0,| 000069b0 23 30 0d 1d a6 3d 53 54 52 20 52 30 2c 73 63 72 |#0...=STR R0,scr| 000069c0 6f 6c 6c 63 6f 75 6e 74 65 72 20 20 20 20 20 20 |ollcounter | 000069d0 3b 20 53 65 74 20 74 68 65 20 73 63 72 6f 6c 6c |; Set the scroll| 000069e0 63 6f 75 6e 74 65 72 20 74 6f 20 7a 65 72 6f 0d |counter to zero.| 000069f0 1d b0 11 2e 72 69 67 68 74 73 63 72 6c 6f 6f 70 |....rightscrloop| 00006a00 0d 1d ba 14 4c 44 52 20 52 30 2c 73 74 61 72 74 |....LDR R0,start| 00006a10 78 70 6f 73 0d 1d c4 10 41 44 44 20 52 30 2c 52 |xpos....ADD R0,R| 00006a20 30 2c 23 34 0d 1d ce 14 53 54 52 20 52 30 2c 73 |0,#4....STR R0,s| 00006a30 74 61 72 74 78 70 6f 73 0d 1d d8 11 42 4c 20 73 |tartxpos....BL s| 00006a40 63 72 65 65 6e 62 61 6e 6b 0d 1d e2 2e 42 4c 20 |creenbank....BL | 00006a50 70 6c 6f 74 6d 61 70 20 20 20 20 20 20 20 20 20 |plotmap | 00006a60 20 20 20 20 20 20 20 3b 20 52 65 64 72 61 77 20 | ; Redraw | 00006a70 74 68 65 20 6d 61 70 0d 1d ec 0e 42 4c 20 70 6c |the map....BL pl| 00006a80 6f 74 68 69 6d 0d 1d f6 3e 4c 44 52 20 52 30 2c |othim...>LDR R0,| 00006a90 73 63 72 6f 6c 6c 63 6f 75 6e 74 65 72 20 20 20 |scrollcounter | 00006aa0 20 20 20 3b 20 4c 6f 61 64 20 74 68 65 20 73 63 | ; Load the sc| 00006ab0 72 6f 6c 6c 63 6f 75 6e 74 65 72 20 69 6e 74 6f |rollcounter into| 00006ac0 20 52 30 0d 1e 00 3a 41 44 44 20 52 30 2c 52 30 | R0...:ADD R0,R0| 00006ad0 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 20 20 |,#1 | 00006ae0 20 3b 20 41 64 64 20 31 20 74 6f 20 74 68 65 20 | ; Add 1 to the | 00006af0 73 63 72 6f 6c 6c 63 6f 75 6e 74 65 72 0d 1e 0a |scrollcounter...| 00006b00 45 53 54 52 20 52 30 2c 73 63 72 6f 6c 6c 63 6f |ESTR R0,scrollco| 00006b10 75 6e 74 65 72 20 20 20 20 20 20 3b 20 53 61 76 |unter ; Sav| 00006b20 65 20 74 68 65 20 73 63 72 6f 6c 6c 63 6f 75 6e |e the scrollcoun| 00006b30 74 65 72 20 62 61 63 6b 20 74 6f 20 6d 65 6d 6f |ter back to memo| 00006b40 72 79 0d 1e 14 3f 43 4d 50 20 52 30 2c 23 34 20 |ry...?CMP R0,#4 | 00006b50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006b60 3b 20 48 61 76 65 20 34 20 73 63 72 6f 6c 6c 73 |; Have 4 scrolls| 00006b70 20 62 65 65 6e 20 63 6f 6d 70 6c 65 74 65 64 20 | been completed | 00006b80 3f 0d 1e 1e 30 42 4e 45 20 72 69 67 68 74 73 63 |?...0BNE rightsc| 00006b90 72 6c 6f 6f 70 20 20 20 20 20 20 20 20 20 20 3b |rloop ;| 00006ba0 20 49 66 20 6e 6f 74 20 6c 6f 6f 70 20 62 61 63 | If not loop bac| 00006bb0 6b 0d 1e 28 12 4c 44 52 20 52 30 2c 78 6d 61 70 |k..(.LDR R0,xmap| 00006bc0 70 6f 73 0d 1e 32 10 53 55 42 20 52 30 2c 52 30 |pos..2.SUB R0,R0| 00006bd0 2c 23 31 0d 1e 3c 12 53 54 52 20 52 30 2c 78 6d |,#1..<.STR R0,xm| 00006be0 61 70 70 6f 73 0d 1e 46 14 4c 44 52 20 52 30 2c |appos..F.LDR R0,| 00006bf0 73 74 61 72 74 78 70 6f 73 0d 1e 50 11 53 55 42 |startxpos..P.SUB| 00006c00 20 52 30 2c 52 30 2c 23 31 36 0d 1e 5a 14 53 54 | R0,R0,#16..Z.ST| 00006c10 52 20 52 30 2c 73 74 61 72 74 78 70 6f 73 0d 1e |R R0,startxpos..| 00006c20 64 0f 42 4c 20 6e 65 77 66 72 61 6d 65 0d 1e 6e |d.BL newframe..n| 00006c30 14 4c 44 52 20 52 31 34 2c 6d 6f 76 65 6c 69 6e |.LDR R14,movelin| 00006c40 6b 0d 1e 78 0e 4d 4f 56 20 50 43 2c 52 31 34 0d |k..x.MOV PC,R14.| 00006c50 1e 82 05 3a 0d 1e 8c 0d 2e 73 63 72 6f 6c 6c 75 |...:.....scrollu| 00006c60 70 0d 1e 96 14 53 54 52 20 52 31 34 2c 6d 6f 76 |p....STR R14,mov| 00006c70 65 6c 69 6e 6b 0d 1e a0 0d 4d 4f 56 20 52 30 2c |elink....MOV R0,| 00006c80 23 36 0d 1e aa 14 53 54 52 20 52 30 2c 64 69 72 |#6....STR R0,dir| 00006c90 65 63 74 69 6f 6e 0d 1e b4 1f 4d 4f 56 52 30 2c |ection....MOVR0,| 00006ca0 23 31 3a 53 54 52 52 30 2c 64 69 64 6d 61 70 73 |#1:STRR0,didmaps| 00006cb0 63 72 6f 6c 6c 0d 1e be 2d 4c 44 52 20 52 30 2c |croll...-LDR R0,| 00006cc0 78 6d 61 70 70 6f 73 3a 41 44 44 20 52 30 2c 52 |xmappos:ADD R0,R| 00006cd0 30 2c 23 33 3a 53 54 52 20 52 30 2c 78 73 74 6f |0,#3:STR R0,xsto| 00006ce0 72 65 0d 1e c8 2d 4c 44 52 20 52 30 2c 79 6d 61 |re...-LDR R0,yma| 00006cf0 70 70 6f 73 3a 41 44 44 20 52 30 2c 52 30 2c 23 |ppos:ADD R0,R0,#| 00006d00 34 3a 53 54 52 20 52 30 2c 79 73 74 6f 72 65 0d |4:STR R0,ystore.| 00006d10 1e d2 48 42 4c 20 63 68 65 63 6b 74 69 6c 65 20 |..HBL checktile | 00006d20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006d30 20 20 20 20 3b 20 57 68 61 74 20 74 79 70 65 20 | ; What type | 00006d40 69 73 20 74 68 65 20 64 65 73 74 69 6e 61 74 69 |is the destinati| 00006d50 6f 6e 20 74 69 6c 65 0d 1e dc 0e 42 4c 20 63 61 |on tile....BL ca| 00006d60 6e 6d 6f 76 65 0d 1e e6 14 4c 44 52 20 52 30 2c |nmove....LDR R0,| 00006d70 63 61 6e 68 65 6d 6f 76 65 0d 1e f0 0d 43 4d 50 |canhemove....CMP| 00006d80 20 52 30 2c 23 30 0d 1e fa 0f 42 45 51 20 65 6e | R0,#0....BEQ en| 00006d90 64 6d 6f 76 65 0d 1f 04 3b 43 4d 50 20 52 30 2c |dmove...;CMP R0,| 00006da0 23 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |#2 | 00006db0 20 20 20 20 20 20 20 20 20 20 3b 20 44 6f 65 73 | ; Does| 00006dc0 20 74 68 65 20 74 69 6c 65 20 6b 69 6c 6c 20 3f | the tile kill ?| 00006dd0 0d 1f 0e 4b 42 45 51 20 65 6e 64 6d 6f 76 65 20 |...KBEQ endmove | 00006de0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006df0 20 20 20 20 20 3b 20 49 66 20 79 65 73 20 64 6f | ; If yes do| 00006e00 6e 74 20 62 6f 74 68 65 72 20 73 63 72 6f 6c 6c |nt bother scroll| 00006e10 69 6e 67 20 6f 6e 74 6f 20 69 74 0d 1f 18 0d 43 |ing onto it....C| 00006e20 4d 50 20 52 30 2c 23 34 0d 1f 22 0f 42 45 51 20 |MP R0,#4..".BEQ | 00006e30 65 6e 64 6d 6f 76 65 0d 1f 2c 3b 43 4d 50 20 52 |endmove..,;CMP R| 00006e40 30 2c 23 35 20 20 20 20 20 20 20 20 20 20 20 20 |0,#5 | 00006e50 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 73 | ; Is| 00006e60 20 74 68 65 72 65 20 65 61 72 74 68 20 74 68 65 | there earth the| 00006e70 72 65 0d 1f 36 11 42 4c 45 51 20 67 65 74 65 61 |re..6.BLEQ getea| 00006e80 72 74 68 0d 1f 40 0d 43 4d 50 20 52 30 2c 23 33 |rth..@.CMP R0,#3| 00006e90 0d 1f 4a 10 42 4c 45 51 20 67 65 74 67 6f 6c 64 |..J.BLEQ getgold| 00006ea0 0d 1f 54 0d 4d 4f 56 20 52 30 2c 23 30 0d 1f 5e |..T.MOV R0,#0..^| 00006eb0 3d 53 54 52 20 52 30 2c 73 63 72 6f 6c 6c 63 6f |=STR R0,scrollco| 00006ec0 75 6e 74 65 72 20 20 20 20 20 20 3b 20 53 65 74 |unter ; Set| 00006ed0 20 74 68 65 20 73 63 72 6f 6c 6c 63 6f 75 6e 74 | the scrollcount| 00006ee0 65 72 20 74 6f 20 7a 65 72 6f 0d 1f 68 0e 2e 75 |er to zero..h..u| 00006ef0 70 73 63 72 6c 6f 6f 70 0d 1f 72 14 4c 44 52 20 |pscrloop..r.LDR | 00006f00 52 30 2c 73 74 61 72 74 79 70 6f 73 0d 1f 7c 13 |R0,startypos..|.| 00006f10 53 55 42 20 52 30 2c 52 30 2c 23 31 32 38 30 0d |SUB R0,R0,#1280.| 00006f20 1f 86 14 53 54 52 20 52 30 2c 73 74 61 72 74 79 |...STR R0,starty| 00006f30 70 6f 73 0d 1f 90 11 42 4c 20 73 63 72 65 65 6e |pos....BL screen| 00006f40 62 61 6e 6b 0d 1f 9a 2e 42 4c 20 70 6c 6f 74 6d |bank....BL plotm| 00006f50 61 70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |ap | 00006f60 20 20 3b 20 52 65 64 72 61 77 20 74 68 65 20 6d | ; Redraw the m| 00006f70 61 70 0d 1f a4 0e 42 4c 20 70 6c 6f 74 68 69 6d |ap....BL plothim| 00006f80 0d 1f ae 3e 4c 44 52 20 52 30 2c 73 63 72 6f 6c |...>LDR R0,scrol| 00006f90 6c 63 6f 75 6e 74 65 72 20 20 20 20 20 20 3b 20 |lcounter ; | 00006fa0 4c 6f 61 64 20 74 68 65 20 73 63 72 6f 6c 6c 63 |Load the scrollc| 00006fb0 6f 75 6e 74 65 72 20 69 6e 74 6f 20 52 30 0d 1f |ounter into R0..| 00006fc0 b8 3a 41 44 44 20 52 30 2c 52 30 2c 23 31 20 20 |.:ADD R0,R0,#1 | 00006fd0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 41 64 | ; Ad| 00006fe0 64 20 31 20 74 6f 20 74 68 65 20 73 63 72 6f 6c |d 1 to the scrol| 00006ff0 6c 63 6f 75 6e 74 65 72 0d 1f c2 45 53 54 52 20 |lcounter...ESTR | 00007000 52 30 2c 73 63 72 6f 6c 6c 63 6f 75 6e 74 65 72 |R0,scrollcounter| 00007010 20 20 20 20 20 20 3b 20 53 61 76 65 20 74 68 65 | ; Save the| 00007020 20 73 63 72 6f 6c 6c 63 6f 75 6e 74 65 72 20 62 | scrollcounter b| 00007030 61 63 6b 20 74 6f 20 6d 65 6d 6f 72 79 0d 1f cc |ack to memory...| 00007040 3f 43 4d 50 20 52 30 2c 23 34 20 20 20 20 20 20 |?CMP R0,#4 | 00007050 20 20 20 20 20 20 20 20 20 20 20 3b 20 48 61 76 | ; Hav| 00007060 65 20 34 20 73 63 72 6f 6c 6c 73 20 62 65 65 6e |e 4 scrolls been| 00007070 20 63 6f 6d 70 6c 65 74 65 64 20 3f 0d 1f d6 30 | completed ?...0| 00007080 42 4e 45 20 75 70 73 63 72 6c 6f 6f 70 20 20 20 |BNE upscrloop | 00007090 20 20 20 20 20 20 20 20 20 20 3b 20 49 66 20 6e | ; If n| 000070a0 6f 74 20 6c 6f 6f 70 20 62 61 63 6b 0d 1f e0 12 |ot loop back....| 000070b0 4c 44 52 20 52 30 2c 79 6d 61 70 70 6f 73 0d 1f |LDR R0,ymappos..| 000070c0 ea 10 41 44 44 20 52 30 2c 52 30 2c 23 31 0d 1f |..ADD R0,R0,#1..| 000070d0 f4 12 53 54 52 20 52 30 2c 79 6d 61 70 70 6f 73 |..STR R0,ymappos| 000070e0 0d 1f fe 14 4c 44 52 20 52 30 2c 73 74 61 72 74 |....LDR R0,start| 000070f0 79 70 6f 73 0d 20 08 13 41 44 44 20 52 30 2c 52 |ypos. ..ADD R0,R| 00007100 30 2c 23 35 31 32 30 0d 20 12 14 53 54 52 20 52 |0,#5120. ..STR R| 00007110 30 2c 73 74 61 72 74 79 70 6f 73 0d 20 1c 0f 42 |0,startypos. ..B| 00007120 4c 20 6e 65 77 66 72 61 6d 65 0d 20 26 14 4c 44 |L newframe. &.LD| 00007130 52 20 52 31 34 2c 6d 6f 76 65 6c 69 6e 6b 0d 20 |R R14,movelink. | 00007140 30 0e 4d 4f 56 20 50 43 2c 52 31 34 0d 20 3a 05 |0.MOV PC,R14. :.| 00007150 3a 0d 20 44 0f 2e 73 63 72 6f 6c 6c 64 6f 77 6e |:. D..scrolldown| 00007160 0d 20 4e 14 53 54 52 20 52 31 34 2c 6d 6f 76 65 |. N.STR R14,move| 00007170 6c 69 6e 6b 0d 20 58 0d 4d 4f 56 20 52 30 2c 23 |link. X.MOV R0,#| 00007180 34 0d 20 62 14 53 54 52 20 52 30 2c 64 69 72 65 |4. b.STR R0,dire| 00007190 63 74 69 6f 6e 0d 20 6c 1f 4d 4f 56 52 30 2c 23 |ction. l.MOVR0,#| 000071a0 31 3a 53 54 52 52 30 2c 64 69 64 6d 61 70 73 63 |1:STRR0,didmapsc| 000071b0 72 6f 6c 6c 0d 20 76 2d 4c 44 52 20 52 30 2c 78 |roll. v-LDR R0,x| 000071c0 6d 61 70 70 6f 73 3a 41 44 44 20 52 30 2c 52 30 |mappos:ADD R0,R0| 000071d0 2c 23 33 3a 53 54 52 20 52 30 2c 78 73 74 6f 72 |,#3:STR R0,xstor| 000071e0 65 0d 20 80 2d 4c 44 52 20 52 30 2c 79 6d 61 70 |e. .-LDR R0,ymap| 000071f0 70 6f 73 3a 41 44 44 20 52 30 2c 52 30 2c 23 32 |pos:ADD R0,R0,#2| 00007200 3a 53 54 52 20 52 30 2c 79 73 74 6f 72 65 0d 20 |:STR R0,ystore. | 00007210 8a 48 42 4c 20 63 68 65 63 6b 74 69 6c 65 20 20 |.HBL checktile | 00007220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007230 20 20 20 3b 20 57 68 61 74 20 74 79 70 65 20 69 | ; What type i| 00007240 73 20 74 68 65 20 64 65 73 74 69 6e 61 74 69 6f |s the destinatio| 00007250 6e 20 74 69 6c 65 0d 20 94 0e 42 4c 20 63 61 6e |n tile. ..BL can| 00007260 6d 6f 76 65 0d 20 9e 14 4c 44 52 20 52 30 2c 63 |move. ..LDR R0,c| 00007270 61 6e 68 65 6d 6f 76 65 0d 20 a8 0d 43 4d 50 20 |anhemove. ..CMP | 00007280 52 30 2c 23 30 0d 20 b2 0f 42 45 51 20 65 6e 64 |R0,#0. ..BEQ end| 00007290 6d 6f 76 65 0d 20 bc 0d 43 4d 50 20 52 30 2c 23 |move. ..CMP R0,#| 000072a0 34 0d 20 c6 0f 42 45 51 20 65 6e 64 6d 6f 76 65 |4. ..BEQ endmove| 000072b0 0d 20 d0 3b 43 4d 50 20 52 30 2c 23 32 20 20 20 |. .;CMP R0,#2 | 000072c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000072d0 20 20 20 20 20 3b 20 44 6f 65 73 20 74 68 65 20 | ; Does the | 000072e0 74 69 6c 65 20 6b 69 6c 6c 20 3f 0d 20 da 4b 42 |tile kill ?. .KB| 000072f0 45 51 20 65 6e 64 6d 6f 76 65 20 20 20 20 20 20 |EQ endmove | 00007300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007310 3b 20 49 66 20 79 65 73 20 64 6f 6e 74 20 62 6f |; If yes dont bo| 00007320 74 68 65 72 20 73 63 72 6f 6c 6c 69 6e 67 20 6f |ther scrolling o| 00007330 6e 74 6f 20 69 74 0d 20 e4 3b 43 4d 50 20 52 30 |nto it. .;CMP R0| 00007340 2c 23 35 20 20 20 20 20 20 20 20 20 20 20 20 20 |,#5 | 00007350 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 73 20 | ; Is | 00007360 74 68 65 72 65 20 65 61 72 74 68 20 74 68 65 72 |there earth ther| 00007370 65 0d 20 ee 11 42 4c 45 51 20 67 65 74 65 61 72 |e. ..BLEQ getear| 00007380 74 68 0d 20 f8 0d 43 4d 50 20 52 30 2c 23 33 0d |th. ..CMP R0,#3.| 00007390 21 02 10 42 4c 45 51 20 67 65 74 67 6f 6c 64 0d |!..BLEQ getgold.| 000073a0 21 0c 0d 4d 4f 56 20 52 30 2c 23 30 0d 21 16 3d |!..MOV R0,#0.!.=| 000073b0 53 54 52 20 52 30 2c 73 63 72 6f 6c 6c 63 6f 75 |STR R0,scrollcou| 000073c0 6e 74 65 72 20 20 20 20 20 20 3b 20 53 65 74 20 |nter ; Set | 000073d0 74 68 65 20 73 63 72 6f 6c 6c 63 6f 75 6e 74 65 |the scrollcounte| 000073e0 72 20 74 6f 20 7a 65 72 6f 0d 21 20 10 2e 64 6f |r to zero.! ..do| 000073f0 77 6e 73 63 72 6c 6f 6f 70 0d 21 2a 14 4c 44 52 |wnscrloop.!*.LDR| 00007400 20 52 30 2c 73 74 61 72 74 79 70 6f 73 0d 21 34 | R0,startypos.!4| 00007410 13 41 44 44 20 52 30 2c 52 30 2c 23 31 32 38 30 |.ADD R0,R0,#1280| 00007420 0d 21 3e 14 53 54 52 20 52 30 2c 73 74 61 72 74 |.!>.STR R0,start| 00007430 79 70 6f 73 0d 21 48 11 42 4c 20 73 63 72 65 65 |ypos.!H.BL scree| 00007440 6e 62 61 6e 6b 0d 21 52 2e 42 4c 20 70 6c 6f 74 |nbank.!R.BL plot| 00007450 6d 61 70 20 20 20 20 20 20 20 20 20 20 20 20 20 |map | 00007460 20 20 20 3b 20 52 65 64 72 61 77 20 74 68 65 20 | ; Redraw the | 00007470 6d 61 70 0d 21 5c 0e 42 4c 20 70 6c 6f 74 68 69 |map.!\.BL plothi| 00007480 6d 0d 21 66 3e 4c 44 52 20 52 30 2c 73 63 72 6f |m.!f>LDR R0,scro| 00007490 6c 6c 63 6f 75 6e 74 65 72 20 20 20 20 20 20 3b |llcounter ;| 000074a0 20 4c 6f 61 64 20 74 68 65 20 73 63 72 6f 6c 6c | Load the scroll| 000074b0 63 6f 75 6e 74 65 72 20 69 6e 74 6f 20 52 30 0d |counter into R0.| 000074c0 21 70 3a 41 44 44 20 52 30 2c 52 30 2c 23 31 20 |!p:ADD R0,R0,#1 | 000074d0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 41 | ; A| 000074e0 64 64 20 31 20 74 6f 20 74 68 65 20 73 63 72 6f |dd 1 to the scro| 000074f0 6c 6c 63 6f 75 6e 74 65 72 0d 21 7a 45 53 54 52 |llcounter.!zESTR| 00007500 20 52 30 2c 73 63 72 6f 6c 6c 63 6f 75 6e 74 65 | R0,scrollcounte| 00007510 72 20 20 20 20 20 20 3b 20 53 61 76 65 20 74 68 |r ; Save th| 00007520 65 20 73 63 72 6f 6c 6c 63 6f 75 6e 74 65 72 20 |e scrollcounter | 00007530 62 61 63 6b 20 74 6f 20 6d 65 6d 6f 72 79 0d 21 |back to memory.!| 00007540 84 3f 43 4d 50 20 52 30 2c 23 34 20 20 20 20 20 |.?CMP R0,#4 | 00007550 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 48 61 | ; Ha| 00007560 76 65 20 34 20 73 63 72 6f 6c 6c 73 20 62 65 65 |ve 4 scrolls bee| 00007570 6e 20 63 6f 6d 70 6c 65 74 65 64 20 3f 0d 21 8e |n completed ?.!.| 00007580 30 42 4e 45 20 64 6f 77 6e 73 63 72 6c 6f 6f 70 |0BNE downscrloop| 00007590 20 20 20 20 20 20 20 20 20 20 20 3b 20 49 66 20 | ; If | 000075a0 6e 6f 74 20 6c 6f 6f 70 20 62 61 63 6b 0d 21 98 |not loop back.!.| 000075b0 12 4c 44 52 20 52 30 2c 79 6d 61 70 70 6f 73 0d |.LDR R0,ymappos.| 000075c0 21 a2 10 53 55 42 20 52 30 2c 52 30 2c 23 31 0d |!..SUB R0,R0,#1.| 000075d0 21 ac 12 53 54 52 20 52 30 2c 79 6d 61 70 70 6f |!..STR R0,ymappo| 000075e0 73 0d 21 b6 14 4c 44 52 20 52 30 2c 73 74 61 72 |s.!..LDR R0,star| 000075f0 74 79 70 6f 73 0d 21 c0 13 53 55 42 20 52 30 2c |typos.!..SUB R0,| 00007600 52 30 2c 23 35 31 32 30 0d 21 ca 14 53 54 52 20 |R0,#5120.!..STR | 00007610 52 30 2c 73 74 61 72 74 79 70 6f 73 0d 21 d4 0f |R0,startypos.!..| 00007620 42 4c 20 6e 65 77 66 72 61 6d 65 0d 21 de 14 4c |BL newframe.!..L| 00007630 44 52 20 52 31 34 2c 6d 6f 76 65 6c 69 6e 6b 0d |DR R14,movelink.| 00007640 21 e8 0e 4d 4f 56 20 50 43 2c 52 31 34 0d 21 f2 |!..MOV PC,R14.!.| 00007650 05 3a 0d 21 fc 0f 2e 77 69 6e 64 6f 77 64 61 74 |.:.!...windowdat| 00007660 61 0d 22 06 0b 45 51 55 44 20 31 36 0d 22 10 0e |a."..EQUD 16."..| 00007670 45 51 55 44 20 31 30 32 34 30 0d 22 1a 0b 45 51 |EQUD 10240."..EQ| 00007680 55 44 20 39 36 0d 22 24 0e 45 51 55 44 20 33 35 |UD 96."$.EQUD 35| 00007690 38 34 30 0d 22 2e 05 3a 0d 22 38 10 2e 73 63 72 |840."..:."8..scr| 000076a0 65 65 6e 73 74 61 72 74 0d 22 42 0a 45 51 55 44 |eenstart."B.EQUD| 000076b0 20 30 0d 22 4c 0a 45 51 55 44 20 30 0d 22 56 0c | 0."L.EQUD 0."V.| 000076c0 2e 62 61 6e 6b 6e 75 6d 0d 22 60 0a 45 51 55 44 |.banknum."`.EQUD| 000076d0 20 30 0d 22 6a 0e 2e 73 74 61 72 74 78 70 6f 73 | 0."j..startxpos| 000076e0 0d 22 74 0a 45 51 55 44 20 30 0d 22 7e 0e 2e 73 |."t.EQUD 0."~..s| 000076f0 74 61 72 74 79 70 6f 73 0d 22 88 0e 45 51 55 44 |tartypos."..EQUD| 00007700 20 31 30 32 34 30 0d 22 92 0c 2e 78 6d 61 70 70 | 10240."...xmapp| 00007710 6f 73 0d 22 9c 0b 45 51 55 44 20 31 33 0d 22 a6 |os."..EQUD 13.".| 00007720 0c 2e 79 6d 61 70 70 6f 73 0d 22 b0 0b 45 51 55 |..ymappos."..EQU| 00007730 44 20 31 38 0d 22 ba 0f 2e 78 74 69 6c 65 63 6f |D 18."...xtileco| 00007740 75 6e 74 0d 22 c4 0a 45 51 55 44 20 30 0d 22 ce |unt."..EQUD 0.".| 00007750 0f 2e 79 74 69 6c 65 63 6f 75 6e 74 0d 22 d8 0a |..ytilecount."..| 00007760 45 51 55 44 20 30 0d 22 e2 10 2e 74 69 6c 65 70 |EQUD 0."...tilep| 00007770 6f 69 6e 74 65 72 0d 22 ec 14 45 51 55 44 20 74 |ointer."..EQUD t| 00007780 69 6c 65 62 69 74 6d 61 70 73 0d 22 f6 0f 2e 6d |ilebitmaps."...m| 00007790 61 70 70 6f 69 6e 74 65 72 0d 23 00 10 45 51 55 |appointer.#..EQU| 000077a0 44 20 6d 61 70 64 61 74 61 0d 23 0a 13 2e 67 61 |D mapdata.#...ga| 000077b0 6d 65 6d 61 70 70 6f 69 6e 74 65 72 0d 23 14 11 |memappointer.#..| 000077c0 45 51 55 44 20 67 61 6d 65 6d 61 70 73 0d 23 1e |EQUD gamemaps.#.| 000077d0 05 3a 0d 23 28 05 3a 0d 23 32 0c 2e 70 6c 6f 74 |.:.#(.:.#2..plot| 000077e0 6d 61 70 0d 23 3c 47 4c 44 52 20 52 35 2c 73 74 |map.#<GLDR R5,st| 000077f0 61 72 74 78 70 6f 73 20 20 20 20 20 20 20 20 20 |artxpos | 00007800 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 52 | ; Load R| 00007810 35 20 77 69 74 68 20 74 68 65 20 73 74 61 72 74 |5 with the start| 00007820 20 6d 61 70 20 78 20 70 6f 73 0d 23 46 48 4c 44 | map x pos.#FHLD| 00007830 52 20 52 36 2c 73 74 61 72 74 79 70 6f 73 20 20 |R R6,startypos | 00007840 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00007850 20 4c 6f 61 64 20 52 36 20 77 69 74 68 20 74 68 | Load R6 with th| 00007860 65 20 73 74 61 72 74 20 79 20 70 6f 73 69 74 69 |e start y positi| 00007870 6f 6e 0d 23 50 3f 4d 4f 56 20 52 32 2c 23 30 20 |on.#P?MOV R2,#0 | 00007880 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007890 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 52 32 | ; Load R2| 000078a0 20 77 69 74 68 20 74 68 65 20 76 61 6c 75 65 20 | with the value | 000078b0 30 0d 23 5a 46 53 54 52 20 52 32 2c 79 74 69 6c |0.#ZFSTR R2,ytil| 000078c0 65 63 6f 75 6e 74 20 20 20 20 20 20 20 20 20 20 |ecount | 000078d0 20 20 20 20 20 20 3b 20 41 6e 64 20 73 65 74 20 | ; And set | 000078e0 74 68 65 20 79 20 74 69 6c 65 20 63 6f 75 6e 74 |the y tile count| 000078f0 65 72 20 74 6f 20 30 0d 23 64 0d 2e 6d 61 70 79 |er to 0.#d..mapy| 00007900 6c 6f 6f 70 0d 23 6e 3f 4d 4f 56 20 52 32 2c 23 |loop.#n?MOV R2,#| 00007910 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0 | 00007920 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 | ; Load | 00007930 52 32 20 77 69 74 68 20 74 68 65 20 76 61 6c 75 |R2 with the valu| 00007940 65 20 30 0d 23 78 46 53 54 52 20 52 32 2c 78 74 |e 0.#xFSTR R2,xt| 00007950 69 6c 65 63 6f 75 6e 74 20 20 20 20 20 20 20 20 |ilecount | 00007960 20 20 20 20 20 20 20 20 3b 20 41 6e 64 20 73 65 | ; And se| 00007970 74 20 74 68 65 20 78 20 74 69 6c 65 20 63 6f 75 |t the x tile cou| 00007980 6e 74 65 72 20 74 6f 20 30 0d 23 82 14 4c 44 52 |nter to 0.#..LDR| 00007990 20 52 35 2c 73 74 61 72 74 78 70 6f 73 0d 23 8c | R5,startxpos.#.| 000079a0 0d 2e 6d 61 70 78 6c 6f 6f 70 0d 23 96 13 53 55 |..mapxloop.#..SU| 000079b0 42 20 52 36 2c 52 36 2c 23 35 31 32 30 0d 23 a0 |B R6,R6,#5120.#.| 000079c0 05 3a 0d 23 aa 47 4c 44 52 20 52 31 2c 74 69 6c |.:.#.GLDR R1,til| 000079d0 65 70 6f 69 6e 74 65 72 20 20 20 20 20 20 20 20 |epointer | 000079e0 20 20 20 20 20 20 20 3b 20 50 75 74 20 61 64 64 | ; Put add| 000079f0 72 65 73 73 20 6f 66 20 74 69 6c 65 62 69 74 6d |ress of tilebitm| 00007a00 61 70 73 20 69 6e 20 52 31 0d 23 b4 41 4c 44 52 |aps in R1.#.ALDR| 00007a10 20 52 33 2c 78 6d 61 70 70 6f 73 20 20 20 20 20 | R3,xmappos | 00007a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00007a30 4c 6f 61 64 20 52 33 20 77 69 74 68 20 74 68 65 |Load R3 with the| 00007a40 20 78 20 6d 61 70 20 70 6f 73 0d 23 be 45 41 44 | x map pos.#.EAD| 00007a50 44 20 52 33 2c 52 33 2c 52 32 20 20 20 20 20 20 |D R3,R3,R2 | 00007a60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00007a70 20 41 64 64 20 74 68 65 20 78 20 63 6f 75 6e 74 | Add the x count| 00007a80 65 72 20 74 6f 20 74 68 65 20 78 20 70 6f 73 0d |er to the x pos.| 00007a90 23 c8 41 4c 44 52 20 52 34 2c 79 6d 61 70 70 6f |#.ALDR R4,ymappo| 00007aa0 73 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |s | 00007ab0 20 20 20 20 3b 20 4c 6f 61 64 20 52 34 20 77 69 | ; Load R4 wi| 00007ac0 74 68 20 74 68 65 20 79 20 6d 61 70 20 70 6f 73 |th the y map pos| 00007ad0 0d 23 d2 15 4c 44 52 20 52 32 2c 79 74 69 6c 65 |.#..LDR R2,ytile| 00007ae0 63 6f 75 6e 74 0d 23 dc 10 41 44 44 20 52 34 2c |count.#..ADD R4,| 00007af0 52 34 2c 52 32 0d 23 e6 40 4d 4f 56 20 52 32 2c |R4,R2.#.@MOV R2,| 00007b00 23 34 30 20 20 20 20 20 20 20 20 20 20 20 20 20 |#40 | 00007b10 20 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 | ; Load| 00007b20 20 52 32 20 77 69 74 68 20 74 68 65 20 76 61 6c | R2 with the val| 00007b30 75 65 20 34 30 0d 23 f0 38 4d 55 4c 20 52 34 2c |ue 40.#.8MUL R4,| 00007b40 52 32 2c 52 34 20 20 20 20 20 20 20 20 20 20 20 |R2,R4 | 00007b50 20 20 20 20 20 20 20 20 20 20 3b 20 4d 75 6c 74 | ; Mult| 00007b60 69 70 6c 79 20 52 34 20 62 79 20 34 30 0d 23 fa |iply R4 by 40.#.| 00007b70 48 41 44 44 20 52 32 2c 52 33 2c 52 34 20 20 20 |HADD R2,R3,R4 | 00007b80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007b90 20 20 3b 20 52 32 20 3d 20 58 20 6d 61 70 20 70 | ; R2 = X map p| 00007ba0 6f 73 20 2b 20 28 59 20 6d 61 70 20 70 6f 73 20 |os + (Y map pos | 00007bb0 2a 20 34 30 29 0d 24 04 15 4c 44 52 20 52 33 2c |* 40).$..LDR R3,| 00007bc0 6d 61 70 70 6f 69 6e 74 65 72 0d 24 0e 4b 41 44 |mappointer.$.KAD| 00007bd0 44 20 52 33 2c 52 33 2c 52 32 20 20 20 20 20 20 |D R3,R3,R2 | 00007be0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00007bf0 20 53 65 74 20 52 33 20 74 6f 20 70 6f 69 6e 74 | Set R3 to point| 00007c00 20 74 6f 20 61 20 74 69 6c 65 20 69 6e 20 74 68 | to a tile in th| 00007c10 65 20 6d 61 70 0d 24 18 46 4c 44 52 42 20 52 32 |e map.$.FLDRB R2| 00007c20 2c 5b 52 33 5d 20 20 20 20 20 20 20 20 20 20 20 |,[R3] | 00007c30 20 20 20 20 20 20 20 20 20 20 3b 20 41 6e 64 20 | ; And | 00007c40 6c 6f 61 64 20 74 68 65 20 76 61 6c 75 65 20 6f |load the value o| 00007c50 66 20 74 68 61 74 20 74 69 6c 65 0d 24 22 4b 53 |f that tile.$"KS| 00007c60 55 42 20 52 32 2c 52 32 2c 23 33 32 20 20 20 20 |UB R2,R2,#32 | 00007c70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00007c80 3b 20 53 65 74 20 74 68 65 20 6c 65 74 74 65 72 |; Set the letter| 00007c90 20 41 20 6f 66 20 6d 61 70 20 64 61 74 61 20 74 | A of map data t| 00007ca0 6f 20 62 65 20 30 0d 24 2c 41 4d 4f 56 20 52 34 |o be 0.$,AMOV R4| 00007cb0 2c 23 35 31 32 20 20 20 20 20 20 20 20 20 20 20 |,#512 | 00007cc0 20 20 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 | ; Loa| 00007cd0 64 20 52 34 20 77 69 74 68 20 74 68 65 20 76 61 |d R4 with the va| 00007ce0 6c 75 65 20 35 31 32 0d 24 36 4c 4d 55 4c 20 52 |lue 512.$6LMUL R| 00007cf0 33 2c 52 32 2c 52 34 20 20 20 20 20 20 20 20 20 |3,R2,R4 | 00007d00 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 4d 75 | ; Mu| 00007d10 6c 74 69 70 6c 79 20 74 68 65 20 76 61 6c 75 65 |ltiply the value| 00007d20 20 6f 66 20 74 68 65 20 74 69 6c 65 20 62 79 20 | of the tile by | 00007d30 35 31 32 0d 24 40 4e 41 44 44 20 52 31 2c 52 31 |512.$@NADD R1,R1| 00007d40 2c 52 33 20 20 20 20 20 20 20 20 20 20 20 20 20 |,R3 | 00007d50 20 20 20 20 20 20 20 20 3b 20 41 6e 64 20 73 65 | ; And se| 00007d60 74 20 52 31 20 74 6f 20 70 6f 69 6e 74 20 74 6f |t R1 to point to| 00007d70 20 74 68 65 20 63 6f 72 72 65 63 74 20 74 69 6c | the correct til| 00007d80 65 0d 24 4a 12 4c 44 52 20 52 32 2c 62 61 6e 6b |e.$J.LDR R2,bank| 00007d90 6e 75 6d 0d 24 54 16 41 44 52 20 52 39 2c 73 63 |num.$T.ADR R9,sc| 00007da0 72 65 65 6e 73 74 61 72 74 0d 24 5e 12 4c 44 52 |reenstart.$^.LDR| 00007db0 20 52 30 2c 5b 52 32 2c 52 39 5d 0d 24 68 05 3a | R0,[R2,R9].$h.:| 00007dc0 0d 24 72 48 41 44 52 20 52 32 2c 77 69 6e 64 6f |.$rHADR R2,windo| 00007dd0 77 64 61 74 61 20 20 20 20 20 20 20 20 20 20 20 |wdata | 00007de0 20 20 20 20 20 3b 20 47 65 74 20 74 68 65 20 61 | ; Get the a| 00007df0 64 64 72 65 73 73 20 6f 66 20 74 68 65 20 77 69 |ddress of the wi| 00007e00 6e 64 6f 77 64 61 74 61 0d 24 7c 4d 4c 44 4d 49 |ndowdata.$|MLDMI| 00007e10 41 20 52 32 2c 7b 52 39 2d 52 31 32 7d 20 20 20 |A R2,{R9-R12} | 00007e20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 4c | ; L| 00007e30 6f 61 64 20 74 68 65 20 77 69 6e 64 6f 77 20 62 |oad the window b| 00007e40 6f 75 6e 64 61 72 69 65 73 20 69 6e 74 6f 20 52 |oundaries into R| 00007e50 39 2d 52 31 32 0d 24 86 43 4d 4f 56 20 52 37 2c |9-R12.$.CMOV R7,| 00007e60 52 35 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |R5 | 00007e70 20 20 20 20 20 20 20 20 20 20 3b 20 43 6f 70 79 | ; Copy| 00007e80 20 74 68 65 20 73 74 61 72 74 20 78 20 70 6f 73 | the start x pos| 00007e90 20 69 6e 74 6f 20 52 37 0d 24 90 4c 41 44 44 20 | into R7.$.LADD | 00007ea0 52 37 2c 52 37 2c 23 31 36 20 20 20 20 20 20 20 |R7,R7,#16 | 00007eb0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 41 | ; A| 00007ec0 6e 64 20 74 68 65 6e 20 73 65 74 20 52 37 20 74 |nd then set R7 t| 00007ed0 6f 20 70 6f 69 6e 74 20 74 6f 20 65 6e 64 20 78 |o point to end x| 00007ee0 20 70 6f 73 0d 24 9a 44 4d 4f 56 20 52 34 2c 23 | pos.$.DMOV R4,#| 00007ef0 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0 | 00007f00 20 20 20 20 20 20 20 20 20 3b 20 53 65 74 20 74 | ; Set t| 00007f10 68 65 20 79 20 70 6f 73 20 63 6f 75 6e 74 65 72 |he y pos counter| 00007f20 20 74 6f 20 7a 65 72 6f 0d 24 a4 0d 2e 79 73 70 | to zero.$...ysp| 00007f30 72 6c 6f 6f 70 0d 24 ae 4e 4d 4f 56 20 52 33 2c |rloop.$.NMOV R3,| 00007f40 52 35 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |R5 | 00007f50 20 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 | ; Load| 00007f60 20 74 68 65 20 78 20 63 6f 75 6e 74 65 72 20 77 | the x counter w| 00007f70 69 74 68 20 74 68 65 20 73 74 61 72 74 20 78 20 |ith the start x | 00007f80 70 6f 73 0d 24 b8 4e 43 4d 50 20 52 36 2c 52 31 |pos.$.NCMP R6,R1| 00007f90 30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |0 | 00007fa0 20 20 20 20 20 20 20 20 3b 20 43 6f 6d 70 61 72 | ; Compar| 00007fb0 65 20 74 68 65 20 79 20 70 6f 73 20 61 67 61 69 |e the y pos agai| 00007fc0 6e 73 74 20 74 6f 70 20 6f 66 20 77 69 6e 64 6f |nst top of windo| 00007fd0 77 0d 24 c2 11 42 4c 54 20 6a 75 6d 70 78 6c 6f |w.$..BLT jumpxlo| 00007fe0 6f 70 0d 24 cc 4e 43 4d 50 20 52 36 2c 52 31 32 |op.$.NCMP R6,R12| 00007ff0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008000 20 20 20 20 20 20 20 3b 20 43 6f 6d 70 61 72 65 | ; Compare| 00008010 20 74 68 65 20 79 20 70 6f 73 20 61 67 61 69 6e | the y pos again| 00008020 73 74 20 62 6f 74 20 6f 66 20 77 69 6e 64 6f 77 |st bot of window| 00008030 0d 24 d6 11 42 47 45 20 6a 75 6d 70 78 6c 6f 6f |.$..BGE jumpxloo| 00008040 70 0d 24 e0 0d 2e 78 73 70 72 6c 6f 6f 70 0d 24 |p.$...xsprloop.$| 00008050 ea 43 4c 44 52 20 52 32 2c 5b 52 31 5d 20 20 20 |.CLDR R2,[R1] | 00008060 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008070 20 20 20 3b 20 4c 6f 61 64 20 61 20 77 6f 72 64 | ; Load a word| 00008080 20 66 72 6f 6d 20 74 69 6c 65 20 62 69 74 6d 61 | from tile bitma| 00008090 70 0d 24 f4 4a 41 44 44 20 52 31 2c 52 31 2c 23 |p.$.JADD R1,R1,#| 000080a0 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |4 | 000080b0 20 20 20 20 20 20 3b 20 41 64 64 20 34 20 74 6f | ; Add 4 to| 000080c0 20 74 68 65 20 73 70 72 69 74 65 20 70 6f 69 6e | the sprite poin| 000080d0 74 65 72 20 61 64 64 72 65 73 73 0d 24 fe 4a 43 |ter address.$.JC| 000080e0 4d 50 20 52 33 2c 52 39 20 20 20 20 20 20 20 20 |MP R3,R9 | 000080f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008100 3b 20 43 6f 6d 70 61 72 65 20 58 20 70 6f 73 20 |; Compare X pos | 00008110 61 67 61 69 6e 73 74 20 4c 48 53 20 6f 66 20 77 |against LHS of w| 00008120 69 6e 64 6f 77 0d 25 08 16 42 4c 54 20 70 69 78 |indow.%..BLT pix| 00008130 63 65 6c 6c 70 6c 6f 74 74 65 64 0d 25 12 0e 43 |cellplotted.%..C| 00008140 4d 50 20 52 33 2c 52 31 31 0d 25 1c 16 42 47 45 |MP R3,R11.%..BGE| 00008150 20 70 69 78 63 65 6c 6c 70 6c 6f 74 74 65 64 0d | pixcellplotted.| 00008160 25 26 48 41 44 44 20 52 38 2c 52 30 2c 52 36 20 |%&HADD R8,R0,R6 | 00008170 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008180 20 20 20 20 3b 20 41 64 64 20 53 63 72 65 65 6e | ; Add Screen| 00008190 73 74 61 72 74 20 2b 20 59 20 61 64 64 72 65 73 |start + Y addres| 000081a0 73 20 69 6e 20 52 38 0d 25 30 41 53 54 52 20 52 |s in R8.%0ASTR R| 000081b0 32 2c 5b 52 38 2c 52 33 5d 20 20 20 20 20 20 20 |2,[R8,R3] | 000081c0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 50 6c | ; Pl| 000081d0 6f 74 20 77 6f 72 64 20 74 6f 20 73 63 72 65 65 |ot word to scree| 000081e0 6e 20 6d 65 6d 6f 72 79 0d 25 3a 13 2e 70 69 78 |n memory.%:..pix| 000081f0 63 65 6c 6c 70 6c 6f 74 74 65 64 0d 25 44 3d 41 |cellplotted.%D=A| 00008200 44 44 20 52 33 2c 52 33 2c 23 34 20 20 20 20 20 |DD R3,R3,#4 | 00008210 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008220 3b 20 41 64 64 20 34 20 74 6f 20 74 68 65 20 58 |; Add 4 to the X| 00008230 20 63 6f 75 6e 74 65 72 0d 25 4e 49 43 4d 50 20 | counter.%NICMP | 00008240 52 33 2c 52 37 20 20 20 20 20 20 20 20 20 20 20 |R3,R7 | 00008250 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 43 | ; C| 00008260 6f 6d 70 61 72 65 20 78 20 63 6f 75 6e 74 65 72 |ompare x counter| 00008270 20 77 69 74 68 20 66 69 6e 61 6c 20 78 20 70 6f | with final x po| 00008280 73 0d 25 58 44 42 4e 45 20 78 73 70 72 6c 6f 6f |s.%XDBNE xsprloo| 00008290 70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |p | 000082a0 20 20 20 20 20 20 3b 20 49 66 20 74 68 65 79 20 | ; If they | 000082b0 61 72 65 6e 74 20 65 71 75 61 6c 20 6c 6f 6f 70 |arent equal loop| 000082c0 20 62 61 63 6b 0d 25 62 0f 2e 6a 75 6d 70 78 6c | back.%b..jumpxl| 000082d0 6f 6f 70 61 0d 25 6c 4a 41 44 44 20 52 36 2c 52 |oopa.%lJADD R6,R| 000082e0 36 2c 23 31 36 30 20 20 20 20 20 20 20 20 20 20 |6,#160 | 000082f0 20 20 20 20 20 20 20 20 20 3b 20 41 64 64 20 31 | ; Add 1| 00008300 36 30 20 74 6f 20 74 68 65 20 79 20 61 64 64 72 |60 to the y addr| 00008310 65 73 73 20 74 6f 20 70 6c 6f 74 20 61 74 0d 25 |ess to plot at.%| 00008320 76 41 41 44 44 20 52 34 2c 52 34 2c 23 31 20 20 |vAADD R4,R4,#1 | 00008330 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008340 20 20 20 3b 20 41 64 64 20 31 20 74 6f 20 74 68 | ; Add 1 to th| 00008350 65 20 79 20 70 6f 73 20 63 6f 75 6e 74 65 72 0d |e y pos counter.| 00008360 25 80 4c 43 4d 50 20 52 34 2c 23 33 32 20 20 20 |%.LCMP R4,#32 | 00008370 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008380 20 20 20 20 3b 20 43 6f 6d 70 61 72 65 20 74 68 | ; Compare th| 00008390 65 20 59 20 63 6f 75 6e 74 65 72 20 77 69 74 68 |e Y counter with| 000083a0 20 74 68 65 20 68 65 69 67 68 74 0d 25 8a 44 42 | the height.%.DB| 000083b0 4e 45 20 79 73 70 72 6c 6f 6f 70 20 20 20 20 20 |NE ysprloop | 000083c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000083d0 3b 20 49 66 20 74 68 65 79 20 61 72 65 6e 74 20 |; If they arent | 000083e0 65 71 75 61 6c 20 6c 6f 6f 70 20 62 61 63 6b 0d |equal loop back.| 000083f0 25 94 05 3a 0d 25 9e 11 41 44 44 20 52 35 2c 52 |%..:.%..ADD R5,R| 00008400 35 2c 23 31 36 0d 25 a8 15 4c 44 52 20 52 32 2c |5,#16.%..LDR R2,| 00008410 78 74 69 6c 65 63 6f 75 6e 74 0d 25 b2 10 41 44 |xtilecount.%..AD| 00008420 44 20 52 32 2c 52 32 2c 23 31 0d 25 bc 15 53 54 |D R2,R2,#1.%..ST| 00008430 52 20 52 32 2c 78 74 69 6c 65 63 6f 75 6e 74 0d |R R2,xtilecount.| 00008440 25 c6 0d 43 4d 50 20 52 32 2c 23 37 0d 25 d0 10 |%..CMP R2,#7.%..| 00008450 42 4e 45 20 6d 61 70 78 6c 6f 6f 70 0d 25 da 13 |BNE mapxloop.%..| 00008460 41 44 44 20 52 36 2c 52 36 2c 23 35 31 32 30 0d |ADD R6,R6,#5120.| 00008470 25 e4 15 4c 44 52 20 52 32 2c 79 74 69 6c 65 63 |%..LDR R2,ytilec| 00008480 6f 75 6e 74 0d 25 ee 10 41 44 44 20 52 32 2c 52 |ount.%..ADD R2,R| 00008490 32 2c 23 31 0d 25 f8 15 53 54 52 20 52 32 2c 79 |2,#1.%..STR R2,y| 000084a0 74 69 6c 65 63 6f 75 6e 74 0d 26 02 0d 43 4d 50 |tilecount.&..CMP| 000084b0 20 52 32 2c 23 37 0d 26 0c 10 42 4e 45 20 6d 61 | R2,#7.&..BNE ma| 000084c0 70 79 6c 6f 6f 70 0d 26 16 4a 4d 4f 56 20 50 43 |pyloop.&.JMOV PC| 000084d0 2c 52 31 34 20 20 20 20 20 20 20 20 20 20 20 20 |,R14 | 000084e0 20 20 20 20 20 20 20 20 20 20 20 3b 20 45 6e 64 | ; End| 000084f0 20 74 68 65 20 72 6f 75 74 69 6e 65 2c 20 74 68 | the routine, th| 00008500 65 20 6d 61 70 20 69 73 20 70 6c 6f 74 74 65 64 |e map is plotted| 00008510 0d 26 20 0e 2e 6a 75 6d 70 78 6c 6f 6f 70 0d 26 |.& ..jumpxloop.&| 00008520 2a 11 41 44 44 20 52 31 2c 52 31 2c 23 31 36 0d |*.ADD R1,R1,#16.| 00008530 26 34 10 42 20 6a 75 6d 70 78 6c 6f 6f 70 61 0d |&4.B jumpxloopa.| 00008540 26 3e 05 3a 0d 26 48 0e 2e 64 69 72 65 63 74 69 |&>.:.&H..directi| 00008550 6f 6e 0d 26 52 0a 45 51 55 44 20 30 0d 26 5c 0a |on.&R.EQUD 0.&\.| 00008560 2e 66 72 61 6d 65 0d 26 66 0a 45 51 55 44 20 30 |.frame.&f.EQUD 0| 00008570 0d 26 70 15 2e 63 68 61 72 61 63 74 65 72 70 6f |.&p..characterpo| 00008580 69 6e 74 65 72 0d 26 7a 13 45 51 55 44 20 63 68 |inter.&z.EQUD ch| 00008590 61 72 61 63 74 65 72 73 0d 26 84 0c 2e 6d 61 6e |aracters.&...man| 000085a0 79 70 6f 73 0d 26 8e 13 45 51 55 44 20 28 31 36 |ypos.&..EQUD (16| 000085b0 30 2a 33 32 29 2a 34 0d 26 98 0c 2e 70 6c 6f 74 |0*32)*4.&...plot| 000085c0 68 69 6d 0d 26 a2 12 4c 44 52 20 52 32 2c 62 61 |him.&..LDR R2,ba| 000085d0 6e 6b 6e 75 6d 0d 26 ac 16 41 44 52 20 52 39 2c |nknum.&..ADR R9,| 000085e0 73 63 72 65 65 6e 73 74 61 72 74 0d 26 b6 12 4c |screenstart.&..L| 000085f0 44 52 20 52 30 2c 5b 52 32 2c 52 39 5d 0d 26 c0 |DR R0,[R2,R9].&.| 00008600 1b 4c 44 52 20 52 31 2c 63 68 61 72 61 63 74 65 |.LDR R1,characte| 00008610 72 70 6f 69 6e 74 65 72 0d 26 ca 4a 4c 44 52 20 |rpointer.&.JLDR | 00008620 52 38 2c 64 69 72 65 63 74 69 6f 6e 20 20 20 20 |R8,direction | 00008630 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 4c | ; L| 00008640 6f 61 64 20 74 68 65 20 76 61 72 69 61 62 6c 65 |oad the variable| 00008650 20 64 69 72 65 63 74 69 6f 6e 20 69 6e 74 6f 20 | direction into | 00008660 52 38 0d 26 d4 37 4d 4f 56 20 52 37 2c 23 35 31 |R8.&.7MOV R7,#51| 00008670 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |2 | 00008680 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 35 31 | ; Load 51| 00008690 32 20 69 6e 74 6f 20 52 37 0d 26 de 3b 4d 55 4c |2 into R7.&.;MUL| 000086a0 20 52 39 2c 52 38 2c 52 37 20 20 20 20 20 20 20 | R9,R8,R7 | 000086b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 000086c0 52 39 20 3d 20 64 69 72 65 63 74 69 6f 6e 20 2a |R9 = direction *| 000086d0 20 35 31 32 0d 26 e8 47 41 44 44 20 52 31 2c 52 | 512.&.GADD R1,R| 000086e0 39 2c 52 31 20 20 20 20 20 20 20 20 20 20 20 20 |9,R1 | 000086f0 20 20 20 20 20 20 20 20 20 3b 20 41 64 64 20 74 | ; Add t| 00008700 68 65 20 64 69 72 65 63 74 69 6f 6e 20 74 6f 20 |he direction to | 00008710 74 68 65 20 70 6f 69 6e 74 65 72 0d 26 f2 44 4c |the pointer.&.DL| 00008720 44 52 20 52 38 2c 66 72 61 6d 65 20 20 20 20 20 |DR R8,frame | 00008730 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008740 3b 20 4c 6f 61 64 20 74 68 65 20 66 72 61 6d 65 |; Load the frame| 00008750 20 6e 75 6d 62 65 72 20 69 6e 74 6f 20 52 38 0d | number into R8.| 00008760 26 fc 47 4d 55 4c 20 52 39 2c 52 38 2c 52 37 20 |&.GMUL R9,R8,R7 | 00008770 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008780 20 20 20 20 3b 20 4d 75 6c 74 69 70 6c 79 20 74 | ; Multiply t| 00008790 68 65 20 66 72 61 6d 65 20 6e 75 6d 62 65 72 20 |he frame number | 000087a0 62 79 20 35 31 32 0d 27 06 40 41 44 44 20 52 31 |by 512.'.@ADD R1| 000087b0 2c 52 31 2c 52 39 20 20 20 20 20 20 20 20 20 20 |,R1,R9 | 000087c0 20 20 20 20 20 20 20 20 20 20 20 3b 20 41 6e 64 | ; And| 000087d0 20 61 64 64 20 69 74 20 74 6f 20 74 68 65 20 70 | add it to the p| 000087e0 6f 69 6e 74 65 72 0d 27 10 4b 4c 44 52 20 52 32 |ointer.'.KLDR R2| 000087f0 2c 6d 61 6e 79 70 6f 73 20 20 20 20 20 20 20 20 |,manypos | 00008800 20 20 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 | ; Loa| 00008810 64 20 74 68 65 20 79 20 73 63 72 65 65 6e 20 61 |d the y screen a| 00008820 64 64 72 65 73 73 20 74 6f 20 70 6c 6f 74 20 61 |ddress to plot a| 00008830 74 0d 27 1a 43 41 44 44 20 52 30 2c 52 30 2c 52 |t.'.CADD R0,R0,R| 00008840 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |2 | 00008850 20 20 20 20 20 20 3b 20 41 64 64 20 74 68 65 20 | ; Add the | 00008860 73 63 72 65 65 6e 20 61 64 64 72 65 73 73 20 74 |screen address t| 00008870 6f 20 52 30 0d 27 24 12 4d 4f 56 20 52 33 2c 23 |o R0.'$.MOV R3,#| 00008880 28 31 36 2a 33 29 0d 27 2e 10 41 44 44 20 52 30 |(16*3).'..ADD R0| 00008890 2c 52 30 2c 52 33 0d 27 38 0e 4d 4f 56 20 52 34 |,R0,R3.'8.MOV R4| 000088a0 2c 23 33 32 0d 27 42 0d 2e 79 6d 61 6e 6c 6f 6f |,#32.'B..ymanloo| 000088b0 70 0d 27 4c 41 4c 44 4d 49 41 20 52 31 21 2c 7b |p.'LALDMIA R1!,{| 000088c0 52 35 2d 52 38 7d 20 20 20 20 20 20 20 20 20 20 |R5-R8} | 000088d0 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 66 6f 75 | ; Load fou| 000088e0 72 20 77 6f 72 64 73 20 69 6e 74 6f 20 52 35 2d |r words into R5-| 000088f0 52 38 0d 27 56 44 53 54 4d 49 41 20 52 30 2c 7b |R8.'VDSTMIA R0,{| 00008900 52 35 2d 52 38 7d 20 20 20 20 20 20 20 20 20 20 |R5-R8} | 00008910 20 20 20 20 20 20 20 3b 20 53 61 76 65 20 66 6f | ; Save fo| 00008920 75 72 20 77 6f 72 64 73 20 74 6f 20 74 68 65 20 |ur words to the | 00008930 73 63 72 65 65 6e 0d 27 60 3e 41 44 44 20 52 30 |screen.'`>ADD R0| 00008940 2c 52 30 2c 23 31 36 30 20 20 20 20 20 20 20 20 |,R0,#160 | 00008950 20 20 20 20 20 20 20 20 20 20 20 3b 20 41 64 64 | ; Add| 00008960 20 61 20 6c 69 6e 65 20 74 6f 20 79 20 61 64 64 | a line to y add| 00008970 72 65 73 73 0d 27 6a 47 53 55 42 53 20 52 34 2c |ress.'jGSUBS R4,| 00008980 52 34 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 |R4,#1 | 00008990 20 20 20 20 20 20 20 20 20 3b 20 53 75 62 74 72 | ; Subtr| 000089a0 61 63 74 20 31 20 66 72 6f 6d 20 74 68 65 20 6c |act 1 from the l| 000089b0 69 6e 65 20 63 6f 75 6e 74 65 72 0d 27 74 49 42 |ine counter.'tIB| 000089c0 4e 45 20 79 6d 61 6e 6c 6f 6f 70 20 20 20 20 20 |NE ymanloop | 000089d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000089e0 3b 20 49 66 20 61 6c 6c 20 6c 69 6e 65 73 20 6e |; If all lines n| 000089f0 6f 74 20 70 6c 6f 74 74 65 64 20 6c 6f 6f 70 20 |ot plotted loop | 00008a00 62 61 63 6b 0d 27 7e 35 4d 4f 56 20 50 43 2c 52 |back.'~5MOV PC,R| 00008a10 31 34 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |14 | 00008a20 20 20 20 20 20 20 20 20 20 3b 20 45 6e 64 20 6f | ; End o| 00008a30 66 20 72 6f 75 74 69 6e 65 0d 27 88 05 3a 0d 27 |f routine.'..:.'| 00008a40 92 11 2e 62 79 74 65 73 69 6e 6c 65 76 65 6c 0d |...bytesinlevel.| 00008a50 27 9c 0d 45 51 55 44 20 31 31 33 36 0d 27 a6 05 |'..EQUD 1136.'..| 00008a60 3a 0d 27 b0 12 2e 64 6f 77 6e 6c 6f 61 64 6c 65 |:.'...downloadle| 00008a70 76 65 6c 0d 27 ba 48 4c 44 52 20 52 30 2c 6c 65 |vel.'.HLDR R0,le| 00008a80 76 65 6c 20 20 20 20 20 20 20 20 20 20 20 20 20 |vel | 00008a90 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 74 68 | ; Load th| 00008aa0 65 20 6c 65 76 65 6c 20 74 6f 20 64 6f 77 6e 6c |e level to downl| 00008ab0 6f 61 64 20 69 6e 74 6f 20 52 30 0d 27 c4 49 4c |oad into R0.'.IL| 00008ac0 44 52 20 52 31 2c 62 79 74 65 73 69 6e 6c 65 76 |DR R1,bytesinlev| 00008ad0 65 6c 20 20 20 20 20 20 20 20 20 20 20 20 20 3b |el ;| 00008ae0 20 4c 6f 61 64 20 74 68 65 20 6e 75 6d 62 65 72 | Load the number| 00008af0 20 6f 66 20 62 79 74 65 73 20 69 6e 20 61 20 6c | of bytes in a l| 00008b00 65 76 65 6c 0d 27 ce 48 4c 44 52 20 52 32 2c 67 |evel.'.HLDR R2,g| 00008b10 61 6d 65 6d 61 70 70 6f 69 6e 74 65 72 20 20 20 |amemappointer | 00008b20 20 20 20 20 20 20 20 20 3b 20 53 65 74 20 52 32 | ; Set R2| 00008b30 20 74 6f 20 70 6f 69 6e 74 20 74 6f 20 74 68 65 | to point to the| 00008b40 20 6d 61 69 6e 20 6c 65 76 65 6c 73 0d 27 d8 44 | main levels.'.D| 00008b50 41 44 52 20 52 33 2c 73 74 61 72 74 6d 61 6e 78 |ADR R3,startmanx| 00008b60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008b70 3b 20 53 65 74 20 52 33 20 74 6f 20 70 6f 69 6e |; Set R3 to poin| 00008b80 74 20 74 6f 20 74 68 65 20 67 61 6d 65 6d 61 70 |t to the gamemap| 00008b90 0d 27 e2 3e 4d 55 4c 20 52 34 2c 52 30 2c 52 31 |.'.>MUL R4,R0,R1| 00008ba0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008bb0 20 20 20 20 3b 20 52 34 3d 20 6c 65 76 65 6c 20 | ; R4= level | 00008bc0 2a 20 62 79 74 65 73 69 6e 6c 65 76 65 6c 0d 27 |* bytesinlevel.'| 00008bd0 ec 4c 41 44 44 20 52 32 2c 52 32 2c 52 34 20 20 |.LADD R2,R2,R4 | 00008be0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008bf0 20 20 3b 20 53 65 74 20 52 32 20 74 6f 20 70 6f | ; Set R2 to po| 00008c00 69 6e 74 20 74 6f 20 74 68 65 20 6d 61 70 20 74 |int to the map t| 00008c10 6f 20 64 6f 77 6e 6c 6f 61 64 0d 27 f6 3a 4d 4f |o download.'.:MO| 00008c20 56 20 52 30 2c 23 30 20 20 20 20 20 20 20 20 20 |V R0,#0 | 00008c30 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 | ; | 00008c40 53 65 74 20 74 68 65 20 63 6f 75 6e 74 65 72 20 |Set the counter | 00008c50 74 6f 20 30 0d 28 00 11 2e 64 6f 77 6e 6c 6f 61 |to 0.(...downloa| 00008c60 64 6c 6f 6f 70 0d 28 0a 43 4c 44 52 42 20 52 34 |dloop.(.CLDRB R4| 00008c70 2c 5b 52 32 5d 20 20 20 20 20 20 20 20 20 20 20 |,[R2] | 00008c80 20 20 20 20 20 20 20 20 20 3b 20 4c 6f 61 64 20 | ; Load | 00008c90 61 20 62 79 74 65 20 66 72 6f 6d 20 74 68 65 20 |a byte from the | 00008ca0 6d 61 69 6e 20 6d 61 70 0d 28 14 44 53 54 52 42 |main map.(.DSTRB| 00008cb0 20 52 34 2c 5b 52 33 5d 20 20 20 20 20 20 20 20 | R4,[R3] | 00008cc0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 74 | ; St| 00008cd0 6f 72 65 20 74 68 65 20 62 79 74 65 20 69 6e 20 |ore the byte in | 00008ce0 74 68 65 20 67 61 6d 65 20 6d 61 70 0d 28 1e 43 |the game map.(.C| 00008cf0 41 44 44 20 52 33 2c 52 33 2c 23 31 20 20 20 20 |ADD R3,R3,#1 | 00008d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008d10 3b 20 41 64 64 20 31 20 74 6f 20 74 68 65 20 67 |; Add 1 to the g| 00008d20 61 6d 65 20 6d 61 70 20 70 6f 69 6e 74 65 72 0d |ame map pointer.| 00008d30 28 28 43 41 44 44 20 52 32 2c 52 32 2c 23 31 20 |((CADD R2,R2,#1 | 00008d40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008d50 20 20 20 3b 20 41 64 64 20 31 20 74 6f 20 74 68 | ; Add 1 to th| 00008d60 65 20 6d 61 69 6e 20 6d 61 70 20 70 6f 69 6e 74 |e main map point| 00008d70 65 72 0d 28 32 3a 41 44 44 20 52 30 2c 52 30 2c |er.(2:ADD R0,R0,| 00008d80 23 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |#1 | 00008d90 20 20 20 20 20 20 3b 20 41 64 64 20 31 20 74 6f | ; Add 1 to| 00008da0 20 74 68 65 20 63 6f 75 6e 74 65 72 0d 28 3c 4e | the counter.(<N| 00008db0 43 4d 50 20 52 30 2c 52 31 20 20 20 20 20 20 20 |CMP R0,R1 | 00008dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00008dd0 3b 20 48 61 76 65 20 61 6c 6c 20 74 68 65 20 62 |; Have all the b| 00008de0 79 74 65 73 20 62 65 65 6e 20 64 6f 77 6e 6c 6f |ytes been downlo| 00008df0 61 64 65 64 20 79 65 74 20 3f 0d 28 46 14 42 4e |aded yet ?.(F.BN| 00008e00 45 20 64 6f 77 6e 6c 6f 61 64 6c 6f 6f 70 0d 28 |E downloadloop.(| 00008e10 50 0e 4d 4f 56 20 50 43 2c 52 31 34 0d 28 5a 05 |P.MOV PC,R14.(Z.| 00008e20 3a 0d 28 64 0e 2e 73 74 61 72 74 6d 61 6e 78 0d |:.(d..startmanx.| 00008e30 28 6e 0a 45 51 55 44 20 30 0d 28 78 0e 2e 73 74 |(n.EQUD 0.(x..st| 00008e40 61 72 74 6d 61 6e 79 0d 28 82 0a 45 51 55 44 20 |artmany.(..EQUD | 00008e50 30 0d 28 8c 0d 2e 70 61 73 73 77 6f 72 64 0d 28 |0.(...password.(| 00008e60 96 1a 45 51 55 53 20 22 20 20 20 20 20 20 20 22 |..EQUS " "| 00008e70 3a 45 51 55 42 20 31 33 0d 28 a0 0c 2e 6d 61 70 |:EQUB 13.(...map| 00008e80 64 61 74 61 0d 28 aa 1d 5d 3a 50 25 3d 50 25 2b |data.(..]:P%=P%+| 00008e90 28 34 30 2a 32 38 29 3a 5b 4f 50 54 20 6f 70 74 |(40*28):[OPT opt| 00008ea0 25 0d 28 b4 05 3a 0d 28 be 26 3b 20 54 68 65 20 |%.(..:.(.&; The | 00008eb0 67 61 6d 65 66 69 6c 65 20 69 73 20 6c 6f 61 64 |gamefile is load| 00008ec0 65 64 20 69 6e 74 6f 20 68 65 72 65 0d 28 c8 05 |ed into here.(..| 00008ed0 3a 0d 28 d2 11 2e 6c 6f 61 64 67 61 6d 65 66 69 |:.(...loadgamefi| 00008ee0 6c 65 0d 28 dc 10 2e 74 69 6c 65 62 69 74 6d 61 |le.(...tilebitma| 00008ef0 70 73 0d 28 e6 1e 5d 3a 50 25 3d 50 25 2b 28 35 |ps.(..]:P%=P%+(5| 00008f00 31 32 2a 32 38 29 3a 5b 4f 50 54 20 6f 70 74 25 |12*28):[OPT opt%| 00008f10 0d 28 f0 0f 2e 63 68 61 72 61 63 74 65 72 73 0d |.(...characters.| 00008f20 28 fa 1e 5d 3a 50 25 3d 50 25 2b 28 35 31 32 2a |(..]:P%=P%+(512*| 00008f30 31 30 29 3a 5b 4f 50 54 20 6f 70 74 25 0d 29 04 |10):[OPT opt%.).| 00008f40 0d 2e 67 61 6d 65 6d 61 70 73 0d 29 0e 1a 5d 3a |..gamemaps.)..]:| 00008f50 50 25 3d 50 25 2b 35 36 38 30 3a 5b 4f 50 54 20 |P%=P%+5680:[OPT | 00008f60 6f 70 74 25 0d 29 18 0c 2e 70 61 6c 6c 65 74 65 |opt%.)...pallete| 00008f70 0d 29 22 19 5d 3a 50 25 3d 50 25 2b 31 33 30 3a |.)".]:P%=P%+130:| 00008f80 5b 4f 50 54 20 6f 70 74 25 0d 29 2c 0d 2e 67 61 |[OPT opt%.),..ga| 00008f90 6d 65 6e 61 6d 65 0d 29 36 18 5d 3a 50 25 3d 50 |mename.)6.]:P%=P| 00008fa0 25 2b 32 30 3a 5b 4f 50 54 20 6f 70 74 25 0d 29 |%+20:[OPT opt%.)| 00008fb0 40 11 2e 67 61 6d 65 64 65 73 69 67 6e 65 72 0d |@..gamedesigner.| 00008fc0 29 4a 18 5d 3a 50 25 3d 50 25 2b 32 30 3a 5b 4f |)J.]:P%=P%+20:[O| 00008fd0 50 54 20 6f 70 74 25 0d 29 54 0d 2e 67 61 6d 65 |PT opt%.)T..game| 00008fe0 74 69 6d 65 0d 29 5e 18 5d 3a 50 25 3d 50 25 2b |time.)^.]:P%=P%+| 00008ff0 32 35 3a 5b 4f 50 54 20 6f 70 74 25 0d 29 68 09 |25:[OPT opt%.)h.| 00009000 41 4c 49 47 4e 0d 29 72 0f 2e 73 70 72 69 74 65 |ALIGN.)r..sprite| 00009010 61 72 65 61 0d 29 7c 0e 45 51 55 44 20 26 32 38 |area.)|.EQUD &28| 00009020 30 30 0d 29 86 0a 45 51 55 44 20 30 0d 29 90 0b |00.)..EQUD 0.)..| 00009030 45 51 55 44 20 31 36 0d 29 9a 1b 5d 3a 50 25 3d |EQUD 16.)..]:P%=| 00009040 50 25 2b 26 32 38 30 30 3a 5b 4f 50 54 20 6f 70 |P%+&2800:[OPT op| 00009050 74 25 0d 29 a4 05 3a 0d 29 ae 05 5d 0d 29 b8 07 |t%.)..:.)..].)..| 00009060 ed 3a e1 0d 29 c2 05 3a 0d 29 cc 10 dd f2 64 72 |.:..)..:.)....dr| 00009070 61 77 73 63 72 65 65 6e 0d 29 d6 11 ff 22 46 58 |awscreen.)..."FX| 00009080 20 31 31 32 2c 32 22 3a db 0d 29 e0 2b f2 62 61 | 112,2":..).+.ba| 00009090 63 6b 67 72 6f 75 6e 64 3a f2 62 6f 78 28 38 30 |ckground:.box(80| 000090a0 2c 38 30 2c 37 33 32 2c 37 33 32 29 3a f2 73 63 |,80,732,732):.sc| 000090b0 6f 72 65 73 0d 29 ea 11 ff 22 46 58 20 31 31 32 |ores.)..."FX 112| 000090c0 2c 31 22 3a db 0d 29 f4 2b f2 62 61 63 6b 67 72 |,1":..).+.backgr| 000090d0 6f 75 6e 64 3a f2 62 6f 78 28 38 30 2c 38 30 2c |ound:.box(80,80,| 000090e0 37 33 32 2c 37 33 32 29 3a f2 73 63 6f 72 65 73 |732,732):.scores| 000090f0 0d 29 fe 05 e1 0d 2a 08 05 3a 0d 2a 12 0a dd f2 |.)....*..:.*....| 00009100 67 61 6d 65 0d 2a 1c 3d 21 6c 65 76 65 6c 3d 73 |game.*.=!level=s| 00009110 74 61 72 74 6c 65 76 65 6c 25 3a 21 64 65 61 64 |tartlevel%:!dead| 00009120 3d 30 3a 21 66 69 6e 69 73 68 65 64 6d 61 70 3d |=0:!finishedmap=| 00009130 30 3a d6 20 64 6f 77 6e 6c 6f 61 64 6c 65 76 65 |0:. downloadleve| 00009140 6c 0d 2a 26 3d 58 25 3d 21 73 74 61 72 74 6d 61 |l.*&=X%=!startma| 00009150 6e 78 3a 59 25 3d 21 73 74 61 72 74 6d 61 6e 79 |nx:Y%=!startmany| 00009160 3a 21 78 6d 61 70 70 6f 73 3d 58 25 3a 21 79 6d |:!xmappos=X%:!ym| 00009170 61 70 70 6f 73 3d 59 25 3a f2 66 61 64 65 0d 2a |appos=Y%:.fade.*| 00009180 30 1b ff 22 46 58 20 31 31 32 2c 32 22 3a ff 22 |0.."FX 112,2":."| 00009190 46 58 20 31 31 33 2c 31 22 0d 2a 3a 2c f2 72 65 |FX 113,1".*:,.re| 000091a0 73 65 74 73 63 6f 72 65 73 3a d6 20 70 6c 6f 74 |setscores:. plot| 000091b0 6d 61 70 3a d6 20 70 6c 6f 74 68 69 6d 3a f2 73 |map:. plothim:.s| 000091c0 63 6f 72 65 73 0d 2a 44 0f ff 22 46 58 20 31 31 |cores.*D.."FX 11| 000091d0 32 2c 31 22 0d 2a 4e 1f f2 73 63 6f 72 65 73 3a |2,1".*N..scores:| 000091e0 d6 20 70 6c 6f 74 6d 61 70 3a d6 20 70 6c 6f 74 |. plotmap:. plot| 000091f0 68 69 6d 0d 2a 58 05 3a 0d 2a 62 05 f5 0d 2a 6c |him.*X.:.*b...*l| 00009200 47 d6 20 6d 61 69 6e 6c 6f 6f 70 3a d1 3d 30 3a |G. mainloop:.=0:| 00009210 f5 fd 91 3e 35 30 3a ff 28 22 46 58 20 31 31 32 |...>50:.("FX 112| 00009220 2c 31 22 29 3a ff 28 22 46 58 20 31 31 33 2c 31 |,1"):.("FX 113,1| 00009230 22 29 3a f2 66 61 64 65 3a f2 68 61 6e 64 6c 65 |"):.fade:.handle| 00009240 64 65 61 64 0d 2a 76 2b fd 20 28 21 64 65 61 64 |dead.*v+. (!dead| 00009250 3d 31 20 80 20 21 6c 69 76 65 73 3d 30 29 20 84 |=1 . !lives=0) .| 00009260 20 21 66 69 6e 69 73 68 65 64 6d 61 70 3d 31 0d | !finishedmap=1.| 00009270 2a 80 05 3a 0d 2a 8a 0d 2a 46 58 20 31 31 33 2c |*..:.*..*FX 113,| 00009280 31 0d 2a 94 1e e7 20 21 64 65 61 64 3d 31 20 80 |1.*... !dead=1 .| 00009290 20 21 6c 69 76 65 73 3d 30 20 f2 64 65 61 64 0d | !lives=0 .dead.| 000092a0 2a 9e 32 e7 20 21 66 69 6e 69 73 68 65 64 6d 61 |*.2. !finishedma| 000092b0 70 3d 31 20 80 20 21 6c 65 76 65 6c 3c 34 20 f2 |p=1 . !level<4 .| 000092c0 66 69 6e 69 73 68 65 64 6d 61 70 3a e5 8d 44 62 |finishedmap:..Db| 000092d0 6a 0d 2a a8 2c e7 20 21 66 69 6e 69 73 68 65 64 |j.*.,. !finished| 000092e0 6d 61 70 3d 31 20 80 20 21 6c 65 76 65 6c 3d 34 |map=1 . !level=4| 000092f0 20 f2 66 69 6e 69 73 68 65 64 61 6c 6c 0d 2a b2 | .finishedall.*.| 00009300 09 f2 66 61 64 65 0d 2a bc 05 e1 0d 2a c6 05 3a |..fade.*....*..:| 00009310 0d 2a d0 0a dd f2 66 61 64 65 0d 2a da 1f e6 20 |.*....fade.*... | 00009320 30 2c 37 3a e3 20 58 25 3d 30 20 b8 20 33 31 20 |0,7:. X%=0 . 31 | 00009330 88 20 34 3a c8 96 3a c8 96 0d 2a e4 1d e3 20 59 |. 4:..:...*... Y| 00009340 25 3d 31 32 38 2b 58 25 20 b8 20 37 34 30 2b 58 |%=128+X% . 740+X| 00009350 25 20 88 20 33 32 0d 2a ee 15 ec 20 31 32 38 2c |% . 32.*... 128,| 00009360 59 25 3a df 20 37 36 34 2c 59 25 0d 2a f8 07 ed |Y%:. 764,Y%.*...| 00009370 3a ed 0d 2b 02 05 e1 0d 2b 0c 05 3a 0d 2b 16 1c |:..+....+..:.+..| 00009380 dd a4 66 61 6e 63 79 74 65 78 74 28 74 65 78 74 |..fancytext(text| 00009390 24 2c 58 25 2c 59 25 29 0d 2b 20 0d ef 35 3a e6 |$,X%,Y%).+ ..5:.| 000093a0 20 30 2c 31 34 0d 2b 2a 29 ec 20 58 25 2d 34 2c | 0,14.+*). X%-4,| 000093b0 59 25 2d 34 3a f1 74 65 78 74 24 3a ec 20 58 25 |Y%-4:.text$:. X%| 000093c0 2b 34 2c 59 25 2d 34 3a f1 74 65 78 74 24 0d 2b |+4,Y%-4:.text$.+| 000093d0 34 29 ec 20 58 25 2d 34 2c 59 25 2b 34 3a f1 74 |4). X%-4,Y%+4:.t| 000093e0 65 78 74 24 3a ec 20 58 25 2b 34 2c 59 25 2b 34 |ext$:. X%+4,Y%+4| 000093f0 3a f1 74 65 78 74 24 0d 2b 3e 2b e6 20 30 2c 39 |:.text$.+>+. 0,9| 00009400 3a ec 20 58 25 2d 34 2c 59 25 3a f1 74 65 78 74 |:. X%-4,Y%:.text| 00009410 24 3a ec 20 58 25 2b 34 2c 59 25 3a f1 74 65 78 |$:. X%+4,Y%:.tex| 00009420 74 24 0d 2b 48 25 ec 20 58 25 2c 59 25 2d 34 3a |t$.+H%. X%,Y%-4:| 00009430 f1 74 65 78 74 24 3a ec 20 58 25 2c 59 25 2b 34 |.text$:. X%,Y%+4| 00009440 3a f1 74 65 78 74 24 0d 2b 52 20 e6 20 30 2c 31 |:.text$.+R . 0,1| 00009450 31 3a ec 20 58 25 2c 59 25 3a f1 74 65 78 74 24 |1:. X%,Y%:.text$| 00009460 3a ef 34 3a 3d 22 22 0d 2b 5c 05 3a 0d 2b 66 0a |:.4:="".+\.:.+f.| 00009470 dd f2 64 65 61 64 0d 2b 70 0e d1 3d 30 3a f5 fd |..dead.+p..=0:..| 00009480 91 3e 33 30 0d 2b 7a 0c f2 6f 75 74 6c 69 6e 65 |.>30.+z..outline| 00009490 0d 2b 84 0c 2a 46 58 20 31 35 2c 31 0d 2b 8e 3c |.+..*FX 15,1.+.<| 000094a0 41 24 3d 22 48 61 72 64 20 4c 75 63 6b 21 22 3a |A$="Hard Luck!":| 000094b0 f1 a4 66 61 6e 63 79 74 65 78 74 28 41 24 2c 31 |..fancytext(A$,1| 000094c0 32 34 2b 28 33 32 32 2d 28 a9 28 41 24 29 2a 31 |24+(322-(.(A$)*1| 000094d0 36 29 29 2c 35 35 30 29 0d 2b 98 3e 41 24 3d 22 |6)),550).+.>A$="| 000094e0 59 6f 75 20 61 72 65 20 64 65 61 64 22 3a f1 a4 |You are dead":..| 000094f0 66 61 6e 63 79 74 65 78 74 28 41 24 2c 31 32 34 |fancytext(A$,124| 00009500 2b 28 33 32 32 2d 28 a9 28 41 24 29 2a 31 36 29 |+(322-(.(A$)*16)| 00009510 29 2c 35 30 30 29 0d 2b a2 41 41 24 3d 22 50 72 |),500).+.AA$="Pr| 00009520 65 73 73 20 53 70 61 63 65 20 42 61 72 22 3a f1 |ess Space Bar":.| 00009530 a4 66 61 6e 63 79 74 65 78 74 28 41 24 2c 31 32 |.fancytext(A$,12| 00009540 34 2b 28 33 32 32 2d 28 a9 28 41 24 29 2a 31 36 |4+(322-(.(A$)*16| 00009550 29 29 2c 33 30 30 29 0d 2b ac 0c f5 fd a6 2d 39 |)),300).+.....-9| 00009560 39 3a e1 0d 2b b6 05 3a 0d 2b c0 11 dd f2 66 69 |9:..+..:.+....fi| 00009570 6e 69 73 68 65 64 6d 61 70 0d 2b ca 35 21 6c 65 |nishedmap.+.5!le| 00009580 76 65 6c 2b 3d 31 3a ff 22 46 58 20 31 31 32 2c |vel+=1:."FX 112,| 00009590 32 22 3a f2 73 63 6f 72 65 73 3a ff 22 46 58 20 |2":.scores:."FX | 000095a0 31 31 32 2c 31 22 3a f2 73 63 6f 72 65 73 0d 2b |112,1":.scores.+| 000095b0 d4 13 d6 20 64 6f 77 6e 6c 6f 61 64 6c 65 76 65 |... downloadleve| 000095c0 6c 0d 2b de 37 58 25 3d 21 73 74 61 72 74 6d 61 |l.+.7X%=!startma| 000095d0 6e 78 3a 59 25 3d 21 73 74 61 72 74 6d 61 6e 79 |nx:Y%=!startmany| 000095e0 3a 21 78 6d 61 70 70 6f 73 3d 58 25 3a 21 79 6d |:!xmappos=X%:!ym| 000095f0 61 70 70 6f 73 3d 59 25 0d 2b e8 17 d1 3d 30 3a |appos=Y%.+...=0:| 00009600 f5 fd 91 3e 33 30 3a f2 6f 75 74 6c 69 6e 65 0d |...>30:.outline.| 00009610 2b f2 0c 2a 46 58 20 31 35 2c 31 0d 2b fc 42 41 |+..*FX 15,1.+.BA| 00009620 24 3d 22 43 6f 6e 67 72 61 74 75 6c 61 74 69 6f |$="Congratulatio| 00009630 6e 73 21 22 3a f1 a4 66 61 6e 63 79 74 65 78 74 |ns!":..fancytext| 00009640 28 41 24 2c 31 32 34 2b 28 33 32 32 2d 28 a9 28 |(A$,124+(322-(.(| 00009650 41 24 29 2a 31 36 29 29 2c 35 35 30 29 0d 2c 06 |A$)*16)),550).,.| 00009660 44 41 24 3d 22 59 6f 75 20 68 61 76 65 20 63 6f |DA$="You have co| 00009670 6d 70 6c 65 74 65 64 22 3a f1 a4 66 61 6e 63 79 |mpleted":..fancy| 00009680 74 65 78 74 28 41 24 2c 31 32 34 2b 28 33 32 32 |text(A$,124+(322| 00009690 2d 28 a9 28 41 24 29 2a 31 36 29 29 2c 35 30 30 |-(.(A$)*16)),500| 000096a0 29 0d 2c 10 42 41 24 3d 22 4c 65 76 65 6c 20 22 |).,.BA$="Level "| 000096b0 2b c3 28 21 6c 65 76 65 6c 29 3a f1 a4 66 61 6e |+.(!level):..fan| 000096c0 63 79 74 65 78 74 28 41 24 2c 31 32 34 2b 28 33 |cytext(A$,124+(3| 000096d0 32 32 2d 28 a9 28 41 24 29 2a 31 36 29 29 2c 34 |22-(.(A$)*16)),4| 000096e0 35 30 29 0d 2c 1a 41 41 24 3d 22 50 72 65 73 73 |50).,.AA$="Press| 000096f0 20 53 70 61 63 65 20 42 61 72 22 3a f1 a4 66 61 | Space Bar":..fa| 00009700 6e 63 79 74 65 78 74 28 41 24 2c 31 32 34 2b 28 |ncytext(A$,124+(| 00009710 33 32 32 2d 28 a9 28 41 24 29 2a 31 36 29 29 2c |322-(.(A$)*16)),| 00009720 33 30 30 29 0d 2c 24 40 ff 22 46 58 31 31 32 2c |300).,$@."FX112,| 00009730 32 22 3a f2 73 63 6f 72 65 73 3a ff 22 46 58 31 |2":.scores:."FX1| 00009740 31 32 2c 31 22 3a f2 73 63 6f 72 65 73 3a 21 64 |12,1":.scores:!d| 00009750 65 61 64 3d 30 3a 21 66 69 6e 69 73 68 65 64 6d |ead=0:!finishedm| 00009760 61 70 3d 30 0d 2c 2e 10 f2 72 65 73 65 74 73 63 |ap=0.,...resetsc| 00009770 6f 72 65 73 0d 2c 38 0c f5 fd a6 2d 39 39 3a e1 |ores.,8....-99:.| 00009780 0d 2c 42 05 3a 0d 2c 4c 0d dd f2 6f 75 74 6c 69 |.,B.:.,L...outli| 00009790 6e 65 0d 2c 56 1d e6 20 30 2c 31 31 3a c8 93 20 |ne.,V.. 0,11:.. | 000097a0 31 32 38 2c 31 32 38 2c 36 33 36 2c 36 33 36 0d |128,128,636,636.| 000097b0 2c 60 1d e6 20 30 2c 31 34 3a c8 93 20 31 33 36 |,`.. 0,14:.. 136| 000097c0 2c 31 33 36 2c 36 32 30 2c 36 32 30 0d 2c 6a 05 |,136,620,620.,j.| 000097d0 e1 0d 2c 74 05 3a 0d 2c 7e 11 dd f2 72 65 73 65 |..,t.:.,~...rese| 000097e0 74 73 63 6f 72 65 73 0d 2c 88 39 d6 20 63 6f 75 |tscores.,.9. cou| 000097f0 6e 74 64 69 61 6d 6f 6e 64 73 3a 21 67 6f 6c 64 |ntdiamonds:!gold| 00009800 63 6f 75 6e 74 3d 30 3a 21 6c 69 76 65 73 3d 33 |count=0:!lives=3| 00009810 3a 21 65 61 72 74 68 63 6f 75 6e 74 3d 30 3a e1 |:!earthcount=0:.| 00009820 0d 2c 92 05 3a 0d 2c 9c 0c dd f2 73 63 6f 72 65 |.,..:.,....score| 00009830 73 0d 2c a6 18 f2 62 6f 78 28 38 34 34 2c 38 30 |s.,...box(844,80| 00009840 2c 33 38 34 2c 37 33 32 29 0d 2c b0 2e f1 a4 74 |,384,732).,....t| 00009850 61 62 74 65 78 74 28 22 20 47 6f 6c 64 3a 22 2c |abtext(" Gold:",| 00009860 32 38 2c 39 29 3b 8a 33 34 2c 39 29 3b 21 67 6f |28,9);.34,9);!go| 00009870 6c 64 74 6f 74 61 6c 0d 2c ba 31 f1 a4 74 61 62 |ldtotal.,.1..tab| 00009880 74 65 78 74 28 22 45 61 72 74 68 3a 22 2c 32 38 |text("Earth:",28| 00009890 2c 31 31 29 3b 8a 33 34 2c 31 31 29 3b 21 65 61 |,11);.34,11);!ea| 000098a0 72 74 68 63 6f 75 6e 74 0d 2c c4 27 f1 a4 74 61 |rthcount.,.'..ta| 000098b0 62 74 65 78 74 28 22 4c 69 76 65 73 3a 22 2b c3 |btext("Lives:"+.| 000098c0 28 21 6c 69 76 65 73 29 2c 32 38 2c 31 33 29 0d |(!lives),28,13).| 000098d0 2c ce 20 f1 a4 74 61 62 74 65 78 74 28 22 53 6f |,. ..tabtext("So| 000098e0 75 6e 64 3a 59 65 73 22 2c 32 38 2c 31 35 29 0d |und:Yes",28,15).| 000098f0 2c d8 2b f1 a4 74 61 62 74 65 78 74 28 22 4c 65 |,.+..tabtext("Le| 00009900 76 65 6c 3a 22 2b c3 28 28 21 6c 65 76 65 6c 29 |vel:"+.((!level)| 00009910 2b 31 29 2c 32 38 2c 31 37 29 0d 2c e2 2a f1 a4 |+1),28,17).,.*..| 00009920 74 61 62 74 65 78 74 28 22 3e 22 2b 70 61 73 73 |tabtext(">"+pass| 00009930 24 28 21 6c 65 76 65 6c 29 2b 22 3c 22 2c 32 38 |$(!level)+"<",28| 00009940 2c 32 30 29 0d 2c ec 20 f1 a4 74 61 62 74 65 78 |,20).,. ..tabtex| 00009950 74 28 22 42 59 20 44 55 4e 43 41 4e 22 2c 32 38 |t("BY DUNCAN",28| 00009960 2c 32 34 29 0d 2c f6 20 f1 a4 74 61 62 74 65 78 |,24).,. ..tabtex| 00009970 74 28 22 4d 63 50 48 45 52 53 4f 4e 22 2c 32 38 |t("McPHERSON",28| 00009980 2c 32 36 29 0d 2d 00 0f fb 31 31 3a f1 8a 30 2c |,26).-...11:..0,| 00009990 30 29 3b 0d 2d 0a 05 e1 0d 2d 14 05 3a 0d 2d 1e |0);.-....-..:.-.| 000099a0 10 dd f2 68 61 6e 64 6c 65 64 65 61 64 0d 2d 28 |...handledead.-(| 000099b0 2b e7 20 21 64 65 61 64 3d 31 20 80 20 21 6c 69 |+. !dead=1 . !li| 000099c0 76 65 73 3d 31 20 21 6c 69 76 65 73 3d 30 3a f2 |ves=1 !lives=0:.| 000099d0 73 63 6f 72 65 73 3a e1 0d 2d 32 16 e7 20 21 66 |scores:..-2.. !f| 000099e0 69 6e 69 73 68 65 64 6d 61 70 3d 31 20 e1 0d 2d |inishedmap=1 ..-| 000099f0 3c 25 e7 20 21 64 65 61 64 3d 31 20 21 6c 69 76 |<%. !dead=1 !liv| 00009a00 65 73 3d 21 6c 69 76 65 73 2d 31 3a 21 64 65 61 |es=!lives-1:!dea| 00009a10 64 3d 30 0d 2d 46 17 ff 22 46 58 20 31 31 32 2c |d=0.-F.."FX 112,| 00009a20 32 22 3a f2 73 63 6f 72 65 73 0d 2d 50 17 ff 22 |2":.scores.-P.."| 00009a30 46 58 20 31 31 32 2c 31 22 3a f2 73 63 6f 72 65 |FX 112,1":.score| 00009a40 73 0d 2d 5a 37 58 25 3d 21 73 74 61 72 74 6d 61 |s.-Z7X%=!startma| 00009a50 6e 78 3a 59 25 3d 21 73 74 61 72 74 6d 61 6e 79 |nx:Y%=!startmany| 00009a60 3a 21 78 6d 61 70 70 6f 73 3d 58 25 3a 21 79 6d |:!xmappos=X%:!ym| 00009a70 61 70 70 6f 73 3d 59 25 0d 2d 64 10 21 64 69 72 |appos=Y%.-d.!dir| 00009a80 65 63 74 69 6f 6e 3d 30 0d 2d 6e 05 e1 0d 2d 78 |ection=0.-n...-x| 00009a90 05 3a 0d 2d 82 13 dd a4 65 6e 74 65 72 70 61 73 |.:.-....enterpas| 00009aa0 73 77 6f 72 64 0d 2d 8c 14 f2 66 61 64 65 3a fb |sword.-...fade:.| 00009ab0 31 32 38 2b 37 3a fb 31 31 0d 2d 96 40 41 24 3d |128+7:.11.-.@A$=| 00009ac0 22 50 6c 65 61 73 65 20 65 6e 74 65 72 20 61 22 |"Please enter a"| 00009ad0 3a f1 a4 66 61 6e 63 79 74 65 78 74 28 41 24 2c |:..fancytext(A$,| 00009ae0 31 32 34 2b 28 33 32 32 2d 28 a9 28 41 24 29 2a |124+(322-(.(A$)*| 00009af0 31 36 29 29 2c 36 30 30 29 0d 2d a0 3a 41 24 3d |16)),600).-.:A$=| 00009b00 22 70 61 73 73 77 6f 72 64 22 3a f1 a4 66 61 6e |"password":..fan| 00009b10 63 79 74 65 78 74 28 41 24 2c 31 32 34 2b 28 33 |cytext(A$,124+(3| 00009b20 32 32 2d 28 a9 28 41 24 29 2a 31 36 29 29 2c 35 |22-(.(A$)*16)),5| 00009b30 35 30 29 0d 2d aa 1b 50 25 3d 30 3a 41 24 3d 22 |50).-..P%=0:A$="| 00009b40 22 3a f2 70 72 69 6e 74 70 61 73 73 3a f5 0d 2d |":.printpass:..-| 00009b50 b4 49 f5 3a 47 24 3d be 3a 41 25 3d 97 28 47 24 |.I.:G$=.:A%=.(G$| 00009b60 29 3a fd 20 28 41 25 3e 36 34 20 80 20 41 25 3c |):. (A%>64 . A%<| 00009b70 39 31 29 20 84 20 28 41 25 3e 39 36 20 80 20 41 |91) . (A%>96 . A| 00009b80 25 3c 31 32 33 29 20 84 20 41 25 3d 31 32 37 20 |%<123) . A%=127 | 00009b90 84 20 41 25 3d 31 33 0d 2d be 1b e7 20 41 25 3e |. A%=13.-... A%>| 00009ba0 39 36 20 80 20 41 25 3c 31 32 33 20 41 25 2d 3d |96 . A%<123 A%-=| 00009bb0 33 32 0d 2d c8 22 e7 20 41 25 3d 31 32 37 20 f2 |32.-.". A%=127 .| 00009bc0 64 65 6c 65 74 65 3a f2 70 72 69 6e 74 70 61 73 |delete:.printpas| 00009bd0 73 3a fd a3 0d 2d d2 18 e7 20 50 25 3d 37 20 80 |s:...-... P%=7 .| 00009be0 20 47 24 3c 3e bd 31 33 20 fd 20 a3 0d 2d dc 1c | G$<>.13 . ..-..| 00009bf0 e7 20 41 25 3c 3e 31 33 20 41 24 3d 41 24 2b bd |. A%<>13 A$=A$+.| 00009c00 41 25 3a 50 25 2b 3d 31 0d 2d e6 0e f2 70 72 69 |A%:P%+=1.-...pri| 00009c10 6e 74 70 61 73 73 0d 2d f0 15 fd 20 41 25 3d 31 |ntpass.-... A%=1| 00009c20 33 3a 47 24 3d 22 22 3a 3d 41 24 0d 2d fa 05 3a |3:G$="":=A$.-..:| 00009c30 0d 2e 04 0c dd f2 64 65 6c 65 74 65 0d 2e 0e 0c |......delete....| 00009c40 e7 20 50 25 3d 30 20 e1 0d 2e 18 1b 41 24 3d c0 |. P%=0 .....A$=.| 00009c50 41 24 2c a9 28 41 24 29 2d 31 29 3a 50 25 2d 3d |A$,.(A$)-1):P%-=| 00009c60 31 3a e1 0d 2e 22 05 3a 0d 2e 2c 0f dd f2 70 72 |1:...".:..,...pr| 00009c70 69 6e 74 70 61 73 73 0d 2e 36 1f 42 24 3d 22 3e |intpass..6.B$=">| 00009c80 22 2b 41 24 2b c4 37 2d a9 28 41 24 29 2c 22 2e |"+A$+.7-.(A$),".| 00009c90 22 29 2b 22 3c 22 0d 2e 40 2a c8 96 3a e6 20 30 |")+"<"..@*..:. 0| 00009ca0 2c 37 3a ec 20 31 32 38 2c 34 30 30 3a f0 20 39 |,7:. 128,400:. 9| 00009cb0 37 2c 36 30 30 2c 36 30 3a f1 8a 30 2c 30 29 3b |7,600,60:..0,0);| 00009cc0 0d 2e 4a 2e f1 a4 66 61 6e 63 79 74 65 78 74 28 |..J...fancytext(| 00009cd0 42 24 2c 31 32 34 2b 28 33 32 32 2d 28 a9 28 42 |B$,124+(322-(.(B| 00009ce0 24 29 2a 31 36 29 29 2c 34 35 30 29 3a e1 0d 2e |$)*16)),450):...| 00009cf0 54 05 3a 0d 2e 5e 0f dd f2 65 6e 74 72 79 73 63 |T.:..^...entrysc| 00009d00 72 6e 0d 2e 68 14 f2 66 61 64 65 3a fb 31 32 38 |rn..h..fade:.128| 00009d10 2b 37 3a fb 31 31 0d 2e 72 3c 41 24 3d 22 57 65 |+7:.11..r<A$="We| 00009d20 6c 63 6f 6d 65 20 74 6f 22 3a f1 a4 66 61 6e 63 |lcome to":..fanc| 00009d30 79 74 65 78 74 28 41 24 2c 31 32 34 2b 28 33 32 |ytext(A$,124+(32| 00009d40 32 2d 28 a9 28 41 24 29 2a 31 36 29 29 2c 37 30 |2-(.(A$)*16)),70| 00009d50 30 29 0d 2e 7c 3f 41 24 3d 22 43 41 56 45 53 20 |0)..|?A$="CAVES | 00009d60 4f 46 20 44 4f 4f 4d 22 3a f1 a4 66 61 6e 63 79 |OF DOOM":..fancy| 00009d70 74 65 78 74 28 41 24 2c 31 32 34 2b 28 33 32 32 |text(A$,124+(322| 00009d80 2d 28 a9 28 41 24 29 2a 31 36 29 29 2c 36 35 30 |-(.(A$)*16)),650| 00009d90 29 0d 2e 86 1d e6 20 30 2c 31 34 3a c8 93 20 32 |)..... 0,14:.. 2| 00009da0 32 36 2c 36 31 30 2c 34 34 30 2c 31 30 38 0d 2e |26,610,440,108..| 00009db0 90 27 e6 20 30 2c 31 31 3a c8 93 20 32 32 36 2d |.'. 0,11:.. 226-| 00009dc0 38 2c 36 31 30 2d 38 2c 34 34 30 2b 31 36 2c 31 |8,610-8,440+16,1| 00009dd0 30 38 2b 31 36 0d 2e 9a 45 41 24 3d 22 5a 20 2d |08+16...EA$="Z -| 00009de0 20 4c 65 66 74 20 20 58 20 2d 20 52 69 67 68 74 | Left X - Right| 00009df0 22 3a f1 a4 66 61 6e 63 79 74 65 78 74 28 41 24 |":..fancytext(A$| 00009e00 2c 31 32 34 2b 28 33 32 32 2d 28 a9 28 41 24 29 |,124+(322-(.(A$)| 00009e10 2a 31 36 29 29 2c 35 35 30 29 0d 2e a4 45 41 24 |*16)),550)...EA$| 00009e20 3d 22 27 20 2d 20 55 70 20 20 20 20 2f 20 2d 20 |="' - Up / - | 00009e30 44 6f 77 6e 20 22 3a f1 a4 66 61 6e 63 79 74 65 |Down ":..fancyte| 00009e40 78 74 28 41 24 2c 31 32 34 2b 28 33 32 32 2d 28 |xt(A$,124+(322-(| 00009e50 a9 28 41 24 29 2a 31 36 29 29 2c 35 30 30 29 0d |.(A$)*16)),500).| 00009e60 2e ae 45 41 24 3d 22 54 61 62 20 2d 20 4b 69 6c |..EA$="Tab - Kil| 00009e70 6c 20 79 6f 75 72 73 65 6c 66 22 3a f1 a4 66 61 |l yourself":..fa| 00009e80 6e 63 79 74 65 78 74 28 41 24 2c 31 32 34 2b 28 |ncytext(A$,124+(| 00009e90 33 32 32 2d 28 a9 28 41 24 29 2a 31 36 29 29 2c |322-(.(A$)*16)),| 00009ea0 34 35 30 29 0d 2e b8 44 41 24 3d 22 20 20 20 20 |450)...DA$=" | 00009eb0 20 50 20 3d 20 50 61 73 73 77 6f 72 64 20 22 3a | P = Password ":| 00009ec0 f1 a4 66 61 6e 63 79 74 65 78 74 28 41 24 2c 31 |..fancytext(A$,1| 00009ed0 32 34 2b 28 33 32 32 2d 28 a9 28 41 24 29 2a 31 |24+(322-(.(A$)*1| 00009ee0 36 29 29 2c 33 35 30 29 0d 2e c2 44 41 24 3d 22 |6)),350)...DA$="| 00009ef0 20 53 70 61 63 65 20 3d 20 50 6c 61 79 20 67 61 | Space = Play ga| 00009f00 6d 65 22 3a f1 a4 66 61 6e 63 79 74 65 78 74 28 |me":..fancytext(| 00009f10 41 24 2c 31 32 34 2b 28 33 32 32 2d 28 a9 28 41 |A$,124+(322-(.(A| 00009f20 24 29 2a 31 36 29 29 2c 33 30 30 29 0d 2e cc 44 |$)*16)),300)...D| 00009f30 41 24 3d 22 52 65 74 75 72 6e 20 3d 20 44 65 73 |A$="Return = Des| 00009f40 6b 74 6f 70 20 20 22 3a f1 a4 66 61 6e 63 79 74 |ktop ":..fancyt| 00009f50 65 78 74 28 41 24 2c 31 32 34 2b 28 33 32 32 2d |ext(A$,124+(322-| 00009f60 28 a9 28 41 24 29 2a 31 36 29 29 2c 32 35 30 29 |(.(A$)*16)),250)| 00009f70 0d 2e d6 0d f1 8a 30 2c 30 29 3b 3a e1 0d 2e e0 |......0,0);:....| 00009f80 05 3a 0d 2e ea 11 dd f2 73 74 61 72 74 73 63 72 |.:......startscr| 00009f90 65 65 6e 0d 2e f4 1c f2 64 72 61 77 73 63 72 65 |een.....drawscre| 00009fa0 65 6e 3a f2 65 6e 74 72 79 73 63 72 6e 3a f5 0d |en:.entryscrn:..| 00009fb0 2e fe 3c 73 74 61 72 74 6c 65 76 65 6c 25 3d 30 |..<startlevel%=0| 00009fc0 3a f5 3a 47 24 3d be 3a fd 20 47 24 3d bd 31 33 |:.:G$=.:. G$=.13| 00009fd0 20 84 20 47 24 3d 22 50 22 20 84 20 47 24 3d 22 | . G$="P" . G$="| 00009fe0 70 22 20 84 20 47 24 3d 22 20 22 0d 2f 08 2b e7 |p" . G$=" "./.+.| 00009ff0 20 47 24 3d 22 20 22 20 f2 67 61 6d 65 3a f2 65 | G$=" " .game:.e| 0000a000 6e 74 72 79 73 63 72 6e 3a ff 22 46 58 20 31 35 |ntryscrn:."FX 15| 0000a010 2c 31 22 3a fd a3 0d 2f 12 22 e7 20 47 24 3d 22 |,1":.../.". G$="| 0000a020 50 22 20 84 20 47 24 3d 22 70 22 20 f2 67 65 74 |P" . G$="p" .get| 0000a030 73 74 61 72 74 6c 65 76 0d 2f 1c 33 e7 20 73 74 |startlev./.3. st| 0000a040 61 72 74 6c 65 76 65 6c 25 3c 3e 30 20 f2 67 61 |artlevel%<>0 .ga| 0000a050 6d 65 3a f2 65 6e 74 72 79 73 63 72 6e 3a ff 22 |me:.entryscrn:."| 0000a060 46 58 20 31 35 2c 31 22 3a fd a3 0d 2f 26 16 fd |FX 15,1":.../&..| 0000a070 20 47 24 3d bd 31 33 3a f2 66 61 64 65 3a db 3a | G$=.13:.fade:.:| 0000a080 e1 0d 2f 30 05 3a 0d 2f 3a 1e dd a4 74 61 62 74 |../0.:./:...tabt| 0000a090 65 78 74 28 74 78 74 24 2c 78 74 61 62 2c 79 74 |ext(txt$,xtab,yt| 0000a0a0 61 62 25 29 0d 2f 44 30 78 74 61 62 3d 78 74 61 |ab%)./D0xtab=xta| 0000a0b0 62 2a 33 32 3a 79 74 61 62 25 3d 79 74 61 62 25 |b*32:ytab%=ytab%| 0000a0c0 2a 33 32 3a 79 74 61 62 25 3d 31 30 32 34 2d 79 |*32:ytab%=1024-y| 0000a0d0 74 61 62 25 0d 2f 4e 24 f1 a4 66 61 6e 63 79 74 |tab%./N$..fancyt| 0000a0e0 65 78 74 28 74 78 74 24 2c 78 74 61 62 2c 79 74 |ext(txt$,xtab,yt| 0000a0f0 61 62 25 29 3a 3d 22 22 0d 2f 58 05 3a 0d 2f 62 |ab%):=""./X.:./b| 0000a100 0d dd f2 67 65 74 70 61 73 73 0d 2f 6c 48 61 64 |...getpass./lHad| 0000a110 64 72 65 73 73 25 3d 67 61 6d 65 6d 61 70 73 3a |dress%=gamemaps:| 0000a120 61 64 64 72 65 73 73 25 2b 3d 38 3a e3 20 58 25 |address%+=8:. X%| 0000a130 3d 30 20 b8 20 34 3a 41 24 3d 24 61 64 64 72 65 |=0 . 4:A$=$addre| 0000a140 73 73 25 3a 61 64 64 72 65 73 73 25 2b 3d 31 31 |ss%:address%+=11| 0000a150 33 36 0d 2f 76 14 70 61 73 73 24 28 58 25 29 3d |36./v.pass$(X%)=| 0000a160 41 24 3a ed 3a e1 0d 2f 80 05 3a 0d 2f 8a 11 dd |A$:.:../..:./...| 0000a170 f2 67 65 74 73 74 61 72 74 6c 65 76 0d 2f 94 40 |.getstartlev./.@| 0000a180 43 24 3d a4 65 6e 74 65 72 70 61 73 73 77 6f 72 |C$=.enterpasswor| 0000a190 64 3a 6c 65 76 25 3d 31 30 30 3a e3 20 58 25 3d |d:lev%=100:. X%=| 0000a1a0 30 20 b8 20 34 3a e7 20 43 24 3d 70 61 73 73 24 |0 . 4:. C$=pass$| 0000a1b0 28 58 25 29 20 6c 65 76 25 3d 58 25 0d 2f 9e 6a |(X%) lev%=X%./.j| 0000a1c0 ed 3a e7 20 6c 65 76 25 3d 31 30 30 20 41 24 3d |.:. lev%=100 A$=| 0000a1d0 22 4e 6f 74 20 61 63 63 65 70 74 65 64 21 22 3a |"Not accepted!":| 0000a1e0 f1 a4 66 61 6e 63 79 74 65 78 74 28 41 24 2c 31 |..fancytext(A$,1| 0000a1f0 32 34 2b 28 33 32 32 2d 28 a9 28 41 24 29 2a 31 |24+(322-(.(A$)*1| 0000a200 36 29 29 2c 32 35 30 29 3a d1 3d 30 3a f5 fd 91 |6)),250):.=0:...| 0000a210 3e 36 30 3a f2 66 61 64 65 3a f2 65 6e 74 72 79 |>60:.fade:.entry| 0000a220 73 63 72 6e 3a e1 0d 2f a8 61 73 74 61 72 74 6c |scrn:../.astartl| 0000a230 65 76 65 6c 25 3d 6c 65 76 25 3a 41 24 3d 22 50 |evel%=lev%:A$="P| 0000a240 61 73 73 77 6f 72 64 20 61 63 63 65 70 74 65 64 |assword accepted| 0000a250 22 3a f1 a4 66 61 6e 63 79 74 65 78 74 28 41 24 |":..fancytext(A$| 0000a260 2c 31 32 34 2b 28 33 32 32 2d 28 a9 28 41 24 29 |,124+(322-(.(A$)| 0000a270 2a 31 36 29 29 2c 32 35 30 29 3a d1 3d 30 3a f5 |*16)),250):.=0:.| 0000a280 fd 91 3e 36 30 3a e1 0d 2f b2 05 3a 0d 2f bc 11 |..>60:../..:./..| 0000a290 dd f2 66 69 6e 69 73 68 65 64 61 6c 6c 0d 2f c6 |..finishedall./.| 0000a2a0 14 f2 66 61 64 65 3a fb 31 32 38 2b 37 3a fb 31 |..fade:.128+7:.1| 0000a2b0 31 0d 2f d0 3f 41 24 3d 22 43 41 56 45 53 20 4f |1./.?A$="CAVES O| 0000a2c0 46 20 44 4f 4f 4d 22 3a f1 a4 66 61 6e 63 79 74 |F DOOM":..fancyt| 0000a2d0 65 78 74 28 41 24 2c 31 32 34 2b 28 33 32 32 2d |ext(A$,124+(322-| 0000a2e0 28 a9 28 41 24 29 2a 31 36 29 29 2c 37 30 30 29 |(.(A$)*16)),700)| 0000a2f0 0d 2f da 42 41 24 3d 22 43 6f 6e 67 72 61 74 75 |./.BA$="Congratu| 0000a300 6c 61 74 69 6f 6e 73 21 22 3a f1 a4 66 61 6e 63 |lations!":..fanc| 0000a310 79 74 65 78 74 28 41 24 2c 31 32 34 2b 28 33 32 |ytext(A$,124+(32| 0000a320 32 2d 28 a9 28 41 24 29 2a 31 36 29 29 2c 36 30 |2-(.(A$)*16)),60| 0000a330 30 29 0d 2f e4 44 41 24 3d 22 59 6f 75 20 68 61 |0)./.DA$="You ha| 0000a340 76 65 20 63 6f 6d 70 6c 65 74 65 64 22 3a f1 a4 |ve completed":..| 0000a350 66 61 6e 63 79 74 65 78 74 28 41 24 2c 31 32 34 |fancytext(A$,124| 0000a360 2b 28 33 32 32 2d 28 a9 28 41 24 29 2a 31 36 29 |+(322-(.(A$)*16)| 0000a370 29 2c 35 35 30 29 0d 2f ee 40 41 24 3d 22 74 68 |),550)./.@A$="th| 0000a380 65 20 57 48 4f 4c 45 20 67 61 6d 65 22 3a f1 a4 |e WHOLE game":..| 0000a390 66 61 6e 63 79 74 65 78 74 28 41 24 2c 31 32 34 |fancytext(A$,124| 0000a3a0 2b 28 33 32 32 2d 28 a9 28 41 24 29 2a 31 36 29 |+(322-(.(A$)*16)| 0000a3b0 29 2c 35 30 30 29 0d 2f f8 45 41 24 3d 22 4e 6f |),500)./.EA$="No| 0000a3c0 77 20 6c 6f 61 64 20 75 70 20 61 6e 6f 74 68 65 |w load up anothe| 0000a3d0 72 22 3a f1 a4 66 61 6e 63 79 74 65 78 74 28 41 |r":..fancytext(A| 0000a3e0 24 2c 31 32 34 2b 28 33 32 32 2d 28 a9 28 41 24 |$,124+(322-(.(A$| 0000a3f0 29 2a 31 36 29 29 2c 34 30 30 29 0d 30 02 42 41 |)*16)),400).0.BA| 0000a400 24 3d 22 41 6e 64 20 63 6f 6d 70 6c 65 74 65 20 |$="And complete | 0000a410 69 74 21 22 3a f1 a4 66 61 6e 63 79 74 65 78 74 |it!":..fancytext| 0000a420 28 41 24 2c 31 32 34 2b 28 33 32 32 2d 28 a9 28 |(A$,124+(322-(.(| 0000a430 41 24 29 2a 31 36 29 29 2c 33 35 30 29 0d 30 0c |A$)*16)),350).0.| 0000a440 41 41 24 3d 22 50 72 65 73 73 20 73 70 61 63 65 |AA$="Press space| 0000a450 20 62 61 72 22 3a f1 a4 66 61 6e 63 79 74 65 78 | bar":..fancytex| 0000a460 74 28 41 24 2c 31 32 34 2b 28 33 32 32 2d 28 a9 |t(A$,124+(322-(.| 0000a470 28 41 24 29 2a 31 36 29 29 2c 32 35 30 29 0d 30 |(A$)*16)),250).0| 0000a480 16 12 f5 fd a6 2d 39 39 3a f2 66 61 64 65 3a e1 |.....-99:.fade:.| 0000a490 0d 30 20 05 3a 0d 30 2a 16 dd f2 62 6f 78 28 78 |.0 .:.0*...box(x| 0000a4a0 25 2c 79 25 2c 77 25 2c 68 25 29 0d 30 34 1a f7 |%,y%,w%,h%).04..| 0000a4b0 20 8d 44 52 70 3a e3 20 58 25 3d 30 20 b8 20 34 | .DRp:. X%=0 . 4| 0000a4c0 37 20 88 20 34 0d 30 3e 36 f3 20 41 25 3a e6 20 |7 . 4.0>6. A%:. | 0000a4d0 30 2c 41 25 3a ec 20 78 25 2b 58 25 2c 79 25 2b |0,A%:. x%+X%,y%+| 0000a4e0 58 25 3a f0 20 39 37 2c 77 25 2d 28 58 25 2a 32 |X%:. 97,w%-(X%*2| 0000a4f0 29 2c 68 25 2d 28 58 25 2a 32 29 0d 30 48 07 ed |),h%-(X%*2).0H..| 0000a500 3a e1 0d 30 52 32 dc 20 35 2c 34 2c 33 2c 32 2c |:..0R2. 5,4,3,2,| 0000a510 31 2c 30 2c 31 2c 32 2c 33 2c 34 2c 35 2c 37 3a |1,0,1,2,3,4,5,7:| 0000a520 52 45 4d 20 44 61 74 61 20 66 6f 72 20 63 6f 6c |REM Data for col| 0000a530 6f 75 72 73 0d 30 5c 05 3a 0d 30 66 10 dd f2 62 |ours.0\.:.0f...b| 0000a540 61 63 6b 67 72 6f 75 6e 64 0d 30 70 2b e3 20 78 |ackground.0p+. x| 0000a550 25 3d 30 20 b8 20 31 32 38 30 20 88 20 31 32 38 |%=0 . 1280 . 128| 0000a560 3a e3 20 79 25 3d 30 20 b8 20 31 30 32 34 20 88 |:. y%=0 . 1024 .| 0000a570 20 31 32 38 0d 30 7a 32 c8 99 20 22 4f 53 5f 53 | 128.0z2.. "OS_S| 0000a580 70 72 69 74 65 4f 70 22 2c 32 39 30 2c 73 70 72 |priteOp",290,spr| 0000a590 69 74 65 61 72 65 61 2c 22 74 69 6c 65 22 2c 78 |itearea,"tile",x| 0000a5a0 25 2c 79 25 2c 38 0d 30 84 07 ed 3a ed 0d 30 8e |%,y%,8.0...:..0.| 0000a5b0 35 c8 99 20 22 4f 53 5f 53 70 72 69 74 65 4f 70 |5.. "OS_SpriteOp| 0000a5c0 22 2c 32 39 30 2c 73 70 72 69 74 65 61 72 65 61 |",290,spritearea| 0000a5d0 2c 22 63 61 76 65 73 22 2c 31 33 32 2c 38 35 36 |,"caves",132,856| 0000a5e0 2c 38 0d 30 98 05 e1 0d ff |,8.0.....| 0000a5e9