im tying to complete a project here. but before i begin, i need to finish some basic problems. i just want to make sure i have this correct before i continue.

1. Declare an array named 'array1' consisting of the four elements {1, 2, 3, 4}, each as 2 byte values.
would it be like this:

array1 byte 4 dup(?)

and 2.Declare an unitialized array consisting of 100000 DWORDS in such as way that the size of the generated executable remains under 20 KB.
would this answer look like this:

UnintiArray DWORD 100000 dup(?)

im sorry for such basic questions, but im having a hard time grasping assembly.
thank you in advance for any help.

7 Years
Discussion Span
Last Post by Tight_Coder_Ex

Example 1: You've declared single byte, whereas word declares 2

array1  dw  4   dup(?)

Example 2: is correct. In both cases you are declaring space in uninialized space and has no effect of executable size. If however you used dup (0) you'd wind up with an executable of 20k bytes.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.