flamewing / asl-releases

Improved/bugfixed version of Alfred Arnold's The Macro Assembler AS
http://john.ccac.rwth-aachen.de:8000/as/
GNU General Public License v2.0
20 stars 2 forks source link

Structure definition #15

Open flamewing opened 3 years ago

flamewing commented 3 years ago

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      *