JetBrains-NASM-Language icon indicating copy to clipboard operation
JetBrains-NASM-Language copied to clipboard

Local labels are also valid for EQU declaration

Open Farzy opened this issue 5 years ago • 3 comments

Hi,

Using a sample "Hello, world" ASM code I found on Internet, I discovered that using a local label, ".len", on a "EQU" statement seems to be valid. The following code compiles with NASM 2.15.05 and works:

Capture d’écran 2020-08-28 à 18 25 08

Your plugin flags it as invalid. Is it something you can change?

Regards

Farzy avatar Aug 28 '20 16:08 Farzy

Yeah this is a known problem with the lexer, for a quick workaround just add a colon (:) at the end of .len like so:

.len: equ $-message

ajkhoury avatar Aug 28 '20 20:08 ajkhoury

You mean a colon? I already tried before opening this ticket, it only moved the error on equ :)

Capture d’écran 2020-08-28 à 22 18 50

Farzy avatar Aug 28 '20 20:08 Farzy

Yeah I meant a colon haha! I'll try to find some spare time to tinker with the lex later today.

ajkhoury avatar Aug 30 '20 14:08 ajkhoury