GBZ80(7) | Miscellaneous Information Manual | GBZ80(7) |

`OR A,B`

`OR B`

`r8`- Any of the 8-bit registers (
**A**,**B**,**C**,**D**,**E**,**H**,**L**). `r16`- Any of the general-purpose 16-bit registers
(
**BC**,**DE**,**HL**). `n8`- 8-bit integer constant.
`n16`- 16-bit integer constant.
`e8`- 8-bit offset
(
**-****128**to**127**). `u3`- 3-bit unsigned integer constant
(
**0**to**7**). `cc`- Condition codes:
**Z**:- Execute if Z is set.
**NZ**:- Execute if Z is not set.
**C**:- Execute if C is set.
**NC**:- Execute if C is not set.

`vec`- One of the
`RST`vectors (**0x00**,**0x08**,**0x10**,**0x18**,**0x20**,**0x28**,**0x30**and**0x38**).

- ADC A,r8
- ADC A,[HL]
- ADC A,n8
- ADD A,r8
- ADD A,[HL]
- ADD A,n8
- AND A,r8
- AND A,[HL]
- AND A,n8
- CP A,r8
- CP A,[HL]
- CP A,n8
- DEC r8
- DEC [HL]
- INC r8
- INC [HL]
- OR A,r8
- OR A,[HL]
- OR A,n8
- SBC A,r8
- SBC A,[HL]
- SBC A,n8
- SUB A,r8
- SUB A,[HL]
- SUB A,n8
- XOR A,r8
- XOR A,[HL]
- XOR A,n8

- RL r8
- RL [HL]
- RLA
- RLC r8
- RLC [HL]
- RLCA
- RR r8
- RR [HL]
- RRA
- RRC r8
- RRC [HL]
- RRCA
- SLA r8
- SLA [HL]
- SRA r8
- SRA [HL]
- SRL r8
- SRL [HL]

- LD r8,r8
- LD r8,n8
- LD r16,n16
- LD [HL],r8
- LD [HL],n8
- LD r8,[HL]
- LD [r16],A
- LD [n16],A
- LD [$FF00+n8],A
- LD [$FF00+C],A
- LD A,[r16]
- LD A,[n16]
- LD A,[$FF00+n8]
- LD A,[$FF00+C]
- LD [HL+],A
- LD [HL-],A
- LD A,[HL+]
- LD A,[HL-]

- ADD HL,SP
- ADD SP,e8
- DEC SP
- INC SP
- LD SP,n16
- LD [n16],SP
- LD HL,SP+e8
- LD SP,HL
- POP AF
- POP r16
- PUSH AF
- PUSH r16

**Z**: Set if result is 0.**N**: 0**H**: Set if overflow from bit 3.**C**: Set if overflow from bit 7.

**Z**: Set if result is 0.**N**: 0**H**: Set if overflow from bit 3.**C**: Set if overflow from bit 7.

**N**: 0**H**: Set if overflow from bit 11.**C**: Set if overflow from bit 15.

**Z**: 0**N**: 0**H**: Set if overflow from bit 3.**C**: Set if overflow from bit 7.

**Z**: Set if result is 0.**N**: 0**H**: 1**C**: 0

**Z**: Set if the selected bit is 0.**N**: 0**H**: 1

**N**: 0**H**: 0**C**: Complemented.

**Z**: Set if result is 0.**N**: 1**H**: Set if no borrow from bit 4.**C**: Set if no borrow (set if`r8`>**A**).

**N**: 1**H**: 1

**Z**: Set if result is 0.**H**: 0**C**: Set or reset depending on the operation.

**Z**: Set if result is 0.**N**: 1**H**: Set if no borrow from bit 4.

**Z**: Set if result is 0.**N**: 0**H**: Set if overflow from bit 3.

**Z**: 0**N**: 0**H**: Set if overflow from bit 3.**C**: Set if overflow from bit 7.

**Z**: Set if result is 0.**N**: 0**H**: 0**C**: 0

C <- [7 <- 0] <- C

Cycles: 2
Bytes: 2
Flags:
**Z**: Set if result is 0.**N**: 0**H**: 0**C**: Set according to result.

C <- [7 <- 0] <- C

Cycles: 4
Bytes: 2
Flags: See RL r8
C <- [7 <- 0] <- C

Cycles: 1
Bytes: 1
Flags:
**Z**: 0**N**: 0**H**: 0**C**: Set according to result.

C <- [7 <- 0] <- [7]

Cycles: 2
Bytes: 2
Flags:
**Z**: Set if result is 0.**N**: 0**H**: 0**C**: Set according to result.

C <- [7 <- 0] <- [7]

Cycles: 4
Bytes: 2
Flags: See RLC r8
C <- [7 <- 0] <- [7]

Cycles: 1
Bytes: 1
Flags:
**Z**: 0**N**: 0**H**: 0**C**: Set according to result.

C -> [7 -> 0] -> C

Cycles: 2
Bytes: 2
Flags:
**Z**: Set if result is 0.**N**: 0**H**: 0**C**: Set according to result.

C -> [7 -> 0] -> C

Cycles: 4
Bytes: 2
Flags: See RR r8
C -> [7 -> 0] -> C

Cycles: 1
Bytes: 1
Flags:
**Z**: 0**N**: 0**H**: 0**C**: Set according to result.

[0] -> [7 -> 0] -> C

Cycles: 2
Bytes: 2
Flags:
**Z**: Set if result is 0.**N**: 0**H**: 0**C**: Set according to result.

[0] -> [7 -> 0] -> C

Cycles: 4
Bytes: 2
Flags: See RRC r8
[0] -> [7 -> 0] -> C

Cycles: 1
Bytes: 1
Flags:
**Z**: 0**N**: 0**H**: 0**C**: Set according to result.

**Z**: Set if result is 0.**N**: 1**H**: Set if no borrow from bit 4.**C**: Set if no borrow (set if`r8`>**A**).

**N**: 0**H**: 0**C**: 1

C <- [7 <- 0] <- 0

Cycles: 2
Bytes: 2
Flags:
**Z**: Set if result is 0.**N**: 0**H**: 0**C**: Set according to result.

C <- [7 <- 0] <- 0

Cycles: 4
Bytes: 2
Flags: See SLA r8
[7] -> [7 -> 0] -> C

Cycles: 2
Bytes: 2
Flags:
**Z**: Set if result is 0.**N**: 0**H**: 0**C**: Set according to result.

[7] -> [7 -> 0] -> C

Cycles: 4
Bytes: 2
Flags: See SRA r8
0 -> [7 -> 0] -> C

Cycles: 2
Bytes: 2
Flags:
**Z**: Set if result is 0.**N**: 0**H**: 0**C**: Set according to result.

0 -> [7 -> 0] -> C

Cycles: 4
Bytes: 2
Flags: See SRA r8
**Z**: Set if result is 0.**N**: 1**H**: Set if no borrow from bit 4.**C**: Set if no borrow (set if`r8`>**A**).

**Z**: Set if result is 0.**N**: 0**H**: 0**C**: 0

**Z**: Set if result is 0.**N**: 0**H**: 0**C**: 0

January 26, 2018 | RGBDS Manual |