Assembly Language Help (alang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Declare Record
 Example                                   Up Contents Index Back
────────────────────────────────────────────────────────────────────────────
 
  Syntax:   recordname RECORD field [, field]...
 
  See also: STRUCT, MASK, WIDTH, OPTION EXPR16/EXPR32,
            Control-Flow Directives
 
  Description:
 
     Declares a record template of one or more specified bit fields
     but does not allocate storage for the template. Separate multiple
     fields with a comma.
 
     Records can be used as constants or expressions. They are treated
     as a BYTE or WORD with 16-bit expressions and as a BYTE, WORD, or
     DWORD with 32-bit expressions. The sum of the widths for all fields
     must not exceed the expression width.
 
     Once a record template is declared, you can use it to define
     record variables or constants, in which each field not initialized
     assumes the default value. Records are defined with the following
     syntaxes:
 
       [name1]   recordname   {[initializer1] [, initializer2]...}
       [name1]   recordname   <[initializer1] [, initializer2]...>
 
     Use of <recordname> is similar to the other variable definition
     directives (such as BYTE and WORD). Curly braces or angle brackets
     are required even if no initializers are given.
 
     If a record constant appears as part of an expression in a control
     flow directive (such as .IF or .WHILE), you must use curly braces
     instead of angle brackets to enclose the fields.
 
     The assembler will treat the name of a record field without the
     MASK or WIDTH operators as the bit number of the first bit of the
     record field.
 
     Parameter      Description
 
     recordname     A unique symbolic name.
 
     field          Each field is in the form
 
                         fieldname:width[= expression]
 
                    where <width> is a constant giving the width of the
                    field (in bits) and <expression> optionally sets an
                    initial or default value.
                                    -♦-