diff --git a/travis/test/struc.asm b/travis/test/struc.asm new file mode 100644 index 00000000..c262b593 --- /dev/null +++ b/travis/test/struc.asm @@ -0,0 +1,31 @@ +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 diff --git a/travis/test/struc.bin.t b/travis/test/struc.bin.t new file mode 100644 index 00000000..1efaa26f Binary files /dev/null and b/travis/test/struc.bin.t differ diff --git a/travis/test/struc.json b/travis/test/struc.json new file mode 100644 index 00000000..3684db06 --- /dev/null +++ b/travis/test/struc.json @@ -0,0 +1,12 @@ +[ + { + "description": "Check structure compilation", + "id": "struc", + "format": "bin", + "source": "struc.asm", + "option": "", + "target": [ + { "output": "struc.bin" } + ] + } +]