Crossware

Table of Contents        Previous topic       Next topic       

MICROPROCESSOR INSTRUCTION REFERENCE->MOVC

MOVC    Move Code Byte: Move A,@A+<Base Register>

This instruction loads the accumulator with a byte from program memory.  The address of the byte fetched is the sum of the original unsigned eight bit accumulator and the contents of a 16 bit base register which may be either the data pointer or the program counter.  Sixteen bit addition is performed when adding the accumulator to the base register and so a carry of the from the low order byte will propogate through to to the high order byte.

Formats:
    
DescriptionMnemonicBytesCycles
    
Move code byte using data pointer:MOVC A,@A+DPTR12
Move code byte using program counter:MOVC A,@A+PC12

For A,@A+PC, PC is incremented to the address of the following instruction (ie by 1) before being added with the accumulator.

    
PSW flags:CACF0RS1RS0OVP
N/AN/AN/AN/AN/AN/AN/A

(N/A: Not affected)