Question: First Assembly Program Write an assembly program that declares storage for the variables and carries out the operations shown in the following C++ program. Ensure

First Assembly Program Write an assembly program that declares storage for the variables and carries out the operations shown in the following C++ program. Ensure that your storate is declared with the same names and in the same order as is shown below. When you submit your assignment, submit only the .asm source file. Be sure to include adequate comments in your program to describe your logic. short var1 = 7; // Assume 16 bits short var2 = 15; short var3 = 19; long var4 = -15; // Assume 32 bits long var5 = -21; long var6 = 18; short var7, var8; // Uninitialized long var9; // Uninitialized short x[8] = { 0 }; // Initialize all elements to o. long y[4]; // Uninitialized char z[] = "hello!"; // 7 elements, last element is o. int main() { var 7 = var1 - (var 2 + var3); var8 = (var7 - ++var1) - (var2++ + var3); var9 = --var4 - var5 + var6--; x[0] = var1 + var2 + var3; y[2] = var4 - var5; z[0] = 'H'; z[4] -= 32; return 0; First Assembly Program Write an assembly program that declares storage for the variables and carries out the operations shown in the following C++ program. Ensure that your storate is declared with the same names and in the same order as is shown below. When you submit your assignment, submit only the .asm source file. Be sure to include adequate comments in your program to describe your logic. short var1 = 7; // Assume 16 bits short var2 = 15; short var3 = 19; long var4 = -15; // Assume 32 bits long var5 = -21; long var6 = 18; short var7, var8; // Uninitialized long var9; // Uninitialized short x[8] = { 0 }; // Initialize all elements to o. long y[4]; // Uninitialized char z[] = "hello!"; // 7 elements, last element is o. int main() { var 7 = var1 - (var 2 + var3); var8 = (var7 - ++var1) - (var2++ + var3); var9 = --var4 - var5 + var6--; x[0] = var1 + var2 + var3; y[2] = var4 - var5; z[0] = 'H'; z[4] -= 32; return 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
