gc80c520a CORERIVER Semiconductor, gc80c520a Datasheet - Page 133

no-image

gc80c520a

Manufacturer Part Number
gc80c520a
Description
Midas1.0 Family Mask Rom/eprom/romless 8-bit Turbo Microcontrollers
Manufacturer
CORERIVER Semiconductor
Datasheet
MOVC
MOVC A, @A + DPTR
Description:
Operation:
Encoding:
Function:
Example:
MiDAS1.0 Family
A, @A + <base-reg>
Cycles:
Bytes:
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 with 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:
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.
1
2
MOV
(A)
1
0
((A) + (DPTR))
0
1
INC
MOVC A, @A+PC
RET
DB
DB
DB
DB
0 0 1 1
Page 133 of 187
A
66h
77h
88h
99h

Related parts for gc80c520a