Message board for the users of flat assembler.
> Macroinstructions > Reserving strucs, then accessing fields using struc pointer
I turned up many questions/answers about this general topic, but unfortunately they haven't really helped clear up what I'd like to achieve.
Let's say I need to reserve space for a few structures, all of the same type (which includes fields specified w/local labels). I also have a near pointer to specify which of those structures I'll be accessing. Once this pointer contains the address of a structure, how can the individual fields be accessed by their labels (instead of specifying their numeric offsets)?
From the docs I understand that this requires "virtual", but also, that "virtual" doesn't actually allocate space for my structure. So how would this be done? and does it require a separate "virtual" block for every structure declared?
Context: a simple 16-bit program in fasm1 for DOS.
Here's an abridged/simplified version of what I'm trying to do:
;------ Structure definition ----- struc dude .height db ? .weight db ? .shortname times 12 db ? .longname times 128 db ? .portrait times 8192 db ? ;-------- Code ------ ;