Question: Write assembly code for the following problems: ( 1 ) ( 7 points ) Write a complete MASM program that has two variables declared len

Write assembly code for the following problems:
(1)(7 points) Write a complete MASM program that has two variables declared len and wid. They should be of type word. Initialize len to 10d and wid to 20d.
Calculate: the perimeter and the area of the rectangle. Create these variables.
Take an image of the memory area that has the variables.
Calculate the area of the rectangle. Use only add arithmetic instruction.
Upload source code as Ch4_1.asm. Take an image of the memory area that has the variables.
(3 points) Would the code be easier if the variables were doublewords? Explain.
(2)(10 points) Fibonacci Numbers#5 on page 150. Upload source code as Ch4_2.asm. Use dup to create an array of 15 integers. Must use a loop to calculate the remaining Fibonacci numbers. Include a screen shot of the memory of the array after the loop completes.

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 Programming Questions!