i Just want to make an array of strucutre with the dup operator and init all values of all the items of all structures, but i recive the error: "too many initial values for structure".
I Mean this:




;Token
TokStrct struct
InitByte db ?
TokSize db ?
TokStrct ends


TS TokStrct 2 dup (<0,9,0,3>) <---- here is the problem




The question is: how do i do to init the values of an array of a structure?

: placed code in code braces
Posted on 2003-02-15 04:52:20 by IrOn
This works:
;Token 

TokStrct struct
InitByte db ?
TokSize db ?
TokStrct ends

.data
TS TokStrct 2 dup (<0,9[color=red]>,<[/color]0,3> ) ;<---- here is the problem


Which is:
00405000  00 09 00 03 00 09 00 03  ......

00405008 00 00 00 00 00 00 00 00 ........


So i would recomend simply doing:


TS LABEL BYTE
db 00, 09
db 00, 03


which is essentially the same as:

TS TokStrct 1 dup (<0,9>,<0,3> )

:alright:
NaN
Posted on 2003-02-15 10:07:00 by NaN