GMS82512/16/24
16-Bit Operation
HYUNDAI MicroElectronics
OP
CODE
BYTE CYCLE
FLAG
NVGBHIZC
NO.
MNENONIC
OPERATION
NO.
NO
1
2
ADDW dp
CMPW dp
1D
5D
2
5
NV - - H - ZC
N - - - - - ZC
16-bits add without carry : YA ꢀ YA + (dp+1)(dp)
Compare YA contents with memory pair contents :
YA - (dp+1)(dp)
2
4
3
4
5
6
7
DECW dp
INCW dp
LDYA dp
STYA dp
SUBW dp
BD
9D
7D
DD
3D
2
2
2
2
2
6
6
5
5
5
N - - - - - Z -
N - - - - - Z -
N - - - - - Z -
- - - - - - - -
Decrement memory pair : (dp+1)(dp)ꢀ{(dp+1)(dp)} - 1
Increment memory pair : (dp+1)(dp) ꢀ {(dp+1)(dp)} + 1
Load YA : YA ꢀ (dp+1)(dp)
Store YA : (dp+1)(dp) ꢀ YA
NV - - H - ZC
16-bits substract without carry : YA ꢀ YA - (dp+1)(dp)
Bit Manipulation
OP
CODE
BYTE CYCLE
FLAG
NVGBHIZC
NO.
MNENONIC
OPERATION
NO.
3
3
2
3
2
2
1
1
1
3
3
3
3
3
3
3
2
2
1
1
3
3
3
NO
4
4
4
5
4
2
2
2
2
5
5
4
4
5
5
5
4
2
2
2
6
6
6
1
2
AND1 M.bit
AND1B M.bit
BIT dp
8B
8B
0C
1C
y1
- - - - - - - C
- - - - - - - C
Bit AND C-flag : C ꢀ C ꢄ (M.bit)
Bit AND C-flag and NOT : C ꢀ C ꢄ (M.bit)
Bit test A with memory :
3
MM - - - - Z -
4
BIT !abs
Z ꢀ A ꢄ M, N ꢀ (M7), V ꢀ (M6)
5
CLR1 dp.bit
CLR1A A.bit
CLRC
- - - - - - - -
- - - - - - - -
- - - - - - - 0
- - 0 - - - - -
- 0 - - 0 - - -
- - - - - - - C
- - - - - - - C
- - - - - - - C
- - - - - - - C
- - - - - - - -
- - - - - - - C
- - - - - - - C
- - - - - - - -
- - - - - - - -
- - - - - - - 1
- - 1 - - - - -
- - - - - - - -
N - - - - - Z -
N - - - - - Z -
Clear bit : (M.bit) ꢀ “0”
6
2B
20
Clear A.bit : (A.bit) ꢀ “0”
7
Clear C-flag : C ꢀ “0”
8
CLRG
40
Clear G-flag : G ꢀ “0”
9
CLRV
80
Clear V-flag : V ꢀ “0”
10
11
12
13
14
15
16
17
18
19
20
21
22
23
EOR1 M.bit
EOR1B M.bit
LDC M.bit
LDCB M.bit
NOT1 M.bit
OR1 M.bit
OR1B M.bit
SET1 dp.bit
SETA1 A.bit
SETC
AB
AB
CB
CB
4B
6B
6B
x1
Bit exclusive-OR C-flag : C ꢀ C (M.bit)
Bit exclusive-OR C-flag and NOT : C ꢀ C (M.bit)
Load C-flag : C ꢀ (M.bit)
Load C-flag with NOT : C ꢀ (M.bit)
Bit complement : (M.bit) ꢀ (M.bit)
Bit OR C-flag : C ꢀ C V (M.bit)
Bit OR C-flag and NOT : C ꢀ C V (M.bit)
Set bit : (M.bit) ꢀ “1”
0B
A0
C0
EB
5C
3C
Set A.bit : (A.bit) ꢀ “1”
Set C-flag : C ꢀ “1”
SETG
Set G-flag : G ꢀ “1”
STC M.bit
TCLR1 !abs
TSET1 !abs
Store C-flag : (M.bit) ꢀ C
Test and clear bits with A :ꢆA - (M), (M) ꢀ (M) ꢄ (A)
Test and set bits with A :ꢆA - (M), (M) ꢀ (M) V (A)
xvii
FEB. 2000 Ver 1.00