You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the equ directive contains a forward reference to another equ symbol, the assembler generates invalid machine code. But worse, the assembler does not print any warning messages, and returns a 0 status code (at least on the Linux version) which incorrectly tells the OS that the command succeeded.
Similarly, an equate that contains a reference to an undefined symbol (caused by a simple typo) produces the same result. This can result in many hours of debugging fun.
Example
The helloflash.asm flash app below will generate an invalid machine code for ld hl, helloRowCol because the helloRowCol equate contains a forward reference to helloRow and helloCol.
21 00:4083 21 80 40 - ld hl, helloRowCol
instead of the correct:
21 00:4083 21 01 00 - ld hl, helloRowCol
The lack of any warnings and the return of the (incorrect) success status code (0) is similar to #70.
Expectation
A reference to an unknown symbol (caused by a typo for example) should print an error message.
A forward reference to another equ symbol should resolve as expected.
Problem
If the
equ
directive contains a forward reference to anotherequ
symbol, the assembler generates invalid machine code. But worse, the assembler does not print any warning messages, and returns a 0 status code (at least on the Linux version) which incorrectly tells the OS that the command succeeded.Similarly, an equate that contains a reference to an undefined symbol (caused by a simple typo) produces the same result. This can result in many hours of debugging fun.
Example
The helloflash.asm flash app below will generate an invalid machine code for
ld hl, helloRowCol
because thehelloRowCol
equate contains a forward reference tohelloRow
andhelloCol
.instead of the correct:
The lack of any warnings and the return of the (incorrect) success status code (0) is similar to #70.
Expectation
equ
symbol should resolve as expected.helloflash.asm
The text was updated successfully, but these errors were encountered: