Nintendo GAME BOY Programming Manual page 115

Hide thumbs Also See for GAME BOY:
Table of Contents

Advertisement

SET
b,
Sets to 1 the specified bit in specified register r.
Example: When A = 80h and L = 3Bh,
SET 3, A ; A ← 0x84
SET 7, L ; L ← 0xBB
SET
Sets to 1 the specified bit in the memory contents specified by registers H and L.
Example: When 00h is the memory contents specified by H and L,
SET 3, (HL) ; (HL) ← 04H
RES
Resets to 0 the specified bit in the specified register r.
Example: When A = 80h and L = 3Bh,
RES 7, A ; A ← 00h
RES 1, L ; L ← 39h
RES
b,
Resets to 0 the specified bit in the memory contents specified by registers H and L.
Example: When 0xFF is the memory contents specified by H and L,
RES 3, (HL) ; (HL) ← F7h
← 1
r
r
b
← 1
b,
(HL)
(HL)
b
← 0
b,
r
r
b
← 0
(HL)
(HL)
b
CY
H
--
--
--
CY
H
--
--
--
CY
H
--
--
--
CY
H
N
--
--
--
115
Chapter 4: CPU Instruction Set
N
Z
CYCL
7 6
5 4 3
--
2
11
11
N
Z
CYCL
7 6
5 4 3
--
4
11
001
11
N
Z
CYCL
7 6
5 4 3
--
2
11
001
10
Z
CYCL
7 6
5 4 3
--
4
11
001
10
2 1 0
001
011
b
r
2 1 0
011
b
110
2 1 0
011
b
r
2 1 0
011
b
110

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents