Maverickmax
Advanced Member level 1
Hi
I want to make sure that Im right the codes espeically RLC:
I understand that C denotes as Carry so every loop, the single on the left of A (FF#) will be shifted and the bit will be stored in the Carry bit.
What happen to the right bit? will zero appear in the far right end of the A?
For example
11111111 c=0
11111110 c=1
11111100 c=1
11111000 c=1
11110000 c=1
11100000 c=1
11000000 c=1
10000000 c=1
00000000 c=1
Is my example correct?
Maverick Max
I want to make sure that Im right the codes espeically RLC:
Code:
SIGNAL EQU P1.0;
LOOP: MOV B,#8
MOV A,#FFH
RLC A
MOV SIGNAL,C
DJNZ B,LOOP
I understand that C denotes as Carry so every loop, the single on the left of A (FF#) will be shifted and the bit will be stored in the Carry bit.
What happen to the right bit? will zero appear in the far right end of the A?
For example
11111111 c=0
11111110 c=1
11111100 c=1
11111000 c=1
11110000 c=1
11100000 c=1
11000000 c=1
10000000 c=1
00000000 c=1
Is my example correct?
Maverick Max