Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- TASM 2.x / MASM 6.x Assembly Language - <b>struc define structure type directive</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
STRUC            Define Structure Type                              Directive

  name      STRUC
  fieldDefinitions
  name      ENDS

    Initiates the definition of a structure type. In TASM Ideal mode, the
    name of the structure comes after the keyword STRUC, like this: STRUC
    name.

       Notes:     The structure may have any number of fields.  Each field
                  definition must be of the following form:

                       [name]   DB | DW | DD | DQ | DT   initialValue,,,

                  The optional parameter name specifies the name of the
                  field. The DB, DW, DD, DQ, or DT specifies the size of
                  the field.  InitialValue assigns a default value to be
                  used if no value is included when the structure is
                  declared. See DB, DW, DD, DQ, and DT for a more
                  comprehensive discussion of how to use these directives.

                  The STRUC directive by itself does not create data. It
                  merely creates a data type. To create data of this type,
                  use the syntax:

                       [name]      structureName      <[initialValue,,,]>

                  where name is the name of a variable and structureName
                  is the name of a structure type previously defined with
                  the STRUC directive. One initialValue may be declared
                  for each field in the structure, using commas to
                  separate the initial values for each field. For example,
                  <,,3> will initialize the 3rd field of a structure.

                  Structure definitions can contain only comments and
                  field definitions, therefore nested structures are not
                  allowed.

See Also: . RECORD ENDS

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson