KS57C2308/P2308/C2316/P2316
SAM47 INSTRUCTION SET
5-67
LDC
— Load Code Byte
LDC
(Continued)
Examples:
2. The following instructions will load one of four values defined by the define byte (DB) directive
to the extended accumulator:
ORG
0500
DB
66H
DB
77H
DB
88H
DB
99H
DISPLAY
LD
WX,#00H
LDC
EA,@WX
; EA
←
address 0500H = 66H
RET
If the instruction “LD WX,#01H” is executed in place of “LD WX,#00H”, then
EA
←
address 0501H = 77H.
If the instruction “LD WX,#02H” is executed in place of “LD WX,#00H”, then
EA
←
address 0502H = 88H.
3. Normally, the LDC EA, @EA and the LDC EA, @WX instructions reference the table data
on the page on which the instruction is located. If, however, the instruction is located at
address xxFFH, it will reference table data on the next page. In this example, the upper 4 bits
of the address at location 0200H is loaded into register E and the lower 4 bits into register A:
ORG
01FDH
01FDH
LD
WX,#00H
01FFH
LDC
EA,@WX
; E
←
upper 4 bits of 0200H address
; A
←
lower 4 bits of 0200H address
4. Here is another example of page referencing with the LDC instruction:
ORG
0100
DB
67H
SMB
0
LD
HL,#30H
; Even number
LD
WX,#00H
LDC
EA,@WX
; E
←
upper 4 bits of 0100H address
; A
←
lower 4 bits of 0100H address
LD
@HL,EA
; RAM (30H)
←
7, RAM (31H)
←
6
Summary of Contents for KS57C2308
Page 30: ...ADDRESS SPACES KS57C2308 P2308 C2316 P2316 2 22 NOTES ...
Page 168: ...SAM47 INSTRUCTION SET KS57C2308 P2308 C2316 P2316 5 94 NOTES ...
Page 170: ......
Page 206: ...POWER DOWN KS57C2308 P2308 C2316 P2316 8 8 NOTES ...
Page 210: ...RESET KS57C2308 P2308 C2316 P2316 9 4 NOTES ...
Page 222: ...I O PORTS KS57C2308 P2308 C2316 P2316 10 12 NOTES ...
Page 272: ...LCD CONTROLLER DRIVER KS57C2308 P2308 C2316 P2316 12 24 NOTES ...
Page 280: ...SERIAL I O INTERFACE KS57C2308 P2308 C2316 P2316 13 8 NOTES ...
Page 294: ...MECHANICAL DATA KS57C2308 P2308 C2316 P2316 15 2 NOTES ...
Page 310: ...KS57P2308 P2316 OTP KS57C2308 P2308 C2316 P2316 16 16 NOTES ...
Page 318: ......
Page 320: ......
Page 322: ......
Page 325: ......
Page 327: ......