Go to the documentation of this file.
6 #ifndef __PZ80EMU_STACK__
7 #define __PZ80EMU_STACK__
16 void _ret(
struct z80 *, uint8_t *);
21 void _rst(
struct z80 *, uint8_t *, uint16_t);
word sp
Definition: z80.h:65
z80 memory class
Definition: memory.h:19
word pc
Definition: z80.h:53
void _ret(struct z80 *cpu, uint8_t *memory)
return from a call
Definition: stack.c:50
void _push(word *reg, struct z80 *cpu, uint8_t *memory)
pushes the value of a register to the stack
Definition: stack.c:138
void _call_nn(struct z80 *, uint8_t *)
calls the function at memory address NN
Definition: stack.c:117
void _call_nn(struct z80 *cpu, uint8_t *memory)
calls the function at memory address NN
Definition: stack.c:117
void _rst(struct z80 *, uint8_t *, uint16_t)
saves PC to the stack, then sets a new PC
Definition: stack.c:153
void _push(word *, struct z80 *, uint8_t *)
pushes the value of a register to the stack
Definition: stack.c:138
void _ret(struct z80 *, uint8_t *)
return from a call
Definition: stack.c:50
void _ret_flag(struct z80 *cpu, uint8_t *memory, int flag, bool n)
returns from a call based on state of CPU flag
Definition: stack.c:17
z80 CPU data structure and functions
uint8_t l
low order byte
Definition: z80.h:31
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 _pop(word *, struct z80 *, uint8_t *)
pop a value off the stack into a register
Definition: stack.c:69
void _call_flag_nn(struct z80 *, uint8_t *, int, bool)
make a function call based on status of CPU flags
Definition: stack.c:85
void _pop(word *reg, struct z80 *cpu, uint8_t *memory)
pop a value off the stack into a register
Definition: stack.c:69
void _rst(struct z80 *cpu, uint8_t *memory, uint16_t pc)
saves PC to the stack, then sets a new PC
Definition: stack.c:153
word af
Definition: z80.h:54
__BEGIN_DECLS void _ret_flag(struct z80 *, uint8_t *, int, bool)
returns from a call based on state of CPU flag
Definition: stack.c:17
uint16_t W
16-bit pair
Definition: z80.h:22
void _call_flag_nn(struct z80 *cpu, uint8_t *memory, int flag, bool n)
make a function call based on status of CPU flags
Definition: stack.c:85
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