Question 61
The contents of the flag register after execution of the following program by 8085 microprocessor will be
Program
SUB A
MVI B,(01)H
DCR B
HLT
Step-by-Step Solution
Detailed Explanation:
SUB A clears A to 00.
DCR B decrements B from 01 to 00.
$8085 flags set: Z=1, P=1, AC=1, S=0, CY unchanged (0).$
$Flag byte format [S Z X AC X P X CY] = 0 1 0 1 0 1 0 0 = 54H.$