A1305: Type name expected

[ERROR]

Description

The symbol specified after a TYPE directive is not a previous defined structured type.

Note

Not all assembler backends do support structured types. Assembler not supporting them will not issue this message.

Example
myType:  STRUCT

field1:    DS.W 1

field2:    DS.W 1

         ENDSTRUCT

DataSec: SECTION

myData:  TYPE yType

         XDEF entry

CodeSec: SECTION

entry:

         NOP

         NOP

         LD A, myData:field2
Example
  myType:  STRUCT

  field1:    DS.W 1

  field2:    DS.W 1

           ENDSTRUCT

  DataSec: SECTION

  myData:  TYPE yType

           XDEF entry

  CodeSec: SECTION

  entry:

           NOP

           NOP

           LDX myData:field2
  
Example
  myType: STRUCT

  field1:   DS.B    1

  field2:   DS.B    1

          ENDSTRUCT

  data:   SECTION

  myData: TYPE    yType           ; no type "yType"
  
Example
  myType:  STRUCT

  field1:     DS.W 1

  field2:     DS.W 1

           ENDSTRUCT

  DataSec: SECTION

  myData:  TYPE yType

         XDEF entry


  CodeSec: SECTION

  entry:

           LRW R4, [myDataField2]

           LD.B     R4,(R4,0)

           BR   *

           ALIGN 4

  myDataField2: DC.W myData:field2
  
Tips

Change the name of the type for a valid type name.

Example
  myType: STRUCT

  field1:   DS.W 1

  field2:   DS.W 1

          ENDSTRUCT

  DataSec: SECTION

  myData:  TYPE myType

           XDEF entry

  CodeSec: SECTION

  entry:

           NOP

           NOP

           LD A, myData:field2
  
Example
  myType:  STRUCT

  field1:    DS.W 1

  field2:    DS.W 1

           ENDSTRUCT

  DataSec: SECTION

  myData:  TYPE myType

           XDEF entry

  CodeSec: SECTION

  entry:

           NOP

           NOP

           LDX myData:field2
  
Example
  myType:  STRUCT

  field1:    DS.W 1

  field2:    DS.W 1

           ENDSTRUCT

  DataSec: SECTION

  myData:  TYPE myType

           XDEF entry

  CodeSec: SECTION

  entry:

           LRW R4, [myDataField2]

           LD.B     R4,(R4,0)

           BR   *

           ALIGN 4

  myDataField2: DC.W myData:field2