struc.asm 538 B

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