flat assembler
Message board for the users of flat assembler.
Index
> Macroinstructions > struc problem? |
Author |
|
LocoDelAssembly 08 May 2006, 18:09
The problem is that "foo bar 1, 2" defines two labels, foo.x and foo.y. foo.y hides .z so if you use dd foo.y.z will work:
Code: struc bar x,y { .x dd x .y dd y } dd foo.y.z ; Works even here (where has more sense to do this) foo bar 1,2 .z=3 dd foo.y.z dd .z ; This works too because there is nothing in the middle hiding .z |
|||
08 May 2006, 18:09 |
|
quiveror 08 May 2006, 20:02
This is so weird. I was thinking of an easy way to put more members to the instance of struc bar. If the situation is just like this, it will be no use. I have to know the last member's name of struc bar in order to use those additional members(.z) and if I use your technique, later on, I cannot modify the last member of struc bar too.
|
|||
08 May 2006, 20:02 |
|
LocoDelAssembly 08 May 2006, 20:47
ooh, maybe you want this then:
http://flatassembler.net/docs.php?article=win32 wrote: The definition of structure may also be based on some of the already defined structure types and it inherits all the fields from that structure, for example: Also you can add some "tag" at the end of the struc to do what you want I thing. Code: struc bar x,y { .x dd x .y dd y .strucScope: } dd foo.strucScope.z ; Works even here (where has more sense to do this) foo bar 1,2 .z=3 dd foo.strucScope.z dd .z ; This works too because there is nothing in the middle hiding .z |
|||
08 May 2006, 20:47 |
|
quiveror 09 May 2006, 07:41
the "tag" method is good. thanks
|
|||
09 May 2006, 07:41 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.