Yesterday I learned about the SIZEOF and TYPE statements. In doing so, I created an array,
Array QWORD 1h,2h,3h,4h,5h
and in the .code section, I wrote,
MOV eax, SIZEOF Array
After the build, it is inconvenient that I received only 28 bytes allocated for the array (using the visual studio 2015 community). I saw register values ββin a debugging session.
My question is here, each QWORD takes up 8 bytes of memory. Then why didn't I get SIZEOF Array as 40?
Even worse. When I launched this,
Array QWORD 1h
he gave me 8 bytes as expected
Array QWORD 1h,2h
Gives me 10 .. !! AND,
Array QWORD 1h,2h,3h
Gives me 18 .. !!
Etc...
source
share