nasm/test/insnlbl.asm
H. Peter Anvin 9c98769a33 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.
2007-11-04 21:10:42 -08:00

10 lines
190 B
NASM

;
; 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