assembly - Array definition misunderstanding? -


i read kip irvine x86 assembly book , have 2 questions.

1) meaning of definition:

array2   word  5 dup(3 dup(?)) 

2) difference between

myarray byte 10,20,30,40,50,              60,70,80,90,100 

and

myarray byte 10,20,30,40,50         byte 60,70,80,90,100 

in array definition?

array2   word  5 dup(3 dup(?)) 

this creates array of 5*3 words, 30 bytes in total. none of these bytes defined value because ? placeholder means assembler assigns space not initialize contents.


myarray byte 10,20,30,40,50,              60,70,80,90,100 ... myarray byte 10,20,30,40,50         byte 60,70,80,90,100 

both these initializer lists declare same array. in first case list not interrupted transition line added comma. becomes important when using lengthof , sizeof operators. in first case lengthof , sizeof yield 10, in second case they'll give 5.


Comments

Popular posts from this blog

html - Styling progress bar with inline style -

java - Oracle Sql developer error: could not install some modules -

How to use autoclose brackets in Jupyter notebook? -