Question: 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.
 Exercise-1: Write a short sequence of instructions for the following: If

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