Download Print this page

Siemens SAB 80515 Series User Manual page 180

8-bit single-chip microcontroller family

Advertisement

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
If the subroutine is called with the accumulator equal to 01 H , it will return with 77 H
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:
1 0 0 1
Bytes:
1
Cycles:
2
Semiconductor Group
A
MOVC
A, @A + PC
RET
DB
66 H
DB
77 H
DB
88 H
DB
99 H
0 0 1 1
*
180
Instruction Set

Advertisement

loading

This manual is also suitable for:

Sab 80c515Sab 80c535Sab 80535Sab 80515k