HW # 3: Theme: Data declarations, Small program Solution

$30.00 $24.90


  1. Declare the following:

  1. An un-initialized data declaration for a 32-bit signed and unsigned integer

  1. An initialized data declaration for a 32-bit unsigned integer with the value “A45C2EB1h” and a signed integer with the value of your choice.

  1. A null terminated string variable containing the name of your favorite car.

  1. A symbolic constant named “HoursinFortnight” using the equal-sign directive and assign it an arithmetic expression that calculates the total number of hours in a Fortnight.

  1. Show the order of individual bytes in memory (lowest to highest) for the following double word variable (use little endian order): GoTigers DWORD A1B2C3D4h

  1. Show the following using assembler directives:

  1. How to declare an unsigned dword array of five elements and initialize the array with the following values: 1Ah, 2Bh, 3Ch, 4Dh, 5Eh

  1. Using the array created in part A of this question, show how to calculate the number of elements contained and assign that value to a symbolic constant named “ArraySize

  1. Why is a string variable declared using the reserved word BYTE as opposed to WORD, DWORD or QWORD?

  1. Using the AddVariables program from the textbook as a reference, write a program that adds three signed byte sized integers using only 8-bit registers. Please embed program code into your homework submission.

  1. Write a program that prints your <FirstName Lastname> on your screen. You can use the following. Assemble and generate the output using MASM and Visual Studio. Embed your output in your submission.