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?
@ Preety singhal
you can assume any initial value of register content A (i.e: the content of Ao )
like...suppose A = 00101101 or whatever you want can assume.and at last when we execute this program the register content of B will be the total number of 1's which are present in register A.( in this case at last content of register B will be 4, because 4, 1's are present in register A )
And one more thing u can also assume initial carry either 0 or 1.
There is one more problem. Ppl who have...