Search code examples
assemblyarmkeil

ARM IF-ELSE unexpected characters at end of line


I'm trying to do a conditional assembly:

IF {TRUE}
    ; do stuff
ELSE
    ; other stuff
ENDIF

(I'd change TRUE to FALSE to switch the branches)

But Keil is giving me error:

error: A1137E: Unexpected characters at end of line

What's the problem? Replacing {TRUE} with 1 or anything else doesn't help.

Ideally I'd have something like

X    EQU 1

IF X
    ; do stuff
ELSE
    ; other stuff
ENDIF

but that doesn't work either.


Solution

  • It's solved now. The problem was that it wants a tab BEFORE the directives.