Assembly Language Program for Arithmetic Operations with Bitwise Checks, Exercises of Computer Architecture and Organization

The assembly language code for a program that adds two numbers and performs bitwise checks on the result. Depending on the third and first bits of the result, the program either subtracts the given numbers or takes the or of the two values and stores the result in the dx register. This code snippet can be useful for students and professionals studying assembly language programming.

Typology: Exercises

2011/2012

Uploaded on 07/15/2012

sadalge
sadalge 🇮🇳

5

(1)

37 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Quiz
Write Assembly Langugae Program that can do/perform the following objctive.
Add two numbers after placing them in registers. Depending on addition check the status of
third and first bit of the result.
If third bit is zero then subtract the given numbers and store in CX register else nothing to be
done
If First bit is 1 then add again the two numbers placed in register else take OR of the two
valuesand show the results in DX register.
org 100h
;Assembly code here
ret
docsity.com

Partial preview of the text

Download Assembly Language Program for Arithmetic Operations with Bitwise Checks and more Exercises Computer Architecture and Organization in PDF only on Docsity!

Quiz

Write Assembly Langugae Program that can do/perform the following objctive. Add two numbers after placing them in registers. Depending on addition check the status of third and first bit of the result. If third bit is zero then subtract the given numbers and store in CX register else nothing to be done If First bit is 1 then add again the two numbers placed in register else take OR of the two valuesand show the results in DX register.

org 100h

;Assembly code here

ret

docsity.com