Nintendo GAME BOY Programming Manual page 105

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

Examples: When A = 5Ah, (HL) = 0Fh,
OR A
;
OR 3
;
OR (HL) ; A ← 5Fh, Z ← 0
XOR
Takes the logical exclusive-OR for each bit of the contents of operand s and register A. and stores the
results in register A. r, n, and (HL) are used for operand s.
Examples: When A = FFh and (HL) = 8Ah,
XOR A ; A ← 00h, Z ← 1
XOR 0x0F ; A ← F0h, Z ← 0
XOR (HL) ; A ← 75h, Z ← 0
CP
s
Compares the contents of operand s and register A and sets the flag if they are equal.
r, n, and (HL) are used for operand s.
OR
r
OR
n
OR
(HL)
A ← 5Ah, Z ← 0
A ← 5Bh, Z ← 0
A ⊕ s
s
XOR
r
XOR
n
XOR
(HL)
A  s
CYCL
7
6
5
4
3
2
1
10
110
2
11
110
110
n
2
10
110
110
CY
H
0
0
0
CYCL
7
6
5
4
3
2
1
10
101
r
2
11
101
110
n
2
10
101
110
CY
H
*
*
1
105
Chapter 4: CPU Instruction Set
1
0
r
N
Z
CYCL
7 6
5 4 3
*
--
--
1
0
N
Z
CYCL
7 6
5 4 3
*
--
--
2 1 0
--
--
2 1 0
--
--

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents