Test circular reference detection. Very basic examples from NASM's docs on

critical expressions.
NASM behavior: 1-3 fail, 4 generates a 4-byte offset in the memory expression.
YASM behavior: 1&2 fail (and rightfully so :), 3 works as expected, and 4
 generates a 1-byte offset.

svn path=/trunk/yasm/; revision=473
0.3
Peter Johnson 23 years ago
parent 964c755067
commit 01481e7d47
  1. 2
      tests/nasm/circular1.asm
  2. 2
      tests/nasm/circular2.asm
  3. 3
      tests/nasm/circular3.asm
  4. 2
      tests/nasm/circular4.asm

@ -0,0 +1,2 @@
times (label-$) db 0
label: db 'Where am I?'

@ -0,0 +1,2 @@
times (label-$+1) db 0
label: db 'NOW where am I?'

@ -0,0 +1,3 @@
mov ax, symbol1
symbol1 equ symbol2
symbol2:

@ -0,0 +1,2 @@
mov eax, [ebx+offset]
offset equ 10
Loading…
Cancel
Save