PZ80emu  0.1
Functions
jump.c File Reference
#include "jump.h"
#include "utils.h"
Include dependency graph for jump.c:

Functions

void _djnz_n (struct z80 *cpu, uint8_t *memory)
 decrements B, then jumps to the provided memory address if B is 0 More...
 
void _jr (struct z80 *cpu, uint8_t *memory, int flag, bool n)
 adds n to PC if provided conditions are met More...
 
void _jp_nn (struct z80 *cpu, uint8_t *memory)
 jumps to an arbitrary memory address More...
 
void _jp_flag_nn (struct z80 *cpu, uint8_t *memory, int flag, bool n)
 jumps to N if provided conditions are met More...
 
void _jp_reg (word *reg, struct z80 *cpu)
 jumps to the value stored in reg More...
 

Detailed Description

Author
Peter H. Ezetta

Function Documentation

◆ _djnz_n()

void _djnz_n ( struct z80 cpu,
uint8_t *  memory 
)

decrements B, then jumps to the provided memory address if B is 0

Parameters
cpuz80 CPU object
memorypointer to allocated memory

◆ _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

Parameters
cpuz80 CPU object
memorypointer to allocated block of memory
flagCPU flag to operate on
nwhether the flag must be set or unset

_jp_flag_nn() will jump to the user provided value from memory in the event that the state of the provided flag matches the provided value of N.

◆ _jp_nn()

void _jp_nn ( struct z80 cpu,
uint8_t *  memory 
)

jumps to an arbitrary memory address

Parameters
cpuz80 CPU object
memorypointer to allocated memory

◆ _jp_reg()

void _jp_reg ( word reg,
struct z80 cpu 
)

jumps to the value stored in reg

Parameters
regregister containing value to jump to
cpuz80 cpu object

◆ _jr()

void _jr ( struct z80 cpu,
uint8_t *  memory,
int  flag,
bool  n 
)

adds n to PC if provided conditions are met

Parameters
cpuz80 CPU object
memorypointer to allocated block of memory
flagCPU flag to operate on
nwhether the flag must be set or unset

_jr() will add the user provided value from memory to PC in the event that the state of the provided flag matches the provided value of N.