Go to the documentation of this file.
5 #ifndef __PZ80EMU_ADD__
6 #define __PZ80EMU_ADD__
static void ___add8_set_overflow_flag(uint8_t a, uint8_t b, struct z80 *cpu)
sets the overflow flag based on the provided 8-bit operands
Definition: add.c:62
#define CARRY
bit position of CARRY flag
Definition: z80.h:72
z80 memory class
Definition: memory.h:19
word pc
Definition: z80.h:53
void _add_reg16_reg16(word *, word *, struct z80 *)
adds two 16-bit registers together, storing the values in reg1
Definition: add.c:180
#define ZERO
bit position of ZERO flag
Definition: z80.h:78
void _add_a_reg8(struct z80 *, uint8_t *)
adds the contents of a user supplied register to A
Definition: add.c:129
void _add_a_mem(struct z80 *, uint8_t *)
adds the contents of a user supplied register to A
Definition: add.c:153
static void ___add8_set_sign_flag(uint8_t a, uint8_t b, struct z80 *cpu)
sets the sign flag based on the provided 8-bit operands
Definition: add.c:79
#define PARITY_OVERFLOW
bit position of OVERFLOW flag
Definition: z80.h:74
void _adc_a_mem(struct z80 *cpu, uint8_t *memory)
adds contents of A to the contents of a memory address with carry
Definition: add.c:167
void _adc_a_mem(struct z80 *, uint8_t *)
adds contents of A to the contents of a memory address with carry
Definition: add.c:167
#define HALF_CARRY
bit position of HALF CARRY flag
Definition: z80.h:76
z80 CPU data structure and functions
#define SIGN
bit position of SIGN flag
Definition: z80.h:79
static void __add8_set_flags(uint8_t a, uint8_t b, struct z80 *cpu)
wrapper to set all flags based on the provided addition operands
Definition: add.c:112
uint8_t l
low order byte
Definition: z80.h:31
__BEGIN_DECLS void _inc8(uint8_t *, struct z80 *)
increments an 8 bit register
Definition: add.c:202
uint8_t h
high order byte
Definition: z80.h:32
struct word::@0 B
Combination of High and Low bytes in correct order for endianness.
void _add_a_reg8(struct z80 *cpu, uint8_t *reg)
adds the contents of a user supplied register to A
Definition: add.c:129
void _add_reg16_reg16(word *reg1, word *reg2, struct z80 *cpu)
adds two 16-bit registers together, storing the values in reg1
Definition: add.c:180
#define RESET(val, bit)
Resets a bit.
Definition: utils.h:31
word af
Definition: z80.h:54
void _adc_a_reg8(struct z80 *, uint8_t *)
adds the contents of a user supplied register and the carry flag to A
Definition: add.c:141
static void ___add8_set_carry_flag(uint8_t a, uint8_t b, struct z80 *cpu)
sets the carry flag based on the provided 8-bit operands
Definition: add.c:28
uint16_t W
16-bit pair
Definition: z80.h:22
void _inc8(uint8_t *n, struct z80 *cpu)
increments an 8 bit register
Definition: add.c:202
#define SUBTRACT
bit position of SUBTRACT flag
Definition: z80.h:73
type to deal with endianness and access of high/low bits
Definition: z80.h:21
#define IS_SET(val, bit)
Determines if a bit is set or not.
Definition: utils.h:17
void _adc_a_reg8(struct z80 *cpu, uint8_t *reg)
adds the contents of a user supplied register and the carry flag to A
Definition: add.c:141
static void ___add8_set_half_carry_flag(uint8_t a, uint8_t b, struct z80 *cpu)
sets the half carry flag based on the provided 8-bit operands
Definition: add.c:96
void _add_a_mem(struct z80 *cpu, uint8_t *memory)
adds the contents of a user supplied register to A
Definition: add.c:153
static void ___add8_set_zero_flag(uint8_t a, uint8_t b, struct z80 *cpu)
sets the zero flag based on the provided 8-bit operands
Definition: add.c:43
#define SET(val, bit)
Sets a bit.
Definition: utils.h:24