Consider the following assembly language program for a hypothetical processor A, B, and C are 8 bit registers. The meanings of various instructions are shown as comments.
If the initial value of register A is A0 the value of register B after the program execution will be
Dear Arjun sir
I have a very stupid doubt here. Please pardon my ignorance.
First time the value of C will be 8 ==> 1000
Now , after SUB C,#1 , value of C will be 7 ==> 0111
Now , will the RRC be 1011 ? so , B will be 0+1 = 1
After this C will be 7 ( CMP C,#0 will be zero flag false ) , now C <- C-1 , so C is 6 , 0110 ,
Now , RRC will be 0011 , so B will not be incremented.
Will this program flow happen in this way ?
yes yes , sorry ...
Can u pls explain what is happening in line
Carry Flad =0 Regiser A = 10010
After RRC 010010
When does carry flag set?