Keil™, An ARM® Company

Technical Support

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