Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

You are writing an Intel x 8 6 assembly language program that takes the length, width, and height of a room in feet and calculate

You are writing an Intel x86 assembly language program that takes the length, width, and height of a room in feet and calculate the number of square feet of paint needed to paint the walls. For a room shaped like a rectangular prism, you would need four walls to paint; you would not need to paint the floor or the ceiling.
Take the following approach:
In the data section, declare three variables called lengthFeet, widthFeet, heightFeet, and totalsarfeet; all initialized to 0.
Create a mathematical expression that will calculate the square feet of the four walls (not including the ceiling and the floor).
In the code section, use the general registers (eax, ebx, ecx, and edx) as well as any add and mul commands that would use the expression that you wrote and calculate the final total in square feet.
At the end of the program, use the mov command to move the final value to totalsqrFeet.
a.(15 points) Copy-paste the code that you've written into this section:
b.(15 points) Test your program by setting lengthFeet, widthFeet, and heightFeet to 20,15, and 10 respectively. Add a breakpoint to debug (as we've done in video) and examine the registers to ensure that the correct value is being placed in totalsqrFeet. Take a screenshot of the registers and place it here:
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions