| ||
The STRUC directive allows you to join several dissimilar data values of different types. These data items are called structure fields. First, it is necessary to define the structure template using the STRUC keyword; then, using the < > directive, it is possible to define any number of structures. Consider the following example:
STRUC COMPLEX RE DD ? IM DD ? STRUC ENDS ... ; In data segment COMP1 COMPLEX <?> COMP2 COMPLEX <0> ; Initialization by zero
Access to the structure fields is carried out by reference points, for example, MOV COMP1.RE , EAX .
Note | For working with string constants, MASM32 and TASM32 provide a large set of string macros: CATSTR , INSTR , and so on. However, we are not going to practice macro programming in Assembly language, therefore, we won' t consider these possibilities. |
| ||