Hi,
here are my two questions:
1. How can I convert this nicely to MASM?
"#define SIZE (sizeof(ULONG) * 4)"
2. I did not find useful stuff about this...
So for what is it, in what relation stands it to equ and how can I use it?
Thanks in advance!
noob,
I may be leading you up the garden path as my C is getting very rusty but a ULONG multiplied by 4 == 16.
SIZE is a reserved word in MASM so you would need another name.
mySIZE equ <SIZEOF DWORD *4>
Here is a simple test piece to show it works.
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
include \masm32\include\masm32rt.inc
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
comment * -----------------------------------------------------
Build this template with
"CONSOLE ASSEMBLE AND LINK"
----------------------------------------------------- *
mySIZE equ <SIZEOF DWORD*4>
.code
start:
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
call main
inkey
exit
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
main proc
mov eax, mySIZE
print str$(eax),13,10
ret
main endp
; «««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««««
end start