NASM - The Netwide Assembler
NASM Forum => Programming with NASM => Topic started by: zenid on March 18, 2012, 12:41:06 PM
-
Hi.
How can i get length(how many elements) and size of an array?
-
msg "Hello Zenid", 10
msg_len equ $ - msg
array dd 5, -1, 10, 42
array_count equ ($ - array) / 4
Something like that?
Best,
Frank
-
It was what I asked for thanks!!!
Another quick question: can they be used anywhere or only in global variables(arrays)?
-
Mmmm, as opposed to what? Local/stack variables? I don't see how it would work for stack variables. Maybe I don't understand the question. When in doubt, try it!
Best,
Frank