Hi Group Members,
I have a Question regarding the Structure Members.
Can We define the Data Types for the Structure Members during Assembly Time?
i.e
Macro Something Par1,Par2
Struct Sample
ifnb <Para1>
Var1 Para1
endm
ifnb<Para2>
Var2 Para2
endm
Ends Sample
Endm Something
When invoked the Macro in the .DATA Segment with Different DATA Types, can these types be assigned to Structure Members??
Need Help rRegarding this..
Have A Nice Day
I have a Question regarding the Structure Members.
Can We define the Data Types for the Structure Members during Assembly Time?
i.e
Macro Something Par1,Par2
Struct Sample
ifnb <Para1>
Var1 Para1
endm
ifnb<Para2>
Var2 Para2
endm
Ends Sample
Endm Something
When invoked the Macro in the .DATA Segment with Different DATA Types, can these types be assigned to Structure Members??
Need Help rRegarding this..
Have A Nice Day
If you have a preset group of data types you can use UNION which allows you to use multiple data types for a single element :
sample UNION
Var1 Para1
Var2 Para2
sample ENDS
Var1 and Var2 use the same storage space in the structure but can have different data types. All members of a UNION have an offset of zero from the beginning of the union so you can have multiple data types.
sample UNION
Var1 Para1
Var2 Para2
sample ENDS
Var1 and Var2 use the same storage space in the structure but can have different data types. All members of a UNION have an offset of zero from the beginning of the union so you can have multiple data types.
Sure you can do this.
But if you tell us what your *really* trying to do here, we might
be able to offer a better solution.
Cheers,
Randy Hyde
But if you tell us what your *really* trying to do here, we might
be able to offer a better solution.
Cheers,
Randy Hyde