Difference between revisions of "XOR"

From GbdevWiki
Jump to: navigation, search
(Created page with 'The logical exclusive-OR operation is performed between the byte specified by the operand and the byte contained in the Accumulator; the result is stored in the Accumulator. == …')
 
 
Line 1: Line 1:
 +
{{Opcode}}
 +
 
The logical exclusive-OR operation is performed between the byte specified by the operand and the byte contained in the Accumulator; the result is stored in the Accumulator.
 
The logical exclusive-OR operation is performed between the byte specified by the operand and the byte contained in the Accumulator; the result is stored in the Accumulator.
  

Latest revision as of 09:19, 25 May 2012

This is an article about the GB-Z80 CPU.

Opcodes:

Arithmetic and logical: ADD - ADD (16-bit) including LD HL,SP+nn - ADC - AND - CP - CPL - DAA - DEC - DEC and INC (16-bit) - INC - SBC - SUB - OR - XOR
Conditional: CALL - JP - JR - RET
Load: LD (8-bit) - LD (16-bit)
Extended Set: BIT - RES - RL - RLC - RR - RRC - SET - SLA - SRA - SRL - SWAP

The logical exclusive-OR operation is performed between the byte specified by the operand and the byte contained in the Accumulator; the result is stored in the Accumulator.

Instructions

XOR B    - $A8 - 1 Machine Cycle
XOR C    - $A9 - 1 Machine Cycle
XOR D    - $AA - 1 Machine Cycle
XOR E    - $AB - 1 Machine Cycle
XOR H    - $AC - 1 Machine Cycle
XOR L    - $AD - 1 Machine Cycle
XOR (HL) - $AE - 2 Machine Cycles
XOR A    - $AF - 1 Machine Cycle
XOR $NN  - $EE - 2 Machine Cycles

Flags

Z: 1 if result is zero; 0 otherwise
N: 0
H: 0
C: 0