Accessing Field Address

To access a structured-type field address (refer to the listing listed below), the Assembler uses the colon character ':'.

  var:field

  

where

Listing: Example of accessing a field address

myType:  STRUCT
field1:    DS.W  1

field2:    DS.W  1

field3:    DS.B  1

field4:    DS.B  3

field5:    DS.W  1

         ENDSTRUCT

         XREF  myData:myType

         XDEF  entry

CodeSec: SECTION

entry:

         LD D2,  myData:field3  ;Loads register D2 with the content of

                              ; field field3 from variable myData.
Note: The period cannot be used as separator because in assembly language it is a valid character inside of a symbol name.