Keil Logo

A51: MOVING CARRY BIT INTO ACCUMULATOR


Information in this article applies to:

  • C51 All Versions

QUESTION

I want to move the carry bit into the accumulator in 8051 assembly, but I keep getting a syntax error. What instruction should I use?

ANSWER

The Intel data book uses the syntax CY for carry bit. However, the Keil assembler uses C for the carry bit. To correctly implement this instruction in A51, use the following code:

MOV     ACC.0, C

MORE INFORMATION

  • Refer to MOV in the 8051 Instruction Set Manual.

Last Reviewed: Thursday, September 22, 2005


Did this article provide the answer you needed?
 
Yes
No
Not Sure
 
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.