Lecture 26
Lecture 26
0 0 D D D 1 0 1 N
It has 7 variations in this all the flags are affected except carry flag.
The micro RTL flow implemented is given below:
Machine Cycle- 1:
OFMC: Status signals IO/M=0, S1=1, S0=1
T1: A15-A8 (PCH), AD7-AD0 (PCL), ALE =
0 0 1 1 0 1 0 1 N
It has no variations. All the flags are affected except carry flag. The
micro RTL flow implemented is given below:
Machine Cycle- 1:
OFMC: Status signals IO/M=0, S1=1, S0=1
T1: A15-A8 (PCH), AD7-AD0 (PCL), ALE =
0 0 R P 0 0 1 1 N
It has 4 variations for register pairs (B,C), (D,E), (H,L) and 16-bit
register (SP). No flag is affected in this instruction. It is register
addressing mode. The micro RTL flow implemented is given below:
Machine Cycle- 1:
OFMC: Status signals IO/M=0, S1=1, S0=1
T1: A15-A8 (PCH), AD7-AD0 (PCL), ALE =
0 0 R P 1 0 1 1 N
It has 4 variations for register pairs (B,C), (D,E), (H,L) and 16-bit
register (SP). No flag is affected in this instruction. It is register
addressing mode. The micro RTL flow implemented is given below:
Machine Cycle- 1:
OFMC: Status signals IO/M=0, S1=1, S0=1
T1: A15-A8 (PCH), AD7-AD0 (PCL), ALE =
0 0 R P 1 0 0 1 N
It has 4 variations for register pairs (B,C), (D,E), (H,L) and 16-bit
register (SP). Only CY flag is affected in this instruction. It is register
addressing mode. Since the instruction is a single byte instruction,
therefore, only one memory reference operation is required. To add
two 16-bit numbers, two 8-bit operations are required one by one
which need two machine cycles. These operations cannot be
completed during FEO (where only two extra states are available)
and, therefore, two Bus Idle Machine Cycles (BIMC) are required.
The micro RTL flow implemented is given below:
Machine Cycle- 1:
OFMC: Status signals IO/M=0, S1=1, S0=1
T1: A15-A8 (PCH), AD7-AD0 (PCL), ALE =
Machine Cycle- 2:
BIMC: Status signals IO/M=0, S1=1, S0=0
T1: (W) (A), (Z) (F)
T2: (A) (rpL), (Temp) (L)
T3: (L) (L) + (Temp), CY flag is affected as per result
Machine Cycle- 3:
BIMC: Status signals IO/M=0, S1=1, S0=0
T1: (A) (rpH), (Temp) (H)
T2: (H) (A) + (Temp) + (CY)
T3: (A) (W), (F) (Z), All flags are restored except CY.
Therefore, the instruction requires three machine cycles OFMC & teo
BIMC and a total of 10 states.
DAD H is one important instruction. The macro RTL implemented is
(H, L) (H, L) + (H, L)
The meaning of this multiplying the 16-bit contents of (H,L) by 2. It
actually shifts all the 16 bits of (H, L) register pair to left by one bit
position.
A7 A6 A5 A4 A3 A2 A1 A0
CY AC
Fig.5.16 CY Flag, AC Flag and Both Nibbles checked for DAA Instruction
0 0 1 0 0 1 1 1 N
Therefore, the instruction requires only one machine cycle OFMC and
a total of 4 states.