Some NASM examples I found put 'size:' as a final member of a structure and use it to obtain the structure's size. Is this correct?
The following code is compiler generated and NASM has no trouble compiling it:
struc _D27
_D27_fname: resd 1
_D27_sname: resd 1
_D27_age: resd 1
size:
endstruc
SECTION .text
global _start
global _end
_start:
mov eax, [_I0 + _D27_age]
_end:
mov ebx, 0
mov eax, 1
int 80h
SECTION .data
_I0: istruc _D27
at _D27_fname, dd 0
at _D27_sname, dd 0
at _D27_age, dd 0
iend
If the 'size:' member is correct, can it also be prepended, or is the name 'size' default for NASM to be recognized?