CSC3210 Assignment #4 Solved

30.00 $

Category:
Click Category Button to View Your Next Assignment | Homework

You'll get a download link with a: zip solution files instantly, after Payment

Securely Powered by: Secure Checkout

Description

Rate this product

1. Write an assembly program to implement the following. Sum = 0

while X >= 0
if (X!=3)AND(X<=(A+3)ORX<(B-3))

X=X–2

Sum += 1 else

X=X–1 end while

  • –  Use short-circuit evaluation
  • –  Assume that A, B, and X are 16-bit signed integers variables
  • –  Assume that A=9, B=8, and X=15

o Submit the following:
§ Rename the asm file using your last name as Lastname1.asm and submit it. § Screenshot of the code
§ Then run the code until you reach INVOKE ExitProcess, 0
§ Then take a screenshot of the watch window showing Sum variable content.

2. (6 points) Write an assembly program to test if the MSB in the register al is set:

  • –  If it is set, then divide the content of al by 8 using the appropriate shift instruction and exit.
  • –  Else, if it is not set, then multiply the content of al by 4 using the appropriate shift instruction and exit.
  • –  When checking al MSB, do not change al content.
  • –  Assume that al is equal to the signed integer 88h.
  • –  You need to come up with the appropriate mask to check the MSB.
  • –  Run your program using the debugger to verify your answers.

o Submit the following:
§ Rename the asm file using your last name as Lastname2.asm and submit it. § Screenshot of the code
§ Then run the code until you reach INVOKE ExitProcess, 0
§ Then take a screenshot of the register window.

Note:

§ Commentheaderfor.ASMfiles: Student Name

Class: CSC3210
Assignment#: 4
Description: This program ………….

§ Followtheprogramstandardsaspresentedinyourbook.Paymoreattentiontocodecommentsand consistent indentation.

§ Createanewprojectforeveryquestion.Donotuseoneprojectwithmultiple.asmfiles.

  • Assignment-4-oeposh.zip