Home » Archimedes archive » Acorn User » AU 1997-04 A.adf » Features1 » StarInfo/Parker/!Spaceman/SourceCode
StarInfo/Parker/!Spaceman/SourceCode
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1997-04 A.adf » Features1 |
Filename: | StarInfo/Parker/!Spaceman/SourceCode |
Read OK: | ✔ |
File size: | 1295 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
1DIM code 4096 2: 3ON ERROR PRINT REPORT$;" at line ";ERL:END 4: 5v$="1.00":tm$=MID$(TIME$,5,11) 6: 7p$="HardDisc:Develope.Spaceman." 8: 9DIM thingie 4 10SYS "OS_File",16,p$+"Compiled",thingie 11times%=!thingie 12times%+=1 13!thingie=times% 14SYS "OS_File",10,p$+"Compiled",&ffd,,thingie,thingie+4 15: 16FOR n%=4 TO 6 STEP 2 17P%=0:O%=code 18[OPT n% 19DCD 0 ;start up code 20DCD initialise ;initialising code 21DCD finalise ;finalising code 22DCD 0 ;service code 23DCD title ;title of module 24DCD help ;help string 25DCD 0 ;help table 26 27.title 28EQUZ "Spaceman":ALIGN 29 30.help 31EQUZ "Spaceman"+CHR$9+CHR$9+v$+" ("+tm$+") � 1996 Quintin Parker of GTHS" 32ALIGN 33 34.initialise 35STMFD R13!,{R0-R12,R14} ;preserve regs 36MOV R0,#3 ;claim OS_WriteC vector 37ADR R1,vectorything ;with our routine 38MOV R2,#0 ;thing 39SWI "OS_Claim" 40MOV R0,#16 ;claim Event vector 41ADR R1,event ;with our routine 42ADR R2,shouldpressspace ;thing 43SWI "OS_Claim" 44MOV R0,#14 ;initialise event 45MOV R1,#4 46SWI "OS_Byte" 47.initialiseout 48LDMFD R13!,{R0-R12,PC} ;retrieve regs + return 49 50.finalise 51STMFD R13!,{R0-R12,R14} ;preserve regs 52MOV R0,#3 ;release OS_WriteC vector 53ADR R1,vectorything ;from our routine 54MOV R2,#0 ;thing 55SWI "OS_Release" 56MOV R0,#16 ;release Event vector 57ADR R1,event ;from our routine 58ADR R2,shouldpressspace ;thing 59SWI "OS_Release" 60LDMFD R13!,{R0-R12,PC} ;retrieve regs + return 61 62.varsblock 63DCD 0 ;+0 number of chars in `Press SPACE..' etc so far 64 65.message 66EQUS "Press SPACE or click mouse to continue"+CHR$13:ALIGN 67 68.vectorything 69STMFD R13!,{R0-R12,R14} ;preserve regs 70ADR R11,varsblock ;point R11 to variables 71ADR R12,message ;point R12 to message 72LDR R10,[R11,#0] ;get place in message so far 73LDRB R9,[R12,R10] ;and get the letter at that place 74TEQ R9,R0 ;is it the same as what is being printed? 75ADDEQ R10,R10,#1 ;if yes, add one to letters printed so far 76MOVNE R10,#0 ;if not, reset it back to zero 77TEQNE R9,#ASC("P") ;if it's `P' 78MOVNE R10,#1 ;we have got one char anyway 79STR R10,[R11,#0] ;store it back 80TEQ R10,#30 ;is R10 > 30? 81LDMNEFD R13!,{R0-R12,PC} ;if not, retrieve regs + return 82MOV R10,#1 ;if yes, then set the press space flag 83STR R10,shouldpressspace ;like that 84MOV R9,PC 85ORR R8,R9,#3 86TEQP R8,#0 87MOV R0,R0 88STMFD R13!,{R14} 89MOV R0,#100 ;in one second 90ADR R1,pressspaceroutine ;call press space routine 91ADR R2,shouldpressspace ;pass address of flag 92SWI "OS_CallAfter" ;tell it to 93LDMFD R13!,{R14} 94TEQP R9,#0 95MOV R0,R0 96LDMFD R13!,{R0-R12,PC} ;retrieve regs + return 97 98.shouldpressspace 99DCD 0 100 101.pressspaceroutine 102STMFD R13!,{R0-R12,R14} 103MOV R9,PC 104ORR R8,R9,#3 105TEQP R8,#0 106MOV R0,R0 107STMFD R13!,{R14} 108LDR R0,[R12,#0] ;get state of flag 109TEQ R0,#1 ;should we press space? 110MOVEQ R0,#153 ;if so, call *fx 153 111MOVEQ R1,#0 ;buffer 0 (keyboard) 112MOVEQ R2,#32 ;a space 113SWIEQ "OS_Byte" ;do it 114LDMFD R13!,{R14} 115TEQP R9,#0 116MOV R0,R0 117LDMFD R13!,{R0-R12,PC} 118 119.event 120TEQ R0,#4 ;vsync event? 121MOVNES PC,R14 ;if not, return 122STMFD R13!,{R0-R12,R14} 123LDR R0,[R12,#0] ;is press space flag on? 124TEQ R0,#1 125LDMNEFD R13!,{R0-R12,PC} ;if not, return 126MOV R9,PC 127ORR R8,R9,#3 128TEQP R8,#0 129MOV R0,R0 130STMFD R13!,{R14} 131MOV R0,#121 ;*fx 121 - keyboard scan 132MOV R1,#2 EOR &80 ;scan for Alt 133SWI "OS_Byte" ;do it 134TEQ R1,#&FF ;is it pressed? 135MOVEQ R0,#0 ;if so, reset flag 136MOVNE R0,#1 ;else keep flag set 137STR R0,[R12,#0] ;store status of flag again 138LDMFD R13!,{R14} 139TEQP R9,#0 140MOV R0,R0 141LDMFD R13!,{R0-R12,PC} 142 143.the_end 144EQUB 10 145EQUB 10 146EQUS "Assembled successfully on attempt number "+STR$(times%)+"!" 147EQUB 10 148EQUB 10 149EQUS "'Plagiarism is merely quoting verbatim' - Mr Blobby" 150EQUB 10 151EQUS "And ... anything below here is probably a virus." 152] 153NEXT 154: 155SYS "OS_File",10,p$+"!Spaceman.!RunImage",&ffa,,code,O%
� code 4096 : � � � �$;" at line ";�:� : v$="1.00":tm$=��$,5,11) : $p$="HardDisc:Develope.Spaceman." : � thingie 4 )ș "OS_File",16,p$+"Compiled",thingie times%=!thingie times%+=1 !thingie=times% 9ș "OS_File",10,p$+"Compiled",&ffd,,thingie,thingie+4 : � n%=4 � 6 � 2 P%=0:O%=code [OPT n% -DCD 0 ;start up code 1DCD initialise ;initialising code /DCD finalise ;finalising code ,DCD 0 ;service code /DCD title ;title of module +DCD help ;help string *DCD 0 ;help table .title EQUZ "Spaceman":ALIGN .help GEQUZ "Spaceman"+�9+�9+v$+" ("+tm$+") � 1996 Quintin Parker of GTHS" ALIGN ! ".initialise #-STMFD R13!,{R0-R12,R14} ;preserve regs $6MOV R0,#3 ;claim OS_WriteC vector %0ADR R1,vectorything ;with our routine &%MOV R2,#0 ;thing 'SWI "OS_Claim" (2MOV R0,#16 ;claim Event vector )0ADR R1,event ;with our routine *%ADR R2,shouldpressspace ;thing +SWI "OS_Claim" ,0MOV R0,#14 ;initialise event - MOV R1,#4 .SWI "OS_Byte" /.initialiseout 06LDMFD R13!,{R0-R12,PC} ;retrieve regs + return 1 2 .finalise 3-STMFD R13!,{R0-R12,R14} ;preserve regs 48MOV R0,#3 ;release OS_WriteC vector 50ADR R1,vectorything ;from our routine 6%MOV R2,#0 ;thing 7SWI "OS_Release" 84MOV R0,#16 ;release Event vector 90ADR R1,event ;from our routine :%ADR R2,shouldpressspace ;thing ;SWI "OS_Release" <6LDMFD R13!,{R0-R12,PC} ;retrieve regs + return = >.varsblock ?QDCD 0 ;+0 number of chars in `Press SPACE..' etc so far @ A.message B;EQUS "Press SPACE or click mouse to continue"+�13:ALIGN C D.vectorything E-STMFD R13!,{R0-R12,R14} ;preserve regs F6ADR R11,varsblock ;point R11 to variables G4ADR R12,message ;point R12 to message H;LDR R10,[R11,#0] ;get place in message so far I@LDRB R9,[R12,R10] ;and get the letter at that place JHTEQ R9,R0 ;is it the same as what is being printed? KIADDEQ R10,R10,#1 ;if yes, add one to letters printed so far L=MOVNE R10,#0 ;if not, reset it back to zero M)TEQNE R9,#�("P") ;if it's `P' N;MOVNE R10,#1 ;we have got one char anyway O-STR R10,[R11,#0] ;store it back P,TEQ R10,#30 ;is R10 > 30? Q>LDMNEFD R13!,{R0-R12,PC} ;if not, retrieve regs + return REMOV R10,#1 ;if yes, then set the press space flag S)STR R10,shouldpressspace ;like that T MOV R9,PC U�R R8,R9,#3 VTEQP R8,#0 W MOV R0,R0 XSTMFD R13!,{R14} Y-MOV R0,#100 ;in one second Z8ADR R1,pressspaceroutine ;call press space routine [4ADR R2,shouldpressspace ;pass address of flag \*SWI "OS_CallAfter" ;tell it to ]LDMFD R13!,{R14} ^TEQP R9,#0 _ MOV R0,R0 `8LDMFD R13!,{R0-R12,PC} ;retrieve regs + return a b.shouldpressspace c DCD 0 d e.pressspaceroutine fSTMFD R13!,{R0-R12,R14} g MOV R9,PC h�R R8,R9,#3 iTEQP R8,#0 j MOV R0,R0 kSTMFD R13!,{R14} l3LDR R0,[R12,#0] ;get state of flag m8TEQ R0,#1 ;should we press space? n2�Q R0,#153 ;if so, call *fx 153 o2�Q R1,#0 ;buffer 0 (keyboard) p&�Q R2,#32 ;a space q'SWIEQ "OS_Byte" ;do it rLDMFD R13!,{R14} sTEQP R9,#0 t MOV R0,R0 uLDMFD R13!,{R0-R12,PC} v w .event x.TEQ R0,#4 ;vsync event? y0MOVNES PC,R14 ;if not, return zSTMFD R13!,{R0-R12,R14} {9LDR R0,[R12,#0] ;is press space flag on? | TEQ R0,#1 }0LDMNEFD R13!,{R0-R12,PC} ;if not, return ~ MOV R9,PC �R R8,R9,#3 �TEQP R8,#0 � MOV R0,R0 �STMFD R13!,{R14} �9MOV R0,#121 ;*fx 121 - keyboard scan �,MOV R1,#2 � &80 ;scan for Alt �'SWI "OS_Byte" ;do it �0TEQ R1,#&FF ;is it pressed? �0�Q R0,#0 ;if so, reset flag �4MOVNE R0,#1 ;else keep flag set �<STR R0,[R12,#0] ;store status of flag again �LDMFD R13!,{R14} �TEQP R9,#0 � MOV R0,R0 �LDMFD R13!,{R0-R12,PC} � �.the_end �EQUB 10 �EQUB 10 �BEQUS "Assembled successfully on attempt number "+�(times%)+"!" �EQUB 10 �EQUB 10 �>EQUS "'Plagiarism is merely quoting verbatim' - Mr Blobby" �EQUB 10 �;EQUS "And ... anything below here is probably a virus." �] �� �: �:ș "OS_File",10,p$+"!Spaceman.!RunImage",&ffa,,code,O% �
00000000 0d 00 01 0f de 20 63 6f 64 65 20 34 30 39 36 0d |..... code 4096.| 00000010 00 02 05 3a 0d 00 03 1c ee 20 85 20 f1 20 f6 24 |...:..... . . .$| 00000020 3b 22 20 61 74 20 6c 69 6e 65 20 22 3b 9e 3a e0 |;" at line ";.:.| 00000030 0d 00 04 05 3a 0d 00 05 1b 76 24 3d 22 31 2e 30 |....:....v$="1.0| 00000040 30 22 3a 74 6d 24 3d c1 91 24 2c 35 2c 31 31 29 |0":tm$=..$,5,11)| 00000050 0d 00 06 05 3a 0d 00 07 24 70 24 3d 22 48 61 72 |....:...$p$="Har| 00000060 64 44 69 73 63 3a 44 65 76 65 6c 6f 70 65 2e 53 |dDisc:Develope.S| 00000070 70 61 63 65 6d 61 6e 2e 22 0d 00 08 05 3a 0d 00 |paceman."....:..| 00000080 09 0f de 20 74 68 69 6e 67 69 65 20 34 0d 00 0a |... thingie 4...| 00000090 29 c8 99 20 22 4f 53 5f 46 69 6c 65 22 2c 31 36 |).. "OS_File",16| 000000a0 2c 70 24 2b 22 43 6f 6d 70 69 6c 65 64 22 2c 74 |,p$+"Compiled",t| 000000b0 68 69 6e 67 69 65 0d 00 0b 13 74 69 6d 65 73 25 |hingie....times%| 000000c0 3d 21 74 68 69 6e 67 69 65 0d 00 0c 0d 74 69 6d |=!thingie....tim| 000000d0 65 73 25 2b 3d 31 0d 00 0d 13 21 74 68 69 6e 67 |es%+=1....!thing| 000000e0 69 65 3d 74 69 6d 65 73 25 0d 00 0e 39 c8 99 20 |ie=times%...9.. | 000000f0 22 4f 53 5f 46 69 6c 65 22 2c 31 30 2c 70 24 2b |"OS_File",10,p$+| 00000100 22 43 6f 6d 70 69 6c 65 64 22 2c 26 66 66 64 2c |"Compiled",&ffd,| 00000110 2c 74 68 69 6e 67 69 65 2c 74 68 69 6e 67 69 65 |,thingie,thingie| 00000120 2b 34 0d 00 0f 05 3a 0d 00 10 12 e3 20 6e 25 3d |+4....:..... n%=| 00000130 34 20 b8 20 36 20 88 20 32 0d 00 11 10 50 25 3d |4 . 6 . 2....P%=| 00000140 30 3a 4f 25 3d 63 6f 64 65 0d 00 12 0b 5b 4f 50 |0:O%=code....[OP| 00000150 54 20 6e 25 0d 00 13 2d 44 43 44 20 30 20 20 20 |T n%...-DCD 0 | 00000160 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000170 20 20 20 3b 73 74 61 72 74 20 75 70 20 63 6f 64 | ;start up cod| 00000180 65 0d 00 14 31 44 43 44 20 69 6e 69 74 69 61 6c |e...1DCD initial| 00000190 69 73 65 20 20 20 20 20 20 20 20 20 20 20 20 20 |ise | 000001a0 3b 69 6e 69 74 69 61 6c 69 73 69 6e 67 20 63 6f |;initialising co| 000001b0 64 65 0d 00 15 2f 44 43 44 20 66 69 6e 61 6c 69 |de.../DCD finali| 000001c0 73 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |se | 000001d0 20 3b 66 69 6e 61 6c 69 73 69 6e 67 20 63 6f 64 | ;finalising cod| 000001e0 65 0d 00 16 2c 44 43 44 20 30 20 20 20 20 20 20 |e...,DCD 0 | 000001f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000200 3b 73 65 72 76 69 63 65 20 63 6f 64 65 0d 00 17 |;service code...| 00000210 2f 44 43 44 20 74 69 74 6c 65 20 20 20 20 20 20 |/DCD title | 00000220 20 20 20 20 20 20 20 20 20 20 20 20 3b 74 69 74 | ;tit| 00000230 6c 65 20 6f 66 20 6d 6f 64 75 6c 65 0d 00 18 2b |le of module...+| 00000240 44 43 44 20 68 65 6c 70 20 20 20 20 20 20 20 20 |DCD help | 00000250 20 20 20 20 20 20 20 20 20 20 20 3b 68 65 6c 70 | ;help| 00000260 20 73 74 72 69 6e 67 0d 00 19 2a 44 43 44 20 30 | string...*DCD 0| 00000270 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000280 20 20 20 20 20 20 3b 68 65 6c 70 20 74 61 62 6c | ;help tabl| 00000290 65 0d 00 1a 04 0d 00 1b 0a 2e 74 69 74 6c 65 0d |e.........title.| 000002a0 00 1c 19 45 51 55 5a 20 22 53 70 61 63 65 6d 61 |...EQUZ "Spacema| 000002b0 6e 22 3a 41 4c 49 47 4e 0d 00 1d 04 0d 00 1e 09 |n":ALIGN........| 000002c0 2e 68 65 6c 70 0d 00 1f 47 45 51 55 5a 20 22 53 |.help...GEQUZ "S| 000002d0 70 61 63 65 6d 61 6e 22 2b bd 39 2b bd 39 2b 76 |paceman"+.9+.9+v| 000002e0 24 2b 22 20 28 22 2b 74 6d 24 2b 22 29 20 a9 20 |$+" ("+tm$+") . | 000002f0 31 39 39 36 20 51 75 69 6e 74 69 6e 20 50 61 72 |1996 Quintin Par| 00000300 6b 65 72 20 6f 66 20 47 54 48 53 22 0d 00 20 09 |ker of GTHS".. .| 00000310 41 4c 49 47 4e 0d 00 21 04 0d 00 22 0f 2e 69 6e |ALIGN..!..."..in| 00000320 69 74 69 61 6c 69 73 65 0d 00 23 2d 53 54 4d 46 |itialise..#-STMF| 00000330 44 20 52 31 33 21 2c 7b 52 30 2d 52 31 32 2c 52 |D R13!,{R0-R12,R| 00000340 31 34 7d 20 20 20 20 3b 70 72 65 73 65 72 76 65 |14} ;preserve| 00000350 20 72 65 67 73 0d 00 24 36 4d 4f 56 20 52 30 2c | regs..$6MOV R0,| 00000360 23 33 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |#3 | 00000370 20 20 20 20 3b 63 6c 61 69 6d 20 4f 53 5f 57 72 | ;claim OS_Wr| 00000380 69 74 65 43 20 76 65 63 74 6f 72 0d 00 25 30 41 |iteC vector..%0A| 00000390 44 52 20 52 31 2c 76 65 63 74 6f 72 79 74 68 69 |DR R1,vectorythi| 000003a0 6e 67 20 20 20 20 20 20 20 20 3b 77 69 74 68 20 |ng ;with | 000003b0 6f 75 72 20 72 6f 75 74 69 6e 65 0d 00 26 25 4d |our routine..&%M| 000003c0 4f 56 20 52 32 2c 23 30 20 20 20 20 20 20 20 20 |OV R2,#0 | 000003d0 20 20 20 20 20 20 20 20 20 20 3b 74 68 69 6e 67 | ;thing| 000003e0 0d 00 27 12 53 57 49 20 22 4f 53 5f 43 6c 61 69 |..'.SWI "OS_Clai| 000003f0 6d 22 0d 00 28 32 4d 4f 56 20 52 30 2c 23 31 36 |m"..(2MOV R0,#16| 00000400 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000410 20 3b 63 6c 61 69 6d 20 45 76 65 6e 74 20 76 65 | ;claim Event ve| 00000420 63 74 6f 72 0d 00 29 30 41 44 52 20 52 31 2c 65 |ctor..)0ADR R1,e| 00000430 76 65 6e 74 20 20 20 20 20 20 20 20 20 20 20 20 |vent | 00000440 20 20 20 3b 77 69 74 68 20 6f 75 72 20 72 6f 75 | ;with our rou| 00000450 74 69 6e 65 0d 00 2a 25 41 44 52 20 52 32 2c 73 |tine..*%ADR R2,s| 00000460 68 6f 75 6c 64 70 72 65 73 73 73 70 61 63 65 20 |houldpressspace | 00000470 20 20 20 3b 74 68 69 6e 67 0d 00 2b 12 53 57 49 | ;thing..+.SWI| 00000480 20 22 4f 53 5f 43 6c 61 69 6d 22 0d 00 2c 30 4d | "OS_Claim"..,0M| 00000490 4f 56 20 52 30 2c 23 31 34 20 20 20 20 20 20 20 |OV R0,#14 | 000004a0 20 20 20 20 20 20 20 20 20 20 3b 69 6e 69 74 69 | ;initi| 000004b0 61 6c 69 73 65 20 65 76 65 6e 74 0d 00 2d 0d 4d |alise event..-.M| 000004c0 4f 56 20 52 31 2c 23 34 0d 00 2e 11 53 57 49 20 |OV R1,#4....SWI | 000004d0 22 4f 53 5f 42 79 74 65 22 0d 00 2f 12 2e 69 6e |"OS_Byte"../..in| 000004e0 69 74 69 61 6c 69 73 65 6f 75 74 0d 00 30 36 4c |itialiseout..06L| 000004f0 44 4d 46 44 20 52 31 33 21 2c 7b 52 30 2d 52 31 |DMFD R13!,{R0-R1| 00000500 32 2c 50 43 7d 20 20 20 20 20 3b 72 65 74 72 69 |2,PC} ;retri| 00000510 65 76 65 20 72 65 67 73 20 2b 20 72 65 74 75 72 |eve regs + retur| 00000520 6e 0d 00 31 04 0d 00 32 0d 2e 66 69 6e 61 6c 69 |n..1...2..finali| 00000530 73 65 0d 00 33 2d 53 54 4d 46 44 20 52 31 33 21 |se..3-STMFD R13!| 00000540 2c 7b 52 30 2d 52 31 32 2c 52 31 34 7d 20 20 20 |,{R0-R12,R14} | 00000550 20 3b 70 72 65 73 65 72 76 65 20 72 65 67 73 0d | ;preserve regs.| 00000560 00 34 38 4d 4f 56 20 52 30 2c 23 33 20 20 20 20 |.48MOV R0,#3 | 00000570 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 72 | ;r| 00000580 65 6c 65 61 73 65 20 4f 53 5f 57 72 69 74 65 43 |elease OS_WriteC| 00000590 20 76 65 63 74 6f 72 0d 00 35 30 41 44 52 20 52 | vector..50ADR R| 000005a0 31 2c 76 65 63 74 6f 72 79 74 68 69 6e 67 20 20 |1,vectorything | 000005b0 20 20 20 20 20 20 3b 66 72 6f 6d 20 6f 75 72 20 | ;from our | 000005c0 72 6f 75 74 69 6e 65 0d 00 36 25 4d 4f 56 20 52 |routine..6%MOV R| 000005d0 32 2c 23 30 20 20 20 20 20 20 20 20 20 20 20 20 |2,#0 | 000005e0 20 20 20 20 20 20 3b 74 68 69 6e 67 0d 00 37 14 | ;thing..7.| 000005f0 53 57 49 20 22 4f 53 5f 52 65 6c 65 61 73 65 22 |SWI "OS_Release"| 00000600 0d 00 38 34 4d 4f 56 20 52 30 2c 23 31 36 20 20 |..84MOV R0,#16 | 00000610 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00000620 72 65 6c 65 61 73 65 20 45 76 65 6e 74 20 76 65 |release Event ve| 00000630 63 74 6f 72 0d 00 39 30 41 44 52 20 52 31 2c 65 |ctor..90ADR R1,e| 00000640 76 65 6e 74 20 20 20 20 20 20 20 20 20 20 20 20 |vent | 00000650 20 20 20 3b 66 72 6f 6d 20 6f 75 72 20 72 6f 75 | ;from our rou| 00000660 74 69 6e 65 0d 00 3a 25 41 44 52 20 52 32 2c 73 |tine..:%ADR R2,s| 00000670 68 6f 75 6c 64 70 72 65 73 73 73 70 61 63 65 20 |houldpressspace | 00000680 20 20 20 3b 74 68 69 6e 67 0d 00 3b 14 53 57 49 | ;thing..;.SWI| 00000690 20 22 4f 53 5f 52 65 6c 65 61 73 65 22 0d 00 3c | "OS_Release"..<| 000006a0 36 4c 44 4d 46 44 20 52 31 33 21 2c 7b 52 30 2d |6LDMFD R13!,{R0-| 000006b0 52 31 32 2c 50 43 7d 20 20 20 20 20 3b 72 65 74 |R12,PC} ;ret| 000006c0 72 69 65 76 65 20 72 65 67 73 20 2b 20 72 65 74 |rieve regs + ret| 000006d0 75 72 6e 0d 00 3d 04 0d 00 3e 0e 2e 76 61 72 73 |urn..=...>..vars| 000006e0 62 6c 6f 63 6b 0d 00 3f 51 44 43 44 20 30 20 20 |block..?QDCD 0 | 000006f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000700 20 20 20 20 3b 2b 30 20 20 6e 75 6d 62 65 72 20 | ;+0 number | 00000710 6f 66 20 63 68 61 72 73 20 69 6e 20 60 50 72 65 |of chars in `Pre| 00000720 73 73 20 53 50 41 43 45 2e 2e 27 20 65 74 63 20 |ss SPACE..' etc | 00000730 73 6f 20 66 61 72 0d 00 40 04 0d 00 41 0c 2e 6d |so far..@...A..m| 00000740 65 73 73 61 67 65 0d 00 42 3b 45 51 55 53 20 22 |essage..B;EQUS "| 00000750 50 72 65 73 73 20 53 50 41 43 45 20 6f 72 20 63 |Press SPACE or c| 00000760 6c 69 63 6b 20 6d 6f 75 73 65 20 74 6f 20 63 6f |lick mouse to co| 00000770 6e 74 69 6e 75 65 22 2b bd 31 33 3a 41 4c 49 47 |ntinue"+.13:ALIG| 00000780 4e 0d 00 43 04 0d 00 44 11 2e 76 65 63 74 6f 72 |N..C...D..vector| 00000790 79 74 68 69 6e 67 0d 00 45 2d 53 54 4d 46 44 20 |ything..E-STMFD | 000007a0 52 31 33 21 2c 7b 52 30 2d 52 31 32 2c 52 31 34 |R13!,{R0-R12,R14| 000007b0 7d 20 20 20 20 3b 70 72 65 73 65 72 76 65 20 72 |} ;preserve r| 000007c0 65 67 73 0d 00 46 36 41 44 52 20 52 31 31 2c 76 |egs..F6ADR R11,v| 000007d0 61 72 73 62 6c 6f 63 6b 20 20 20 20 20 20 20 20 |arsblock | 000007e0 20 20 3b 70 6f 69 6e 74 20 52 31 31 20 74 6f 20 | ;point R11 to | 000007f0 76 61 72 69 61 62 6c 65 73 0d 00 47 34 41 44 52 |variables..G4ADR| 00000800 20 52 31 32 2c 6d 65 73 73 61 67 65 20 20 20 20 | R12,message | 00000810 20 20 20 20 20 20 20 20 3b 70 6f 69 6e 74 20 52 | ;point R| 00000820 31 32 20 74 6f 20 6d 65 73 73 61 67 65 0d 00 48 |12 to message..H| 00000830 3b 4c 44 52 20 52 31 30 2c 5b 52 31 31 2c 23 30 |;LDR R10,[R11,#0| 00000840 5d 20 20 20 20 20 20 20 20 20 20 20 3b 67 65 74 |] ;get| 00000850 20 70 6c 61 63 65 20 69 6e 20 6d 65 73 73 61 67 | place in messag| 00000860 65 20 73 6f 20 66 61 72 0d 00 49 40 4c 44 52 42 |e so far..I@LDRB| 00000870 20 52 39 2c 5b 52 31 32 2c 52 31 30 5d 20 20 20 | R9,[R12,R10] | 00000880 20 20 20 20 20 20 20 3b 61 6e 64 20 67 65 74 20 | ;and get | 00000890 74 68 65 20 6c 65 74 74 65 72 20 61 74 20 74 68 |the letter at th| 000008a0 61 74 20 70 6c 61 63 65 0d 00 4a 48 54 45 51 20 |at place..JHTEQ | 000008b0 52 39 2c 52 30 20 20 20 20 20 20 20 20 20 20 20 |R9,R0 | 000008c0 20 20 20 20 20 20 20 3b 69 73 20 69 74 20 74 68 | ;is it th| 000008d0 65 20 73 61 6d 65 20 61 73 20 77 68 61 74 20 69 |e same as what i| 000008e0 73 20 62 65 69 6e 67 20 70 72 69 6e 74 65 64 3f |s being printed?| 000008f0 0d 00 4b 49 41 44 44 45 51 20 52 31 30 2c 52 31 |..KIADDEQ R10,R1| 00000900 30 2c 23 31 20 20 20 20 20 20 20 20 20 20 20 3b |0,#1 ;| 00000910 69 66 20 79 65 73 2c 20 61 64 64 20 6f 6e 65 20 |if yes, add one | 00000920 74 6f 20 6c 65 74 74 65 72 73 20 70 72 69 6e 74 |to letters print| 00000930 65 64 20 73 6f 20 66 61 72 0d 00 4c 3d 4d 4f 56 |ed so far..L=MOV| 00000940 4e 45 20 52 31 30 2c 23 30 20 20 20 20 20 20 20 |NE R10,#0 | 00000950 20 20 20 20 20 20 20 20 3b 69 66 20 6e 6f 74 2c | ;if not,| 00000960 20 72 65 73 65 74 20 69 74 20 62 61 63 6b 20 74 | reset it back t| 00000970 6f 20 7a 65 72 6f 0d 00 4d 29 54 45 51 4e 45 20 |o zero..M)TEQNE | 00000980 52 39 2c 23 97 28 22 50 22 29 20 20 20 20 20 20 |R9,#.("P") | 00000990 20 20 20 3b 69 66 20 69 74 27 73 20 60 50 27 0d | ;if it's `P'.| 000009a0 00 4e 3b 4d 4f 56 4e 45 20 52 31 30 2c 23 31 20 |.N;MOVNE R10,#1 | 000009b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 77 | ;w| 000009c0 65 20 68 61 76 65 20 67 6f 74 20 6f 6e 65 20 63 |e have got one c| 000009d0 68 61 72 20 61 6e 79 77 61 79 0d 00 4f 2d 53 54 |har anyway..O-ST| 000009e0 52 20 52 31 30 2c 5b 52 31 31 2c 23 30 5d 20 20 |R R10,[R11,#0] | 000009f0 20 20 20 20 20 20 20 20 20 3b 73 74 6f 72 65 20 | ;store | 00000a00 69 74 20 62 61 63 6b 0d 00 50 2c 54 45 51 20 52 |it back..P,TEQ R| 00000a10 31 30 2c 23 33 30 20 20 20 20 20 20 20 20 20 20 |10,#30 | 00000a20 20 20 20 20 20 20 3b 69 73 20 52 31 30 20 3e 20 | ;is R10 > | 00000a30 33 30 3f 0d 00 51 3e 4c 44 4d 4e 45 46 44 20 52 |30?..Q>LDMNEFD R| 00000a40 31 33 21 2c 7b 52 30 2d 52 31 32 2c 50 43 7d 20 |13!,{R0-R12,PC} | 00000a50 20 20 3b 69 66 20 6e 6f 74 2c 20 72 65 74 72 69 | ;if not, retri| 00000a60 65 76 65 20 72 65 67 73 20 2b 20 72 65 74 75 72 |eve regs + retur| 00000a70 6e 0d 00 52 45 4d 4f 56 20 52 31 30 2c 23 31 20 |n..REMOV R10,#1 | 00000a80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000a90 3b 69 66 20 79 65 73 2c 20 74 68 65 6e 20 73 65 |;if yes, then se| 00000aa0 74 20 74 68 65 20 70 72 65 73 73 20 73 70 61 63 |t the press spac| 00000ab0 65 20 66 6c 61 67 0d 00 53 29 53 54 52 20 52 31 |e flag..S)STR R1| 00000ac0 30 2c 73 68 6f 75 6c 64 70 72 65 73 73 73 70 61 |0,shouldpressspa| 00000ad0 63 65 20 20 20 3b 6c 69 6b 65 20 74 68 61 74 0d |ce ;like that.| 00000ae0 00 54 0d 4d 4f 56 20 52 39 2c 50 43 0d 00 55 0f |.T.MOV R9,PC..U.| 00000af0 84 52 20 52 38 2c 52 39 2c 23 33 0d 00 56 0e 54 |.R R8,R9,#3..V.T| 00000b00 45 51 50 20 52 38 2c 23 30 0d 00 57 0d 4d 4f 56 |EQP R8,#0..W.MOV| 00000b10 20 52 30 2c 52 30 0d 00 58 14 53 54 4d 46 44 20 | R0,R0..X.STMFD | 00000b20 52 31 33 21 2c 7b 52 31 34 7d 0d 00 59 2d 4d 4f |R13!,{R14}..Y-MO| 00000b30 56 20 52 30 2c 23 31 30 30 20 20 20 20 20 20 20 |V R0,#100 | 00000b40 20 20 20 20 20 20 20 20 20 3b 69 6e 20 6f 6e 65 | ;in one| 00000b50 20 73 65 63 6f 6e 64 0d 00 5a 38 41 44 52 20 52 | second..Z8ADR R| 00000b60 31 2c 70 72 65 73 73 73 70 61 63 65 72 6f 75 74 |1,pressspacerout| 00000b70 69 6e 65 20 20 20 3b 63 61 6c 6c 20 70 72 65 73 |ine ;call pres| 00000b80 73 20 73 70 61 63 65 20 72 6f 75 74 69 6e 65 0d |s space routine.| 00000b90 00 5b 34 41 44 52 20 52 32 2c 73 68 6f 75 6c 64 |.[4ADR R2,should| 00000ba0 70 72 65 73 73 73 70 61 63 65 20 20 20 20 3b 70 |pressspace ;p| 00000bb0 61 73 73 20 61 64 64 72 65 73 73 20 6f 66 20 66 |ass address of f| 00000bc0 6c 61 67 0d 00 5c 2a 53 57 49 20 22 4f 53 5f 43 |lag..\*SWI "OS_C| 00000bd0 61 6c 6c 41 66 74 65 72 22 20 20 20 20 20 20 20 |allAfter" | 00000be0 20 20 3b 74 65 6c 6c 20 69 74 20 74 6f 0d 00 5d | ;tell it to..]| 00000bf0 14 4c 44 4d 46 44 20 52 31 33 21 2c 7b 52 31 34 |.LDMFD R13!,{R14| 00000c00 7d 0d 00 5e 0e 54 45 51 50 20 52 39 2c 23 30 0d |}..^.TEQP R9,#0.| 00000c10 00 5f 0d 4d 4f 56 20 52 30 2c 52 30 0d 00 60 38 |._.MOV R0,R0..`8| 00000c20 4c 44 4d 46 44 20 52 31 33 21 2c 7b 52 30 2d 52 |LDMFD R13!,{R0-R| 00000c30 31 32 2c 50 43 7d 20 20 20 20 20 20 20 3b 72 65 |12,PC} ;re| 00000c40 74 72 69 65 76 65 20 72 65 67 73 20 2b 20 72 65 |trieve regs + re| 00000c50 74 75 72 6e 0d 00 61 04 0d 00 62 15 2e 73 68 6f |turn..a...b..sho| 00000c60 75 6c 64 70 72 65 73 73 73 70 61 63 65 0d 00 63 |uldpressspace..c| 00000c70 09 44 43 44 20 30 0d 00 64 04 0d 00 65 16 2e 70 |.DCD 0..d...e..p| 00000c80 72 65 73 73 73 70 61 63 65 72 6f 75 74 69 6e 65 |ressspaceroutine| 00000c90 0d 00 66 1b 53 54 4d 46 44 20 52 31 33 21 2c 7b |..f.STMFD R13!,{| 00000ca0 52 30 2d 52 31 32 2c 52 31 34 7d 0d 00 67 0d 4d |R0-R12,R14}..g.M| 00000cb0 4f 56 20 52 39 2c 50 43 0d 00 68 0f 84 52 20 52 |OV R9,PC..h..R R| 00000cc0 38 2c 52 39 2c 23 33 0d 00 69 0e 54 45 51 50 20 |8,R9,#3..i.TEQP | 00000cd0 52 38 2c 23 30 0d 00 6a 0d 4d 4f 56 20 52 30 2c |R8,#0..j.MOV R0,| 00000ce0 52 30 0d 00 6b 14 53 54 4d 46 44 20 52 31 33 21 |R0..k.STMFD R13!| 00000cf0 2c 7b 52 31 34 7d 0d 00 6c 33 4c 44 52 20 52 30 |,{R14}..l3LDR R0| 00000d00 2c 5b 52 31 32 2c 23 30 5d 20 20 20 20 20 20 20 |,[R12,#0] | 00000d10 20 20 20 20 20 20 20 3b 67 65 74 20 73 74 61 74 | ;get stat| 00000d20 65 20 6f 66 20 66 6c 61 67 0d 00 6d 38 54 45 51 |e of flag..m8TEQ| 00000d30 20 52 30 2c 23 31 20 20 20 20 20 20 20 20 20 20 | R0,#1 | 00000d40 20 20 20 20 20 20 20 20 20 20 3b 73 68 6f 75 6c | ;shoul| 00000d50 64 20 77 65 20 70 72 65 73 73 20 73 70 61 63 65 |d we press space| 00000d60 3f 0d 00 6e 32 ec 51 20 52 30 2c 23 31 35 33 20 |?..n2.Q R0,#153 | 00000d70 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00000d80 69 66 20 73 6f 2c 20 63 61 6c 6c 20 2a 66 78 20 |if so, call *fx | 00000d90 31 35 33 0d 00 6f 32 ec 51 20 52 31 2c 23 30 20 |153..o2.Q R1,#0 | 00000da0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000db0 20 3b 62 75 66 66 65 72 20 30 20 28 6b 65 79 62 | ;buffer 0 (keyb| 00000dc0 6f 61 72 64 29 0d 00 70 26 ec 51 20 52 32 2c 23 |oard)..p&.Q R2,#| 00000dd0 33 32 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |32 | 00000de0 20 20 20 3b 61 20 73 70 61 63 65 0d 00 71 27 53 | ;a space..q'S| 00000df0 57 49 45 51 20 22 4f 53 5f 42 79 74 65 22 20 20 |WIEQ "OS_Byte" | 00000e00 20 20 20 20 20 20 20 20 20 20 20 20 3b 64 6f 20 | ;do | 00000e10 69 74 0d 00 72 14 4c 44 4d 46 44 20 52 31 33 21 |it..r.LDMFD R13!| 00000e20 2c 7b 52 31 34 7d 0d 00 73 0e 54 45 51 50 20 52 |,{R14}..s.TEQP R| 00000e30 39 2c 23 30 0d 00 74 0d 4d 4f 56 20 52 30 2c 52 |9,#0..t.MOV R0,R| 00000e40 30 0d 00 75 1a 4c 44 4d 46 44 20 52 31 33 21 2c |0..u.LDMFD R13!,| 00000e50 7b 52 30 2d 52 31 32 2c 50 43 7d 0d 00 76 04 0d |{R0-R12,PC}..v..| 00000e60 00 77 0a 2e 65 76 65 6e 74 0d 00 78 2e 54 45 51 |.w..event..x.TEQ| 00000e70 20 52 30 2c 23 34 20 20 20 20 20 20 20 20 20 20 | R0,#4 | 00000e80 20 20 20 20 20 20 20 20 20 20 3b 76 73 79 6e 63 | ;vsync| 00000e90 20 65 76 65 6e 74 3f 0d 00 79 30 4d 4f 56 4e 45 | event?..y0MOVNE| 00000ea0 53 20 50 43 2c 52 31 34 20 20 20 20 20 20 20 20 |S PC,R14 | 00000eb0 20 20 20 20 20 20 20 20 3b 69 66 20 6e 6f 74 2c | ;if not,| 00000ec0 20 72 65 74 75 72 6e 0d 00 7a 1b 53 54 4d 46 44 | return..z.STMFD| 00000ed0 20 52 31 33 21 2c 7b 52 30 2d 52 31 32 2c 52 31 | R13!,{R0-R12,R1| 00000ee0 34 7d 0d 00 7b 39 4c 44 52 20 52 30 2c 5b 52 31 |4}..{9LDR R0,[R1| 00000ef0 32 2c 23 30 5d 20 20 20 20 20 20 20 20 20 20 20 |2,#0] | 00000f00 20 20 20 3b 69 73 20 70 72 65 73 73 20 73 70 61 | ;is press spa| 00000f10 63 65 20 66 6c 61 67 20 6f 6e 3f 0d 00 7c 0d 54 |ce flag on?..|.T| 00000f20 45 51 20 52 30 2c 23 31 0d 00 7d 30 4c 44 4d 4e |EQ R0,#1..}0LDMN| 00000f30 45 46 44 20 52 31 33 21 2c 7b 52 30 2d 52 31 32 |EFD R13!,{R0-R12| 00000f40 2c 50 43 7d 20 20 20 20 20 3b 69 66 20 6e 6f 74 |,PC} ;if not| 00000f50 2c 20 72 65 74 75 72 6e 0d 00 7e 0d 4d 4f 56 20 |, return..~.MOV | 00000f60 52 39 2c 50 43 0d 00 7f 0f 84 52 20 52 38 2c 52 |R9,PC.....R R8,R| 00000f70 39 2c 23 33 0d 00 80 0e 54 45 51 50 20 52 38 2c |9,#3....TEQP R8,| 00000f80 23 30 0d 00 81 0d 4d 4f 56 20 52 30 2c 52 30 0d |#0....MOV R0,R0.| 00000f90 00 82 14 53 54 4d 46 44 20 52 31 33 21 2c 7b 52 |...STMFD R13!,{R| 00000fa0 31 34 7d 0d 00 83 39 4d 4f 56 20 52 30 2c 23 31 |14}...9MOV R0,#1| 00000fb0 32 31 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |21 | 00000fc0 20 20 20 20 3b 2a 66 78 20 31 32 31 20 2d 20 6b | ;*fx 121 - k| 00000fd0 65 79 62 6f 61 72 64 20 73 63 61 6e 0d 00 84 2c |eyboard scan...,| 00000fe0 4d 4f 56 20 52 31 2c 23 32 20 82 20 26 38 30 20 |MOV R1,#2 . &80 | 00000ff0 20 20 20 20 20 20 20 20 20 20 20 3b 73 63 61 6e | ;scan| 00001000 20 66 6f 72 20 41 6c 74 0d 00 85 27 53 57 49 20 | for Alt...'SWI | 00001010 22 4f 53 5f 42 79 74 65 22 20 20 20 20 20 20 20 |"OS_Byte" | 00001020 20 20 20 20 20 20 20 20 20 3b 64 6f 20 69 74 0d | ;do it.| 00001030 00 86 30 54 45 51 20 52 31 2c 23 26 46 46 20 20 |..0TEQ R1,#&FF | 00001040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001050 3b 69 73 20 69 74 20 70 72 65 73 73 65 64 3f 0d |;is it pressed?.| 00001060 00 87 30 ec 51 20 52 30 2c 23 30 20 20 20 20 20 |..0.Q R0,#0 | 00001070 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 69 66 | ;if| 00001080 20 73 6f 2c 20 72 65 73 65 74 20 66 6c 61 67 0d | so, reset flag.| 00001090 00 88 34 4d 4f 56 4e 45 20 52 30 2c 23 31 20 20 |..4MOVNE R0,#1 | 000010a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000010b0 3b 65 6c 73 65 20 6b 65 65 70 20 66 6c 61 67 20 |;else keep flag | 000010c0 73 65 74 0d 00 89 3c 53 54 52 20 52 30 2c 5b 52 |set...<STR R0,[R| 000010d0 31 32 2c 23 30 5d 20 20 20 20 20 20 20 20 20 20 |12,#0] | 000010e0 20 20 20 20 3b 73 74 6f 72 65 20 73 74 61 74 75 | ;store statu| 000010f0 73 20 6f 66 20 66 6c 61 67 20 61 67 61 69 6e 0d |s of flag again.| 00001100 00 8a 14 4c 44 4d 46 44 20 52 31 33 21 2c 7b 52 |...LDMFD R13!,{R| 00001110 31 34 7d 0d 00 8b 0e 54 45 51 50 20 52 39 2c 23 |14}....TEQP R9,#| 00001120 30 0d 00 8c 0d 4d 4f 56 20 52 30 2c 52 30 0d 00 |0....MOV R0,R0..| 00001130 8d 1a 4c 44 4d 46 44 20 52 31 33 21 2c 7b 52 30 |..LDMFD R13!,{R0| 00001140 2d 52 31 32 2c 50 43 7d 0d 00 8e 04 0d 00 8f 0c |-R12,PC}........| 00001150 2e 74 68 65 5f 65 6e 64 0d 00 90 0b 45 51 55 42 |.the_end....EQUB| 00001160 20 31 30 0d 00 91 0b 45 51 55 42 20 31 30 0d 00 | 10....EQUB 10..| 00001170 92 42 45 51 55 53 20 22 41 73 73 65 6d 62 6c 65 |.BEQUS "Assemble| 00001180 64 20 73 75 63 63 65 73 73 66 75 6c 6c 79 20 6f |d successfully o| 00001190 6e 20 61 74 74 65 6d 70 74 20 6e 75 6d 62 65 72 |n attempt number| 000011a0 20 22 2b c3 28 74 69 6d 65 73 25 29 2b 22 21 22 | "+.(times%)+"!"| 000011b0 0d 00 93 0b 45 51 55 42 20 31 30 0d 00 94 0b 45 |....EQUB 10....E| 000011c0 51 55 42 20 31 30 0d 00 95 3e 45 51 55 53 20 22 |QUB 10...>EQUS "| 000011d0 27 50 6c 61 67 69 61 72 69 73 6d 20 69 73 20 6d |'Plagiarism is m| 000011e0 65 72 65 6c 79 20 71 75 6f 74 69 6e 67 20 76 65 |erely quoting ve| 000011f0 72 62 61 74 69 6d 27 20 2d 20 4d 72 20 42 6c 6f |rbatim' - Mr Blo| 00001200 62 62 79 22 0d 00 96 0b 45 51 55 42 20 31 30 0d |bby"....EQUB 10.| 00001210 00 97 3b 45 51 55 53 20 22 41 6e 64 20 2e 2e 2e |..;EQUS "And ...| 00001220 20 61 6e 79 74 68 69 6e 67 20 62 65 6c 6f 77 20 | anything below | 00001230 68 65 72 65 20 69 73 20 70 72 6f 62 61 62 6c 79 |here is probably| 00001240 20 61 20 76 69 72 75 73 2e 22 0d 00 98 05 5d 0d | a virus."....].| 00001250 00 99 05 ed 0d 00 9a 05 3a 0d 00 9b 3a c8 99 20 |........:...:.. | 00001260 22 4f 53 5f 46 69 6c 65 22 2c 31 30 2c 70 24 2b |"OS_File",10,p$+| 00001270 22 21 53 70 61 63 65 6d 61 6e 2e 21 52 75 6e 49 |"!Spaceman.!RunI| 00001280 6d 61 67 65 22 2c 26 66 66 61 2c 2c 63 6f 64 65 |mage",&ffa,,code| 00001290 2c 4f 25 0d ff |,O%..| 00001295