4.33. 4.33 Controlling Field Offsets Within a Record

By default, whenever you create a record, HLA automatically assigns the offset zero to the first field of that record. This corresponds to record offsets in a high level language and is the intuitive default. In some instances, however, you may want to assign a different starting offset to the first field of the record. HLA provides a mechanism that lets you set the starting offset of the first field in the record.

The syntax to set the first offset is

name:
     record := startingOffset;
          << Record Field Declarations >>
     endrecord;

Using the syntax above, the first field will have the starting offset specified by the startingOffset int32 constant expression. Because this is an int32 value, the starting ...

Get Art of Assembly Language, 1st Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.