Hello,
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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.