Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started