English
Language : 

SAB80515 Datasheet, PDF (180/270 Pages) Siemens Semiconductor Group – 8-Bit Single-Chip Microcontroller Family
Instruction Set
MOVC A, @A + <base-reg>
Function:
Move code byte
Description:
The MOVC instructions load the accumulator with a code byte, or constant from
program memory. The address of the byte fetched is the sum of the original
unsigned eight-bit accumulator contents and the contents of a sixteen-bit base
register, which may be either the data pointer or the PC. In the latter case, the PC
is incremented to the address of the following instruction before being added to the
accumulator; otherwise the base register is not altered. Sixteen-bit addition is
performed so a carry-out from the low-order eight bits may propagate through
higher-order bits. No flags are affected.
Example:
A value between 0 and 3 is in the accumulator. The following instructions will
translate the value in the accumulator to one of four values defined by the DB
(define byte) directive.
REL_PC: INC
A
MOVC
A, @A + PC
RET
DB
66H
DB
77H
DB
88H
DB
99H
If the subroutine is called with the accumulator equal to 01H, it will return with 77H
in the accumulator. The INC A before the MOVC instruction is needed to ”get
around” the RET instruction above the table. If several bytes of code separated the
MOVC from the table, the corresponding number would be added to the
accumulator instead.
MOVC A, @A + DPTR
Operation:
MOVC
(A) ← ((A) + (DPTR))
Encoding:
Bytes:
Cycles:
1 0 0 1 0 01 1
1
2
Semiconductor Group
180