PZ80emu  0.1
jump.h
Go to the documentation of this file.
1 
6 #ifndef __PZ80EMU_JUMP__
7 #define __PZ80EMU_JUMP__
8 
9 #include <stdbool.h>
10 #include <stdint.h>
11 
12 #include "z80.h"
13 
14 __BEGIN_DECLS
15 void _djnz_n(struct z80 *, uint8_t *);
16 void _jr(struct z80 *, uint8_t *, int, bool);
17 void _jp_nn(struct z80 *, uint8_t *);
18 void _jp_flag_nn(struct z80 *, uint8_t *, int, bool);
19 void _jp_reg(word *, struct z80 *);
20 __END_DECLS
21 
22 #endif
memory
z80 memory class
Definition: memory.h:19
z80::pc
word pc
Definition: z80.h:53
jump.h
_djnz_n
void _djnz_n(struct z80 *cpu, uint8_t *memory)
decrements B, then jumps to the provided memory address if B is 0
Definition: jump.c:15
_jp_flag_nn
void _jp_flag_nn(struct z80 *, uint8_t *, int, bool)
jumps to N if provided conditions are met
Definition: jump.c:82
_jp_nn
void _jp_nn(struct z80 *, uint8_t *)
jumps to an arbitrary memory address
Definition: jump.c:62
z80
Definition: z80.h:51
utils.h
Utility macros.
z80.h
z80 CPU data structure and functions
_jr
void _jr(struct z80 *cpu, uint8_t *memory, int flag, bool n)
adds n to PC if provided conditions are met
Definition: jump.c:37
_jp_flag_nn
void _jp_flag_nn(struct z80 *cpu, uint8_t *memory, int flag, bool n)
jumps to N if provided conditions are met
Definition: jump.c:82
z80::bc
word bc
Definition: z80.h:55
word::l
uint8_t l
low order byte
Definition: z80.h:31
_jr
void _jr(struct z80 *, uint8_t *, int, bool)
adds n to PC if provided conditions are met
Definition: jump.c:37
word::h
uint8_t h
high order byte
Definition: z80.h:32
word::B
struct word::@0 B
Combination of High and Low bytes in correct order for endianness.
_jp_reg
void _jp_reg(word *, struct z80 *)
jumps to the value stored in reg
Definition: jump.c:109
_jp_reg
void _jp_reg(word *reg, struct z80 *cpu)
jumps to the value stored in reg
Definition: jump.c:109
z80::af
word af
Definition: z80.h:54
_jp_nn
void _jp_nn(struct z80 *cpu, uint8_t *memory)
jumps to an arbitrary memory address
Definition: jump.c:62
word::W
uint16_t W
16-bit pair
Definition: z80.h:22
_djnz_n
__BEGIN_DECLS void _djnz_n(struct z80 *, uint8_t *)
decrements B, then jumps to the provided memory address if B is 0
Definition: jump.c:15
word
type to deal with endianness and access of high/low bits
Definition: z80.h:21
IS_SET
#define IS_SET(val, bit)
Determines if a bit is set or not.
Definition: utils.h:17