mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-30 16:41:05 +08:00
9c98769a33
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.
11 lines
190 B
NASM
11 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
|