HYUNDAI MicroElectonics
44
LDY
( Load Y-register )
Function
: Y
( M )
Description : The Y-register is loaded with contents of the specified memory or of the immediate data.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
LDY #imm
3E
2
2
LDY dp
C9
2
3
LDY dp + X
D9
2
4
LDY !abs
D8
3
4
Example
:
28
STROBE_PORT
EQU
0C2H
; R1 PORT
29
LED_PORT
EQU
0C4H
; R2 PORT
30
SEG_POINTER
EQU
21H
31
SEG1
EQU
22H
32
33
34 F01A E4FFC2
LDM
STROBE_PORT,#0FFH
;Segment All Turn Off
35 F01D CC21
LDX
SEG_POINTER
;Segment Pattern Data Output
36 F01F D922
LDY
SEG1+X
37 F021 D526F0
LDA
!FONT+Y
38 F024 E5C4
STA
LED_PORT
39
40 F026 C0
FONT
DB
0C0H,0F9H,0A4H,0B0H,99H,92H,82H,0D8H,080H,090H
F027 F9
F028 A4
F029 B0
F02A 99
F02B 92
F02C 82
F02D D8
F02E 80
F02F 90
LDYA
( Load YA - 16bit accumulator )
Function
: YA
( dp +1 ) ( dp )
Description : The 16 bit accumulator(YA) is loaded with contents of specified memory pair.
Flag
:
Mnemonic
OP Code
Bytes
Cycles
LDYA dp
7D
2
5
Example
:
416 C17A E4FF38
LDM
38H,#0FFH
417 C17D E4AA39
LDM
39H,#0AAH
418 C180 7D38
LDYA
38H
419 C182 DE
XAY