1. CMP: - (compare register or memory with accumulator) The contents of the operand register or memory are M compared with the contents of the accumulator. Both contents are preserved . The result of the comparison is shown by setting the flags of the PSW as follows:
if (A) < reg/mem: carry flag is set.
if (A) = reg/mem:
zero flag is set.if (A) = reg/mem:
if (A) > reg/mem: carry and zero flags are reset.
Eg: - CMP B
CMP M
2. CPI: - (compare immediate with accumulator) The second byte (8-bit data) is compared with the contents of the accumulator. The values being compared remain unchanged. The result of the comparison is shown by setting the flags of the PSW as follows:
if (A) < data: carry flag is set
if (A) = data: zero flag is set
if (A) > data: carry and zero flags are reset
Eg: - CPI 89H
3. ANA: - logical AND operation is performed with the specified register or memory with accumulator.
Eg: - ANA B
ANA M
4. ANI: - (AND operation with immediate data) AND operation is performed between accumulator and specified immediate data.
Eg: - ANI 30H
5.XRA: - The content of accumulator are exclusive OR with specified register or memory location.
Eg: - XRA B
XRA M
6. XRI: - The content of accumulator are exclusive OR with the immediate data.
Eg: - XRI 30H
7. ORA: - Logical OR operation is performed between accumulator and specified register and memory location.
Eg: - ORA B
ORA M
8. ORI: - Logical OR operation is performed between accumulator and immediate data.
Eg: - ORI 30H
love this site keep up your work
ReplyDeleteAfter the execution of the instruction XRA A the contents of A, carry and zero flags are respectively
ReplyDeletea. A = 00, CY = 1, Z = 0
b. A = 00, CY = 0, Z = 0
c. A = 00, CY = 1, Z = 1
d. A = 00, CY = 0, Z = 1
Solve this question!
Answer is D cos
Delete00
00
Xor
To get
A=00 cy=0 and zero flag =0 cos it's all zero
In a nutshell, XRA means clear accumulator
Option d is correct
Deleted
Deleted
DeleteThe instruction which is used to double the values of accumulator..
ReplyDeleteA)XRA A
B)ADD
C)SUB
D)ORA A
B) ADD A
DeleteHow sir
DeleteADD
DeleteThe answer is A .
ReplyDeleteas I Eallier solved u could see how I made 00 to be in two places
The answer is A .
ReplyDeleteas I Eallier solved u could see how I made 00 to be in two places