diff options
author | Victor van den Elzen <victor.vde@gmail.com> | 2009-03-27 03:53:59 +0100 |
---|---|---|
committer | Victor van den Elzen <victor.vde@gmail.com> | 2009-03-27 03:53:59 +0100 |
commit | 56b820355cc3220bbee0b8f8dccc2a3aa152031c (patch) | |
tree | b481a30707b28f26abcef72dabbf6055666dafc8 /test | |
parent | 1d7d7c64cf4c0ba2f0e0681a578af0323cc9ad3d (diff) | |
download | nasm-56b820355cc3220bbee0b8f8dccc2a3aa152031c.tar.gz nasm-56b820355cc3220bbee0b8f8dccc2a3aa152031c.tar.bz2 nasm-56b820355cc3220bbee0b8f8dccc2a3aa152031c.zip |
FR 2499968: structures with non-zero base offset
Add an optional second argument to struc, document it and test it.
Also removed trailing whitespace in nasmdoc.src in the process.
Diffstat (limited to 'test')
-rw-r--r-- | test/struc.asm | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/struc.asm b/test/struc.asm new file mode 100644 index 0000000..3c8c1b4 --- /dev/null +++ b/test/struc.asm @@ -0,0 +1,33 @@ +;Testname=test; Arguments=-fbin -ostruc.bin; Files=stdout stderr struc.bin + +bits 32 + +; Simple struc example +struc teststruc1 + .long: resd 1 + .word: resw 1 + .byte: resb 1 + .str: resb 32 +endstruc + +; Reference with offset +mov [ebp - 40 + teststruc1.word], ax + +istruc teststruc1 + at .word, db 5 +iend + +; Struc with base offset +; should be the same as the previous stuc +struc teststruc2, -40 + .long: resd 1 + .word: resw 1 + .byte: resb 1 + .str: resb 32 +endstruc + +mov [ebp + teststruc2.word], ax + +istruc teststruc2 + at .word, db 5 +iend |