In the .data section I defined a struc:
%define O_RDWR 00000002
struc mq_attr
.mq_flags: resd 1
.mq_maxmsg: resd 1
.mq_msgsize: resd 1
.mq_curmsgs: resd 1
endstruc
mq_attributes:
istruc mq_attr
at mq_attr.mq_flags, dd O_RDWR
at mq_attr.mq_maxmsg, dd 100
at mq_attr.mq_msgsize, dd 1000 ;656
at mq_attr.mq_curmsgs, dd 0
iend
In the text (code) section, I followed the directions in the 2.13.02 manual to examine the structure elements, but only the third element shows correctly:
194 mov rax,[mq_attributes+mq_attr.mq_flags]
rax 0x6400000002 429496729602
195 mov rax,[mq_attributes+mq_attr.mq_maxmsg]
rax 0x3e800000064 4294967296100
196 mov rax,[mq_attributes+mq_attr.mq_msgsize]
rax 0x3e8 1000
197 mov rax,[mq_attributes+mq_attr.mq_curmsgs]
rax 0x6e616c6300000000 7953757589370568704
Did I calculate the offsets correctly (e.g. mq_attributes+mq_attr.mq_flags)? If so, why do elements 1, 2 and 4 not show correctly?
Thanks very much.