diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-11-04 21:09:32 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-11-04 21:10:42 -0800 |
commit | 9c98769a33c4e8e9acbdce9dde602d8fdaca0e9e (patch) | |
tree | ea3fa08e77df945d68f9bd94c264ade8349b5d84 /test/insnlbl.asm | |
parent | dd462c8f44ba1256d98b4bc1868c52be79ac5acc (diff) | |
download | nasm-9c98769a33c4e8e9acbdce9dde602d8fdaca0e9e.tar.gz |
Permit opcode names as labels as long as they are followed by a colon
Permit opcode names to be used as labels if and only if they are
succeeded by a colon. Opcode names occurring when parsing expressions
are all treated as labels; a leading colon occurred when parsing an
instruction forces a parser restart with the instruction forcibly
treated as an identifier.
Diffstat (limited to 'test/insnlbl.asm')
-rw-r--r-- | test/insnlbl.asm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/insnlbl.asm b/test/insnlbl.asm new file mode 100644 index 00000000..5c163846 --- /dev/null +++ b/test/insnlbl.asm @@ -0,0 +1,10 @@ +; +; Test "instruction as label" -- make opcodes legal as labels if +; they are followed by a colon. +; + +do: jmp incbin+2 + dw do, add, sub, incbin +add: jmp add-2 +sub: jmp do+2 +incbin: dw $-sub |