I am trying to define some data in a fixed size structure in assembler. I would like to declare string data of a fixed number of bytes initialized by a string. In C, it will be:
char my_string[32] = "hello";
This is 32 bytes and is filled with the fact that in the end you need the number of zeros.
What will be the equivalent in assembler? I know that I can manually calculate the length of my string and declare the required number of zero bytes for laying to 32, for example:
my_string:
.asciz "hello"
.zero 26
But how can I do this if the string is determined dynamically, for example, from an external define or include?
source
share