Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Intelx86 assembly language program .386 .model flat .code start PROC ; this is a comment - code starts here ; this is a comment -
Intelx86 assembly language program
You are writing an Intelx86 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 totalSqrFeet; 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. Copy-paste the code that you've written into this section: b. 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 .386
.model flat
.code
start PROC
; this is a comment - code starts here
; this is a comment - code ends here
ret
start endp
end start
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