Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I. Gaining Experience and Familiarity with Assembly Language Programming (32-bit). Write a single PROCedure that performs the following tasks. Be sure to test the code

I. Gaining Experience and Familiarity with Assembly Language Programming (32-bit). Write a single PROCedure that performs the following tasks. Be sure to test the code by running it on several values as test cases. An outline of how to present the project report is provided later in this document. 1. Change the value of variable Number to -253. 2. Add the value 74 to the value in EAX. 3. Add the two numbers stored in memory at Number1 and Number2, and store the total at the memory location named Sum. 4. Subtract 1000 from the value store in memory location named Number. 5. Prompt for three (3) integer values from the user, add them, print or display the sum, as well as store it in the memory location declared as Sum. 6. Prompt for two (2) from the user. Subtract the first from the second, display and result, and also store in a variable declared as Diff. 7. Use MOVe based instructions to swap values stored at Value1, Value2 and Value3. 8. Use XCHG based instructions to swap values stored at Value1, Value2 and Value3. 9. Evaluate, and display the result, for the expression: X - 5Y + 6Z, a) assuming MULtiplication and DIVision instructions are not available, b) assuming MUL, IMUL, DIV and IDIV instructions are available.. The values for X can be from 1-31, Y can be 1-12, Z can be any 4-digit year value. 10. Prompt the use for the Length, Width and Height values of a cuboid, and compute and display the value of the expression 4*Length + 4*Width + 2*Height. Also store the result in the variable Perimeter. Assume the MULtiply instruction is unavailable. 11. Declare 8-bit variables, BVar1, BVar2, BVar3 and BVar4, as well as 32-bit variables, DVar1, DVar2, DVar3 and DVar4. Prompt the user for the values to store in BVar1, Bvar2, BVar3 and BVar4. Then store 2017. Prof Amenyo. York College, CUNY. Fall 2017 Project 1. Page 2 of 3 these values in the corresponding DVar1, DVar2, DVar3 and DVar4, a) using Zero-Extension and b) SignExtension instructions. 12. Prompt the user for values to store in Var1 and Var2. Then evaluate and display the result for (Var2 - Var1) + (Var1 - Var2), using only INCrement and DECrement instructions. 13. Declare and organize memory space to store a list of 100 integer values. Write the code to display the values stored in the list (Hint: Use the LOOP instruction). 14. Declare and organize memory space to store the LastName, FirstName and MiddleName of a Patient. Prompt the user to input the names for a patient and store the inputs in the declared variables. 15. Declare and organize memory space to store the LastName, FirstName, MiddleName and Id for 100 students in a University department. Write the code to prompt the user to input the actual number of students registered in a particular semester, and then display the records for these students. (Hint: use the LOOP instruction). 16. Prompt the user for the values of A, B, C. Calculate: D = A + B+ C; E = A B C + D; F = A (B C); G = 8B + 71A 80C; H = ( A + 2B C + D); perform in sequence. Finally display the values for A, B, C, D, E, F, G, H. Display also the values in all the registers at the end. 17. Prompt the user for the values of Length, Width. Calculate and display: Perimeter = 2*Length + 2*Width; Area = Length * Width; Ratio = Area / Perimeter (display as quotient and remainder). II. Gaining Experience and Familiarity with Assembly Language Programming (64-bit). Convert the code written in Part (I) into code for 64-bit programming.

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

Students also viewed these Databases questions

Question

Discuss the states of accounting

Answered: 1 week ago