SAB80C517-M16 SIEMENS [Siemens Semiconductor Group], SAB80C517-M16 Datasheet - Page 221

no-image

SAB80C517-M16

Manufacturer Part Number
SAB80C517-M16
Description
8-Bit CMOS Single-Chip Microcontroller
Manufacturer
SIEMENS [Siemens Semiconductor Group]
Datasheet
MOVC
Function:
Description:
Example:
MOVC
Operation:
Encoding:
Bytes:
Cycles:
Semiconductor Group
A, @A + <base-reg>
A, @A + DPTR
Move code byte
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.
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)
1
2
1 0 0 1
((A) + (DPTR))
MOVC
RET
DB
DB
DB
DB
0 0 1 1
A
A, @A + PC
66H
77H
88H
99H
222
Instruction Set

Related parts for SAB80C517-M16