Samsung KS57C2308 Manual page 141

Single-chip cmos microcontroller
Table of Contents

Advertisement

KS57C2308/P2308/C2316/P2316
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:
DISPLAY
If the instruction "LD WX,#01H" is executed in place of "LD WX,#00H", then
EA
If the instruction "LD WX,#02H" is executed in place of "LD WX,#00H", then
EA
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:
01FDH
01FFH
4. Here is another example of page referencing with the LDC instruction:
ORG
0500
DB
66H
DB
77H
DB
88H
DB
99H
LD
WX,#00H
LDC
EA,@WX
RET
address 0501H = 77H.
address 0502H = 88H.
ORG
01FDH
LD
WX,#00H
LDC
EA,@WX
ORG
0100
DB
67H
SMB
0
LD
HL,#30H
LD
WX,#00H
LDC
EA,@WX
LD
@HL,EA
; EA
address 0500H = 66H
; E
upper 4 bits of 0200H address
; A
lower 4 bits of 0200H address
; Even number
; E
upper 4 bits of 0100H address
; A
lower 4 bits of 0100H address
; RAM (30H)
7, RAM (31H)
SAM47 INSTRUCTION SET
6
5-67

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

P2308C2316P2316Ks57p2308Ks57c2316Ks57p2316

Table of Contents