Following program finds absolute value of N:
MVI A, N
ORA A
JM ONE
OUT 01H
HLT
ONE: P
Q
OUT 01 H
HLT
The instruction of P and Q must be:
1
CMA and ADI 00H
2
CMC and ADI 00H
3
INR A and CMC
4
INR A and CMA
Following program finds absolute value of N:
MVI A, N
ORA A
JM ONE
OUT 01H
HLT
ONE: P
Q
OUT 01 H
HLT
The instruction of P and Q must be: