asl-releases icon indicating copy to clipboard operation
asl-releases copied to clipboard

Structure definition

Open flamewing opened this issue 2 years ago • 0 comments

Currently, you can define structures:

Rec     STRUCT
Ident   ds.b      ?
Pad     ds.b      ?
Pointer ds.l      ?
Rec     ENDSTRUCT

And you can allocate (reserve) space for it:

thisrec Rec

But you cannot initialize a struct with values. A struct should accept being reserved with the following syntax:

thisrec Rec ?

(which is equivalent to the existing syntax of giving no arguments, but more explicit), and it should be possible to initialize with the following syntax:

thisrec Rec 0,0,*

which would be equivalent to:

thisrec:
thisrec_Ident   dc.b      0
thisrec_Pad     dc.b      0
thisrec_Pointer dc.l      0

flamewing avatar Jul 01 '21 09:07 flamewing