Home » Archimedes archive » Acorn User » AU 1994-06.adf » !StarInfo_StarInfo » NCW/TestProg

NCW/TestProg

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 1994-06.adf » !StarInfo_StarInfo
Filename: NCW/TestProg
Read OK:
File size: 017E bytes
Load address: 0000
Exec address: 0000
File contents
		GET	@.Regs
		GET	@.LocalLabel

		MACRO
$label		test	$value
$label		MacroLabels

exit$l		MOV	r0,#$value
		[	$value > 0
			test	$value - 1
		]
		B	exit$l

		MLEND
		MEND

jim		LocalLabels
exit$l		test	2
		B	exit$l
$l.test		MOV	R0,R0
		B	$l.test
		MOVS	pc,lr

fred		LocalLabels
exit$l		test	5
		B	exit$l
		MOVS	pc,lr

jane		LocalLabels
exit$l
		test	3
		B	exit$l
		MOVS	pc,lr

		END
00000000  09 09 47 45 54 09 40 2e  52 65 67 73 0a 09 09 47  |..GET.@.Regs...G|
00000010  45 54 09 40 2e 4c 6f 63  61 6c 4c 61 62 65 6c 0a  |ET.@.LocalLabel.|
00000020  0a 09 09 4d 41 43 52 4f  0a 24 6c 61 62 65 6c 09  |...MACRO.$label.|
00000030  09 74 65 73 74 09 24 76  61 6c 75 65 0a 24 6c 61  |.test.$value.$la|
00000040  62 65 6c 09 09 4d 61 63  72 6f 4c 61 62 65 6c 73  |bel..MacroLabels|
00000050  0a 0a 65 78 69 74 24 6c  09 09 4d 4f 56 09 72 30  |..exit$l..MOV.r0|
00000060  2c 23 24 76 61 6c 75 65  0a 09 09 5b 09 24 76 61  |,#$value...[.$va|
00000070  6c 75 65 20 3e 20 30 0a  09 09 09 74 65 73 74 09  |lue > 0....test.|
00000080  24 76 61 6c 75 65 20 2d  20 31 0a 09 09 5d 0a 09  |$value - 1...]..|
00000090  09 42 09 65 78 69 74 24  6c 0a 0a 09 09 4d 4c 45  |.B.exit$l....MLE|
000000a0  4e 44 0a 09 09 4d 45 4e  44 0a 0a 6a 69 6d 09 09  |ND...MEND..jim..|
000000b0  4c 6f 63 61 6c 4c 61 62  65 6c 73 0a 65 78 69 74  |LocalLabels.exit|
000000c0  24 6c 09 09 74 65 73 74  09 32 0a 09 09 42 09 65  |$l..test.2...B.e|
000000d0  78 69 74 24 6c 0a 24 6c  2e 74 65 73 74 09 09 4d  |xit$l.$l.test..M|
000000e0  4f 56 09 52 30 2c 52 30  0a 09 09 42 09 24 6c 2e  |OV.R0,R0...B.$l.|
000000f0  74 65 73 74 0a 09 09 4d  4f 56 53 09 70 63 2c 6c  |test...MOVS.pc,l|
00000100  72 0a 0a 66 72 65 64 09  09 4c 6f 63 61 6c 4c 61  |r..fred..LocalLa|
00000110  62 65 6c 73 0a 65 78 69  74 24 6c 09 09 74 65 73  |bels.exit$l..tes|
00000120  74 09 35 0a 09 09 42 09  65 78 69 74 24 6c 0a 09  |t.5...B.exit$l..|
00000130  09 4d 4f 56 53 09 70 63  2c 6c 72 0a 0a 6a 61 6e  |.MOVS.pc,lr..jan|
00000140  65 09 09 4c 6f 63 61 6c  4c 61 62 65 6c 73 0a 65  |e..LocalLabels.e|
00000150  78 69 74 24 6c 0a 09 09  74 65 73 74 09 33 0a 09  |xit$l...test.3..|
00000160  09 42 09 65 78 69 74 24  6c 0a 09 09 4d 4f 56 53  |.B.exit$l...MOVS|
00000170  09 70 63 2c 6c 72 0a 0a  09 09 45 4e 44 0a        |.pc,lr....END.|
0000017e