Hyundai GMS800 Instruction Manual page 36

Gms800 series 8-bit single-chip microcomputers
Table of Contents

Advertisement

HYUNDAI MicroElectonics
CMP
( Compare accumulator )

Function
: ( A )
Description : Compare the accumulator with the contents of memory or immediate data.
The results effects N, Z, C and the accumulator and the contents of memory are not changed.

Flag
:
Mnemonic
CMP #imm
CMP dp
CMP dp + X
CMP !abs
CMP !abs + Y
CMP [ dp + X ]
CMP [ dp ] + Y
CMP { X }
Example
:
243 E116 C533
244 E118 4414
245 E11A F0F6
241
247 E11C C533
248 E11E 45BF
249 E120 F0F0
CMPX

Function
: ( X )
Description : Compare the X-register with the contents of memory or immediate data.
The results effects N, Z, C and the X-register and the contents of memory are unchanged.

Flag
:
Mnemonic
CMPX #imm
CMPX dp
CMPX !abs
Example
:
5 E004 1E00
6 E006 C400
7 E008 FB
8 E009 5EC0
9 E00B 70F9
32
( M )
OP Code
44
45
46
47
55
56
57
54
LDA
CMP
BEQ
QMODE
EQU
LDA
CMP
BEQ
( Compare X-register )
( M )
OP Code
5E
6C
7C
LDX
RAM_CLR:
LDA
STA
CMPX
BNE
Bytes
Cycles
2
2
2
3
2
4
3
4
3
5
2
6
2
6
1
3
33H
#14H
OPROG
0BFH
33H
QMODE
OPROG
Bytes
Cycles
2
2
2
3
3
4
#0
; RAM CLEAR (00H-BFH)
#0
{X}+
#0C0H
RAM_CLR

Advertisement

Table of Contents
loading

Table of Contents