In C,I define a array like this:

POINT ptColon[2][4]={2,21,6,17,10,21,6,25,

How Can I declare the same array in Masm?
Posted on 2002-06-08 01:29:08 by purefiring
ptColon POINT <2,21>, <6,17>, <10,21>, <6,25>, <2,51>, <6,47>, <10,51>, <6,55>

ptColon DWORD 2,21,6,17,10,21,6,25,2,51,6,47,10,51,6,55

It really depends on how you want to use the data... I have no clue what the #'s mean.. or how they are intended to be used... Data is data... Array's is something a PROGRAMMER knows and thinks about, to a CPU (and hence in ASM), its all just data layed out in memory....
Posted on 2002-06-08 02:56:33 by NaN

and if I want to change the bytes in array I do this:

ptColon DWORD 2,21,6,17,10,21,6,25,2,51,6,47,10,51,6,55

mov eax, offset ptColon
mov byte ptr , 01Ah
mov byte ptr , 022h
mov byte ptr , 0nh

Lets say I have a string (eg. 'blaaa') and want to put the hex. value of the first char ('b'). into the array:

mov eax,
mov edx,

movzx edx, byte ptr
mov byte ptr , edx

Is this correct? (or is there any other way how to change the bytes?).

Posted on 2002-06-08 09:17:17 by stealthFIGHTER