Simply declaring the structure does not reserve memory for it. You need an instance of it. Either:
section .bss
my_agenda resb agenda_size
; or perhaps...
agenda_array resb agenda_size * MAX_COUNT
; or...
section .data
an_agenda istruc agenda
at name db "fred"
at number db "42"
at type db "regular"
iend
section .text
mov esi, an_agenda
mov al, [esi + name]
Something like that?
Heh! Jester has just posted essentially the same thing. He introduces the '.' notation for local labels. Probably a good idea. Without it, name
is a global identifier and can't be reused. It takes slightly more typing - agenda.name
, agenda.number
, agenda.type
. Probably worth it for increased clarity.