Home » Archimedes archive » Acorn User » AU 1996-Xmas.adf » Regulars » StarInfo/Fletcher/Source
StarInfo/Fletcher/Source
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 1996-Xmas.adf » Regulars |
Filename: | StarInfo/Fletcher/Source |
Read OK: | ✔ |
File size: | 078E bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
App NewRMTidy In - Out RMTidy Type Utility Ver 1.00e .start STMFD (sp)!,{r0-r7,link} ; Stack registers MOV r6,#0 ; 0 if no errors, 1 if errors MOV r5,#&7d0 ; this probably won't work on a RPC $loop MOV r7,r5 ; r7 = old pointer LDR r5,[r5] ; get pointer to next module CMP r5,#0 ; end of list ? BEQ $exit ; if so, exit LDR r1,[r5,#12] ; read the workspace pointer CMP r1,#0 ; is it 0 (DEAD) ? BNE $next ; if not, ignore it LDR r1,[r5,#4] ; offset to module base LDR r2,[r1,#16] ; offset within module of name ADD r4,r2,r1 ; r4-> name REM "Module %$4 is dead, kill it ?" SWI "XOS_Confirm" ; ask the user nicely BVS $exit ; if error, exit gracefully CMP r0,#ASC("y") ; did they say yes ? MOVNE r6,#1 ; mark as unfixed if not BNE $next ; if not, get the next LDR r1,[r5] ; read the next module pointer STR r1,[r7] ; store at the old pointer B $loop ; and look at the next module $next B $loop $exit MOVVS r6,#1 ; if there was an error, mark it CMP r6,#0 ; was there an error ? BEQ $noerrors ; if not, tell the user REM "Module area was not fixed" B $realexit ; and exit safely $noerrors REM "Module area is stable" $realexit LDMFD (sp)!,{r0-r7,pc}^ ; Return from call
00000000 41 70 70 20 20 4e 65 77 52 4d 54 69 64 79 0a 49 |App NewRMTidy.I| 00000010 6e 20 20 20 2d 0a 4f 75 74 20 20 52 4d 54 69 64 |n -.Out RMTid| 00000020 79 0a 54 79 70 65 20 55 74 69 6c 69 74 79 0a 56 |y.Type Utility.V| 00000030 65 72 20 20 31 2e 30 30 65 0a 0a 2e 73 74 61 72 |er 1.00e...star| 00000040 74 0a 20 20 20 53 54 4d 46 44 20 20 20 28 73 70 |t. STMFD (sp| 00000050 29 21 2c 7b 72 30 2d 72 37 2c 6c 69 6e 6b 7d 20 |)!,{r0-r7,link} | 00000060 20 20 20 20 20 20 20 20 20 20 20 3b 20 53 74 61 | ; Sta| 00000070 63 6b 20 72 65 67 69 73 74 65 72 73 0a 20 20 20 |ck registers. | 00000080 4d 4f 56 20 20 20 20 20 72 36 2c 23 30 20 20 20 |MOV r6,#0 | 00000090 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000000a0 20 20 20 20 20 20 3b 20 30 20 69 66 20 6e 6f 20 | ; 0 if no | 000000b0 65 72 72 6f 72 73 2c 20 31 20 69 66 20 65 72 72 |errors, 1 if err| 000000c0 6f 72 73 0a 20 20 20 4d 4f 56 20 20 20 20 20 72 |ors. MOV r| 000000d0 35 2c 23 26 37 64 30 20 20 20 20 20 20 20 20 20 |5,#&7d0 | 000000e0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 74 | ; t| 000000f0 68 69 73 20 70 72 6f 62 61 62 6c 79 20 77 6f 6e |his probably won| 00000100 27 74 20 77 6f 72 6b 20 6f 6e 20 61 20 52 50 43 |'t work on a RPC| 00000110 0a 0a 24 6c 6f 6f 70 0a 20 20 20 4d 4f 56 20 20 |..$loop. MOV | 00000120 20 20 20 72 37 2c 72 35 20 20 20 20 20 20 20 20 | r7,r5 | 00000130 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000140 20 3b 20 72 37 20 3d 20 6f 6c 64 20 70 6f 69 6e | ; r7 = old poin| 00000150 74 65 72 0a 20 20 20 4c 44 52 20 20 20 20 20 72 |ter. LDR r| 00000160 35 2c 5b 72 35 5d 20 20 20 20 20 20 20 20 20 20 |5,[r5] | 00000170 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 67 | ; g| 00000180 65 74 20 70 6f 69 6e 74 65 72 20 74 6f 20 6e 65 |et pointer to ne| 00000190 78 74 20 6d 6f 64 75 6c 65 0a 20 20 20 43 4d 50 |xt module. CMP| 000001a0 20 20 20 20 20 72 35 2c 23 30 20 20 20 20 20 20 | r5,#0 | 000001b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000001c0 20 20 20 3b 20 65 6e 64 20 6f 66 20 6c 69 73 74 | ; end of list| 000001d0 20 3f 0a 20 20 20 42 45 51 20 20 20 20 20 24 65 | ?. BEQ $e| 000001e0 78 69 74 20 20 20 20 20 20 20 20 20 20 20 20 20 |xit | 000001f0 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 | ; if| 00000200 20 73 6f 2c 20 65 78 69 74 0a 20 20 20 4c 44 52 | so, exit. LDR| 00000210 20 20 20 20 20 72 31 2c 5b 72 35 2c 23 31 32 5d | r1,[r5,#12]| 00000220 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000230 20 20 20 3b 20 72 65 61 64 20 74 68 65 20 77 6f | ; read the wo| 00000240 72 6b 73 70 61 63 65 20 70 6f 69 6e 74 65 72 0a |rkspace pointer.| 00000250 20 20 20 43 4d 50 20 20 20 20 20 72 31 2c 23 30 | CMP r1,#0| 00000260 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000270 20 20 20 20 20 20 20 20 20 3b 20 69 73 20 69 74 | ; is it| 00000280 20 30 20 28 44 45 41 44 29 20 3f 0a 20 20 20 42 | 0 (DEAD) ?. B| 00000290 4e 45 20 20 20 20 20 24 6e 65 78 74 20 20 20 20 |NE $next | 000002a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000002b0 20 20 20 20 20 3b 20 69 66 20 6e 6f 74 2c 20 69 | ; if not, i| 000002c0 67 6e 6f 72 65 20 69 74 0a 0a 20 20 20 4c 44 52 |gnore it.. LDR| 000002d0 20 20 20 20 20 72 31 2c 5b 72 35 2c 23 34 5d 20 | r1,[r5,#4] | 000002e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000002f0 20 20 20 3b 20 6f 66 66 73 65 74 20 74 6f 20 6d | ; offset to m| 00000300 6f 64 75 6c 65 20 62 61 73 65 0a 20 20 20 4c 44 |odule base. LD| 00000310 52 20 20 20 20 20 72 32 2c 5b 72 31 2c 23 31 36 |R r2,[r1,#16| 00000320 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |] | 00000330 20 20 20 20 3b 20 6f 66 66 73 65 74 20 77 69 74 | ; offset wit| 00000340 68 69 6e 20 6d 6f 64 75 6c 65 20 6f 66 20 6e 61 |hin module of na| 00000350 6d 65 0a 20 20 20 41 44 44 20 20 20 20 20 72 34 |me. ADD r4| 00000360 2c 72 32 2c 72 31 20 20 20 20 20 20 20 20 20 20 |,r2,r1 | 00000370 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 72 34 | ; r4| 00000380 2d 3e 20 6e 61 6d 65 0a 0a 20 20 20 52 45 4d 20 |-> name.. REM | 00000390 20 20 20 20 22 4d 6f 64 75 6c 65 20 25 24 34 20 | "Module %$4 | 000003a0 69 73 20 64 65 61 64 2c 20 6b 69 6c 6c 20 69 74 |is dead, kill it| 000003b0 20 3f 22 0a 20 20 20 53 57 49 20 20 20 20 20 22 | ?". SWI "| 000003c0 58 4f 53 5f 43 6f 6e 66 69 72 6d 22 20 20 20 20 |XOS_Confirm" | 000003d0 20 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 61 | ; a| 000003e0 73 6b 20 74 68 65 20 75 73 65 72 20 6e 69 63 65 |sk the user nice| 000003f0 6c 79 0a 20 20 20 42 56 53 20 20 20 20 20 24 65 |ly. BVS $e| 00000400 78 69 74 20 20 20 20 20 20 20 20 20 20 20 20 20 |xit | 00000410 20 20 20 20 20 20 20 20 20 20 20 20 3b 20 69 66 | ; if| 00000420 20 65 72 72 6f 72 2c 20 65 78 69 74 20 67 72 61 | error, exit gra| 00000430 63 65 66 75 6c 6c 79 0a 20 20 20 43 4d 50 20 20 |cefully. CMP | 00000440 20 20 20 72 30 2c 23 41 53 43 28 22 79 22 29 20 | r0,#ASC("y") | 00000450 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000460 20 3b 20 64 69 64 20 74 68 65 79 20 73 61 79 20 | ; did they say | 00000470 79 65 73 20 3f 0a 20 20 20 4d 4f 56 4e 45 20 20 |yes ?. MOVNE | 00000480 20 72 36 2c 23 31 20 20 20 20 20 20 20 20 20 20 | r6,#1 | 00000490 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000004a0 20 6d 61 72 6b 20 61 73 20 75 6e 66 69 78 65 64 | mark as unfixed| 000004b0 20 69 66 20 6e 6f 74 0a 20 20 20 42 4e 45 20 20 | if not. BNE | 000004c0 20 20 20 24 6e 65 78 74 20 20 20 20 20 20 20 20 | $next | 000004d0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000004e0 20 3b 20 69 66 20 6e 6f 74 2c 20 67 65 74 20 74 | ; if not, get t| 000004f0 68 65 20 6e 65 78 74 0a 0a 20 20 20 4c 44 52 20 |he next.. LDR | 00000500 20 20 20 20 72 31 2c 5b 72 35 5d 20 20 20 20 20 | r1,[r5] | 00000510 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000520 20 20 3b 20 72 65 61 64 20 74 68 65 20 6e 65 78 | ; read the nex| 00000530 74 20 6d 6f 64 75 6c 65 20 70 6f 69 6e 74 65 72 |t module pointer| 00000540 0a 20 20 20 53 54 52 20 20 20 20 20 72 31 2c 5b |. STR r1,[| 00000550 72 37 5d 20 20 20 20 20 20 20 20 20 20 20 20 20 |r7] | 00000560 20 20 20 20 20 20 20 20 20 20 3b 20 73 74 6f 72 | ; stor| 00000570 65 20 61 74 20 74 68 65 20 6f 6c 64 20 70 6f 69 |e at the old poi| 00000580 6e 74 65 72 0a 0a 20 20 20 42 20 20 20 20 20 20 |nter.. B | 00000590 20 24 6c 6f 6f 70 20 20 20 20 20 20 20 20 20 20 | $loop | 000005a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000005b0 20 61 6e 64 20 6c 6f 6f 6b 20 61 74 20 74 68 65 | and look at the| 000005c0 20 6e 65 78 74 20 6d 6f 64 75 6c 65 0a 0a 24 6e | next module..$n| 000005d0 65 78 74 0a 20 20 20 42 20 20 20 20 20 20 20 24 |ext. B $| 000005e0 6c 6f 6f 70 0a 0a 24 65 78 69 74 0a 20 20 20 4d |loop..$exit. M| 000005f0 4f 56 56 53 20 20 20 72 36 2c 23 31 20 20 20 20 |OVVS r6,#1 | 00000600 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00000610 20 20 20 20 20 3b 20 69 66 20 74 68 65 72 65 20 | ; if there | 00000620 77 61 73 20 61 6e 20 65 72 72 6f 72 2c 20 6d 61 |was an error, ma| 00000630 72 6b 20 69 74 0a 20 20 20 43 4d 50 20 20 20 20 |rk it. CMP | 00000640 20 72 36 2c 23 30 20 20 20 20 20 20 20 20 20 20 | r6,#0 | 00000650 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 00000660 20 77 61 73 20 74 68 65 72 65 20 61 6e 20 65 72 | was there an er| 00000670 72 6f 72 20 3f 0a 20 20 20 42 45 51 20 20 20 20 |ror ?. BEQ | 00000680 20 24 6e 6f 65 72 72 6f 72 73 20 20 20 20 20 20 | $noerrors | 00000690 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b | ;| 000006a0 20 69 66 20 6e 6f 74 2c 20 74 65 6c 6c 20 74 68 | if not, tell th| 000006b0 65 20 75 73 65 72 0a 20 20 20 52 45 4d 20 20 20 |e user. REM | 000006c0 20 20 22 4d 6f 64 75 6c 65 20 61 72 65 61 20 77 | "Module area w| 000006d0 61 73 20 6e 6f 74 20 66 69 78 65 64 22 0a 20 20 |as not fixed". | 000006e0 20 42 20 20 20 20 20 20 20 24 72 65 61 6c 65 78 | B $realex| 000006f0 69 74 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |it | 00000700 20 20 20 20 20 20 20 3b 20 61 6e 64 20 65 78 69 | ; and exi| 00000710 74 20 73 61 66 65 6c 79 0a 0a 24 6e 6f 65 72 72 |t safely..$noerr| 00000720 6f 72 73 0a 20 20 20 52 45 4d 20 20 20 20 20 22 |ors. REM "| 00000730 4d 6f 64 75 6c 65 20 61 72 65 61 20 69 73 20 73 |Module area is s| 00000740 74 61 62 6c 65 22 0a 0a 24 72 65 61 6c 65 78 69 |table"..$realexi| 00000750 74 0a 20 20 20 4c 44 4d 46 44 20 20 20 28 73 70 |t. LDMFD (sp| 00000760 29 21 2c 7b 72 30 2d 72 37 2c 70 63 7d 5e 20 20 |)!,{r0-r7,pc}^ | 00000770 20 20 20 20 20 20 20 20 20 20 20 3b 20 52 65 74 | ; Ret| 00000780 75 72 6e 20 66 72 6f 6d 20 63 61 6c 6c 0a |urn from call.| 0000078e