SAM47 INSTRUCTION SET KS57C2308/P2308/C2316/P2316
5-66
LDC Load Code Byte
LDC dst,src
Operation: Operand Operation Summary Bytes Cycles
EA,@WX Load code byte from WX to EA 1 3
EA,@EA Load code byte from EA to EA 1 3
Description: This instruction is used to load a byte from program memory into an extended accumulator. The
address of the byte fetched is the 6 highest bit values in the program counter and the contents of
an 8-bit working register (either WX or EA). The contents of the source are unaffected.
Operand Binary Code Operation Notation
EA,@WX 11001100EA [PC13–8 + (WX)]
EA,@EA 11001000EA [PC13–8 + (EA)]
Examples: 1. The following instructions will load one of four values defined by the define byte (DB) directive
to the extended accumulator:
LD EA,#00H
CALL DISPLAY
JPS MAIN
ORG 0500H
DB 66H
DB 77H
DB 88H
DB 99H
DISPLAY LDC EA,@EA ;EA address 0500H = 66H
RET
If the instruction “LD EA,#01H” is executed in place of “LD EA,#00H”, The content of 0501H
(77H) is loaded to the EA register. If “LD EA,#02H” is executed, the content of address 0502H
(88H) is loaded to EA.