Answered step by step
Verified Expert Solution
Link Copied!

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

.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

image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

Recommended Textbook for

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

1583474013, 978-1583474013

More Books

Students also viewed these Databases questions