Home » Archimedes archive » Micro User » MU 1991-05.adf » Listings » ShowRegSrc
ShowRegSrc
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 » Micro User » MU 1991-05.adf » Listings |
Filename: | ShowRegSrc |
Read OK: | ✔ |
File size: | 055A bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
10REM > <BasicSave$dir>.Source 20REM by Matthew Chilton 30REM (c) The Micro User 40: 50dir$="$" 60DIM code% &400 70FOR pass%=4 TO 6 STEP 2 80P%=0:O%=code% 90: 100[OPT pass% 110EQUD 0 ; Module won't be run 120EQUD 0 ; No initialisation 130EQUD 0 ; No finalisation 140EQUD 0 ; Module doesn't accept service calls 150EQUD title 160EQUD helpstring 170EQUD 0 180EQUD &6080 190EQUD swi_intercept 200EQUD swi_table 210EQUD 0 220.title EQUS "DebugAid"+CHR$0:ALIGN 230.helpstring EQUS "Debugging Aid"+CHR$9+"1.00 (08 Jul 1990)"+CHR$0 240ALIGN 250; 260.swi_table 270EQUS "Debug":EQUB 0 280]:FOR L%=0 TO 7 290[OPT pass% 300EQUS "ShowR"+STR$L%:EQUB 0 310]:NEXT:[OPT pass% 320EQUB 0:ALIGN 330; 340.buffer EQUD 0:EQUD 0:EQUD 0 350; 360.swi_intercept 370STMFD R13!,{R0-R10,R14} ; R14 will be corrupted when a SWI is called 380ADR R0,show ; address of first subroutine 390MOV R1,#36 ; length of one subroutine 400MUL R1,R11,R1 ; calculate offset to our subroutine 410ADD PC,R0,R1 ; jump to our subroutine 420; 430.show 440]:FOR reg=0 TO 7 450[OPT pass% 460LDMFD R13,{R0-R10,R14} 470MOV R0,reg 480ADR R1,buffer 490MOV R2,#12 500SWI "OS_ConvertHex8" 510SWI 256+ASC("&") 520SUB R1,R1,R0 530SWI "OS_WriteN" 540LDMFD R13!,{R0-R10,PC}^ 550]:NEXT 560NEXT 570: 580OSCLI"Save "+dir$+".DebugMod "+STR$~code%+" "+STR$~O% 590OSCLI"SetType "+dir$+".DebugMod Module" 600OSCLI"Run "+dir$+".DebugMod"
� > <BasicSave$dir>.Source � by Matthew Chilton � (c) The Micro User (: 2dir$="$" <� code% &400 F� pass%=4 � 6 � 2 PP%=0:O%=code% Z: d[OPT pass% n EQUD 0 ; Module won't be run xEQUD 0 ; No initialisation �EQUD 0 ; No finalisation �0EQUD 0 ; Module doesn't accept service calls �EQUD title �EQUD helpstring � EQUD 0 �EQUD &6080 �EQUD swi_intercept �EQUD swi_table � EQUD 0 �#.title EQUS "DebugAid"+�0:ALIGN �?.helpstring EQUS "Debugging Aid"+�9+"1.00 (08 Jul 1990)"+�0 � ALIGN �; .swi_table EQUS "Debug":EQUB 0 ]:� L%=0 � 7 "[OPT pass% ,EQUS "ShowR"+�L%:EQUB 0 6]:�:[OPT pass% @EQUB 0:ALIGN J; T .buffer EQUD 0:EQUD 0:EQUD 0 ^; h.swi_intercept rISTMFD R13!,{R0-R10,R14} ; R14 will be corrupted when a SWI is called |:ADR R0,show ; address of first subroutine �7MOV R1,#36 ; length of one subroutine �AMUL R1,R11,R1 ; calculate offset to our subroutine �5ADD PC,R0,R1 ; jump to our subroutine �; � .show �]:� reg=0 � 7 �[OPT pass% �LDMFD R13,{R0-R10,R14} �MOV R0,reg �ADR R1,buffer �MOV R2,#12 �SWI "OS_ConvertHex8" �SWI 256+�("&") SUB R1,R1,R0 SWI "OS_WriteN" LDMFD R13!,{R0-R10,PC}^ &]:� 0� :: D/�"Save "+dir$+".DebugMod "+�~code%+" "+�~O% N'�"SetType "+dir$+".DebugMod Module" X�"Run "+dir$+".DebugMod" �
00000000 0d 00 0a 1e f4 20 3e 20 3c 42 61 73 69 63 53 61 |..... > <BasicSa| 00000010 76 65 24 64 69 72 3e 2e 53 6f 75 72 63 65 0d 00 |ve$dir>.Source..| 00000020 14 18 f4 20 62 79 20 4d 61 74 74 68 65 77 20 43 |... by Matthew C| 00000030 68 69 6c 74 6f 6e 0d 00 1e 18 f4 20 28 63 29 20 |hilton..... (c) | 00000040 54 68 65 20 4d 69 63 72 6f 20 55 73 65 72 0d 00 |The Micro User..| 00000050 28 05 3a 0d 00 32 0c 64 69 72 24 3d 22 24 22 0d |(.:..2.dir$="$".| 00000060 00 3c 10 de 20 63 6f 64 65 25 20 26 34 30 30 0d |.<.. code% &400.| 00000070 00 46 15 e3 20 70 61 73 73 25 3d 34 20 b8 20 36 |.F.. pass%=4 . 6| 00000080 20 88 20 32 0d 00 50 11 50 25 3d 30 3a 4f 25 3d | . 2..P.P%=0:O%=| 00000090 63 6f 64 65 25 0d 00 5a 05 3a 0d 00 64 0e 5b 4f |code%..Z.:..d.[O| 000000a0 50 54 20 70 61 73 73 25 0d 00 6e 20 45 51 55 44 |PT pass%..n EQUD| 000000b0 20 30 20 3b 20 4d 6f 64 75 6c 65 20 77 6f 6e 27 | 0 ; Module won'| 000000c0 74 20 62 65 20 72 75 6e 0d 00 78 1e 45 51 55 44 |t be run..x.EQUD| 000000d0 20 30 20 3b 20 4e 6f 20 69 6e 69 74 69 61 6c 69 | 0 ; No initiali| 000000e0 73 61 74 69 6f 6e 0d 00 82 1c 45 51 55 44 20 30 |sation....EQUD 0| 000000f0 20 3b 20 4e 6f 20 66 69 6e 61 6c 69 73 61 74 69 | ; No finalisati| 00000100 6f 6e 0d 00 8c 30 45 51 55 44 20 30 20 3b 20 4d |on...0EQUD 0 ; M| 00000110 6f 64 75 6c 65 20 64 6f 65 73 6e 27 74 20 61 63 |odule doesn't ac| 00000120 63 65 70 74 20 73 65 72 76 69 63 65 20 63 61 6c |cept service cal| 00000130 6c 73 0d 00 96 0e 45 51 55 44 20 74 69 74 6c 65 |ls....EQUD title| 00000140 0d 00 a0 13 45 51 55 44 20 68 65 6c 70 73 74 72 |....EQUD helpstr| 00000150 69 6e 67 0d 00 aa 0a 45 51 55 44 20 30 0d 00 b4 |ing....EQUD 0...| 00000160 0e 45 51 55 44 20 26 36 30 38 30 0d 00 be 16 45 |.EQUD &6080....E| 00000170 51 55 44 20 73 77 69 5f 69 6e 74 65 72 63 65 70 |QUD swi_intercep| 00000180 74 0d 00 c8 12 45 51 55 44 20 73 77 69 5f 74 61 |t....EQUD swi_ta| 00000190 62 6c 65 0d 00 d2 0a 45 51 55 44 20 30 0d 00 dc |ble....EQUD 0...| 000001a0 23 2e 74 69 74 6c 65 20 45 51 55 53 20 22 44 65 |#.title EQUS "De| 000001b0 62 75 67 41 69 64 22 2b bd 30 3a 41 4c 49 47 4e |bugAid"+.0:ALIGN| 000001c0 0d 00 e6 3f 2e 68 65 6c 70 73 74 72 69 6e 67 20 |...?.helpstring | 000001d0 45 51 55 53 20 22 44 65 62 75 67 67 69 6e 67 20 |EQUS "Debugging | 000001e0 41 69 64 22 2b bd 39 2b 22 31 2e 30 30 20 28 30 |Aid"+.9+"1.00 (0| 000001f0 38 20 4a 75 6c 20 31 39 39 30 29 22 2b bd 30 0d |8 Jul 1990)"+.0.| 00000200 00 f0 09 41 4c 49 47 4e 0d 00 fa 05 3b 0d 01 04 |...ALIGN....;...| 00000210 0e 2e 73 77 69 5f 74 61 62 6c 65 0d 01 0e 17 45 |..swi_table....E| 00000220 51 55 53 20 22 44 65 62 75 67 22 3a 45 51 55 42 |QUS "Debug":EQUB| 00000230 20 30 0d 01 18 10 5d 3a e3 20 4c 25 3d 30 20 b8 | 0....]:. L%=0 .| 00000240 20 37 0d 01 22 0e 5b 4f 50 54 20 70 61 73 73 25 | 7..".[OPT pass%| 00000250 0d 01 2c 1b 45 51 55 53 20 22 53 68 6f 77 52 22 |..,.EQUS "ShowR"| 00000260 2b c3 4c 25 3a 45 51 55 42 20 30 0d 01 36 12 5d |+.L%:EQUB 0..6.]| 00000270 3a ed 3a 5b 4f 50 54 20 70 61 73 73 25 0d 01 40 |:.:[OPT pass%..@| 00000280 10 45 51 55 42 20 30 3a 41 4c 49 47 4e 0d 01 4a |.EQUB 0:ALIGN..J| 00000290 05 3b 0d 01 54 20 2e 62 75 66 66 65 72 20 45 51 |.;..T .buffer EQ| 000002a0 55 44 20 30 3a 45 51 55 44 20 30 3a 45 51 55 44 |UD 0:EQUD 0:EQUD| 000002b0 20 30 0d 01 5e 05 3b 0d 01 68 12 2e 73 77 69 5f | 0..^.;..h..swi_| 000002c0 69 6e 74 65 72 63 65 70 74 0d 01 72 49 53 54 4d |intercept..rISTM| 000002d0 46 44 20 52 31 33 21 2c 7b 52 30 2d 52 31 30 2c |FD R13!,{R0-R10,| 000002e0 52 31 34 7d 20 20 3b 20 52 31 34 20 77 69 6c 6c |R14} ; R14 will| 000002f0 20 62 65 20 63 6f 72 72 75 70 74 65 64 20 77 68 | be corrupted wh| 00000300 65 6e 20 61 20 53 57 49 20 69 73 20 63 61 6c 6c |en a SWI is call| 00000310 65 64 0d 01 7c 3a 41 44 52 20 52 30 2c 73 68 6f |ed..|:ADR R0,sho| 00000320 77 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3b |w ;| 00000330 20 61 64 64 72 65 73 73 20 6f 66 20 66 69 72 73 | address of firs| 00000340 74 20 73 75 62 72 6f 75 74 69 6e 65 0d 01 86 37 |t subroutine...7| 00000350 4d 4f 56 20 52 31 2c 23 33 36 20 20 20 20 20 20 |MOV R1,#36 | 00000360 20 20 20 20 20 20 20 20 20 3b 20 6c 65 6e 67 74 | ; lengt| 00000370 68 20 6f 66 20 6f 6e 65 20 73 75 62 72 6f 75 74 |h of one subrout| 00000380 69 6e 65 0d 01 90 41 4d 55 4c 20 52 31 2c 52 31 |ine...AMUL R1,R1| 00000390 31 2c 52 31 20 20 20 20 20 20 20 20 20 20 20 20 |1,R1 | 000003a0 3b 20 63 61 6c 63 75 6c 61 74 65 20 6f 66 66 73 |; calculate offs| 000003b0 65 74 20 74 6f 20 6f 75 72 20 73 75 62 72 6f 75 |et to our subrou| 000003c0 74 69 6e 65 0d 01 9a 35 41 44 44 20 50 43 2c 52 |tine...5ADD PC,R| 000003d0 30 2c 52 31 20 20 20 20 20 20 20 20 20 20 20 20 |0,R1 | 000003e0 20 3b 20 6a 75 6d 70 20 74 6f 20 6f 75 72 20 73 | ; jump to our s| 000003f0 75 62 72 6f 75 74 69 6e 65 0d 01 a4 05 3b 0d 01 |ubroutine....;..| 00000400 ae 09 2e 73 68 6f 77 0d 01 b8 11 5d 3a e3 20 72 |...show....]:. r| 00000410 65 67 3d 30 20 b8 20 37 0d 01 c2 0e 5b 4f 50 54 |eg=0 . 7....[OPT| 00000420 20 70 61 73 73 25 0d 01 cc 1a 4c 44 4d 46 44 20 | pass%....LDMFD | 00000430 52 31 33 2c 7b 52 30 2d 52 31 30 2c 52 31 34 7d |R13,{R0-R10,R14}| 00000440 0d 01 d6 0e 4d 4f 56 20 52 30 2c 72 65 67 0d 01 |....MOV R0,reg..| 00000450 e0 11 41 44 52 20 52 31 2c 62 75 66 66 65 72 0d |..ADR R1,buffer.| 00000460 01 ea 0e 4d 4f 56 20 52 32 2c 23 31 32 0d 01 f4 |...MOV R2,#12...| 00000470 18 53 57 49 20 22 4f 53 5f 43 6f 6e 76 65 72 74 |.SWI "OS_Convert| 00000480 48 65 78 38 22 0d 01 fe 12 53 57 49 20 32 35 36 |Hex8"....SWI 256| 00000490 2b 97 28 22 26 22 29 0d 02 08 10 53 55 42 20 52 |+.("&")....SUB R| 000004a0 31 2c 52 31 2c 52 30 0d 02 12 13 53 57 49 20 22 |1,R1,R0....SWI "| 000004b0 4f 53 5f 57 72 69 74 65 4e 22 0d 02 1c 1b 4c 44 |OS_WriteN"....LD| 000004c0 4d 46 44 20 52 31 33 21 2c 7b 52 30 2d 52 31 30 |MFD R13!,{R0-R10| 000004d0 2c 50 43 7d 5e 0d 02 26 07 5d 3a ed 0d 02 30 05 |,PC}^..&.]:...0.| 000004e0 ed 0d 02 3a 05 3a 0d 02 44 2f ff 22 53 61 76 65 |...:.:..D/."Save| 000004f0 20 22 2b 64 69 72 24 2b 22 2e 44 65 62 75 67 4d | "+dir$+".DebugM| 00000500 6f 64 20 22 2b c3 7e 63 6f 64 65 25 2b 22 20 22 |od "+.~code%+" "| 00000510 2b c3 7e 4f 25 0d 02 4e 27 ff 22 53 65 74 54 79 |+.~O%..N'."SetTy| 00000520 70 65 20 22 2b 64 69 72 24 2b 22 2e 44 65 62 75 |pe "+dir$+".Debu| 00000530 67 4d 6f 64 20 4d 6f 64 75 6c 65 22 0d 02 58 1c |gMod Module"..X.| 00000540 ff 22 52 75 6e 20 22 2b 64 69 72 24 2b 22 2e 44 |."Run "+dir$+".D| 00000550 65 62 75 67 4d 6f 64 22 0d ff |ebugMod"..| 0000055a