Author Topic: ISTRUC not in data section  (Read 15245 times)

nobody

  • Guest
ISTRUC not in data section
« on: December 18, 2004, 05:31:16 PM »
Can you use the ISTRUC directive but on a stack variable instead of the data section?

nasm64developer

  • Guest
Re: ISTRUC not in data section
« Reply #1 on: December 18, 2004, 09:55:12 PM »
No. But then, you are trying to use an existing
structure definition, not instantiate from it.
So in this you don't need to use ISTRUC at all.

1                         struc s
2 00000000  resb 1
3 00000001  .w: resw 1
4 00000003  .d: resd 1
5                         endstruc
6
7 00000000 6681EC07000000 sub esp,s_size
8 00000007 678B442401     mov ax,[esp + s.w]
9 0000000C 66678B442403   mov eax,[esp + s.d]