Question: 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

.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

Intelx86 assembly language program .386 .model flat .code start PROC ; this

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!