Debian Codegraph @

test/struc.asm

raw
1 ;Testname=test; Arguments=-fbin -ostruc.bin; Files=stdout stderr struc.bin
2
3 bits 32
4
5 ; Simple struc example
6 struc teststruc1
7 .long: resd 1
8 .word: resw 1
9 .byte: resb 1
10 .str: resb 32
11 endstruc
12
13 ; Reference with offset
14 mov [ebp - 40 + teststruc1.word], ax
15
16 istruc teststruc1
17 at .word, db 5
18 iend
19
20 ; Struc with base offset
21 ; should be the same as the previous stuc
22 struc teststruc2, -40
23 .long: resd 1
24 .word: resw 1
25 .byte: resb 1
26 .str: resb 32
27 endstruc
28
29 mov [ebp + teststruc2.word], ax
30
31 istruc teststruc2
32 at .word, db 5
33 iend