Connect with us

8085 instruction & 8051 function "RLC"

Discussion in 'Electronics Homework Help' started by swag, May 26, 2015.

Scroll to continue with content
  1. swag


    May 26, 2015
    Does 8085 RLC instruction different from 8051 RLC function?

    It seems to me that 8085 RLC is similar to ~ 8051 RL function
    and 8085 RAL instruction is similar to ~ 8051 RLC function
    Dont know exactly whether am right or wrong, can u plz suggest.
  2. hevans1944

    hevans1944 Hop - AC8NS

    Jun 21, 2012
    Welcome to Electronics Point!

    The 8085 RLC is NOT the same as the 8051 RLC.

    On the 8085, RLC copies bit 7 into the carry bit, as well as into bit 0, all other bits in the accumulator moving left one position. The original value of the carry bit is lost. Think of this as a left rotation of the accumulator with bit 7 copied into the carry bit.

    On the 8051, RLC rotates bit 7 through the carry bit and the carry bit is placed in bit 0. Think of this as a nine-bit left rotation with the ninth bit (the carry bit) being appended as the most significant bit to the accumulator. Thus the original carry bit is preserved in bit 0 after the RLC instruction.

    On the 8085, RLC destroys the original carry bit (because carry become bit 7). On the 8051, RL is a simple rotate of the bits in the accumulator and the carry bit is not affected.

    On the 8085, RAL performs the same function as the 8051 RLC instruction, as you stated.

    Here is a page describing the rotate instructions for the 8085 instruction set. And here is a page describing the 8051 instruction set. A nice slide-show presentation of the 8085 instruction set, with examples, is found here. Beginning at Slide 82, the rotate instructions are described.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day