HYUNDAI MicroElectonics
14
12-bit Address Space Memory Bit Operation
M.bit
Operand composes the lower 8bit of 12bits address, the lower 4bits of operand indicate the upper 4bits of
12bits address, also bit position of memory is determined by upper 3 bits of operand 2, bit4 of operand
indicates reversal. The addressing memory space is 4k bytes in 000h~FFFh.
OP CODE
Lower Address Upper Address
Operand
Instructions
C,Memory
AND1
AND1B
EOR1
EOR1B
LDC
LDCB
OR1
OR1B
STC
Memory
NOT1
Example)
( C=1, (135h)=00
h
)
8B 35 51
AND1B 135H.2
1.9. 16 Bit Operation Mode
dp
2nd byte of instruction(operand) is offset address in direct page, the contents of memory pair in its page is
determined to data. Direct page is selected by G-flag (G-flag is changeable by SETG, CLRG).
OP CODE
dp
Operand
Instructions
YA,Memory
ADDW
CMPW
LDYA
STYA
SUBW
Memory
DECW
INCW
Example)
( G=1 )
1D 35
ADDW 35H
C
←
C
“
1
”
“
0
”
reverse
1
0
1
0
1
h
Operand 2
Op code ( 8B )
Operand( 35 )
MEMORY
Operand( 51 )
135
h
Data ( 00 )
0
0
0
0
0
0
0
0
0135
h
Data2 ( AA )
136
h
Op code ( 1D )
Operand ( 35 )
MEMORY
YA
←
YA+
AA55
h
0 Page
000
h
0FF
h
100
h
Data1 ( 55 )
135
h
1FF
h
0 Page
1 Page