Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Exercise - 1 : Write a short sequence of instructions for the following: If A x contains a negative number, put - 1 in B

Exercise-1:
Write a short sequence of instructions for the following: If Ax contains a negative number, put -1 in Bx;
if Ax contains 0, put 0 in Bx; and if Ax contains a positive number, put 1 in Bx.
Exercise-2:
Translate the high-level language assignment statement A=5A-12B into assembly code.
Exercise-3:
Develop a short sequence of instructions that adds AL, BL, CL, DL, and AH. Save the sum in the DH
register.
Exercise-4:
Develop a short sequence of instructions that adds AX, BX, CX, DX, and SP. Save the sum in the DI
register.
Exercise-5:
Explain the difference between the SUB and CMP instruction
Exercise-6:
When two numbers multiply, what happens to the O and C flag bits?
Exercise-7:
Develop a short sequence of instructions that clears (0) the three leftmost bits of DH
without changing the remainder of DH and stores the result in BH
Exercise-8:
Develop a sequence of instructions that sets (1) the rightmost 4 bits of Ax; clears (0) the
leftmost 3 bits of AX; and inverts bits 7,8, and 9 of AX.
Exercise-9:
What is the difference between the NOT and the NEG instruction?
Exercise-10:
Describe the difference between the AND and TEST instructions.
image text in transcribed

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions