flat assembler
Message board for the users of flat assembler.

Index > Macroinstructions > structure field in fasm1

Author
Thread Post new topic Reply to topic
CandyMan



Joined: 04 Sep 2009
Posts: 414
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 20 May 2020, 15:32
How to define and refer to the structure field without copy code?
Code:
include "struct.inc"

struct  One
A       db      ?
B       db      ?
ends

struct  Two
.       One
C       db      ?
D       db      ?
ends

        mov     al,[ebp+Two.A] ; undefined Two.A    

_________________
smaller is better
Post 20 May 2020, 15:32
View user's profile Send private message Reply with quote
DimonSoft



Joined: 03 Mar 2010
Posts: 1228
Location: Belarus
DimonSoft 20 May 2020, 15:40
This way?
Code:
struct Two One
... ; Only new field here
ends    
Post 20 May 2020, 15:40
View user's profile Send private message Visit poster's website Reply with quote
CandyMan



Joined: 04 Sep 2009
Posts: 414
Location: film "CandyMan" directed through Bernard Rose OR Candy Shop
CandyMan 20 May 2020, 15:56
Thanks a lot!
Post 20 May 2020, 15:56
View user's profile Send private message Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.