PZ80emu  0.1
Functions
sub.h File Reference
#include "z80.h"
Include dependency graph for sub.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

__BEGIN_DECLS void _dec8 (uint8_t *, struct z80 *)
 decrements an 8-bit register More...
 
void _sub_a_reg8 (struct z80 *, uint8_t *)
 subtracts reg from the A register More...
 
void _sub_a_mem (struct z80 *, uint8_t *)
 subtracts the contents of a memory address from the A register More...
 
void _sbc_a_reg8 (struct z80 *, uint8_t *)
 subtracts an 8-bit register from the A register with carry More...
 
void _cp (uint8_t *, struct z80 *)
 set flags as if operand was subtracted from A More...
 

Detailed Description

Author
Peter H. Ezetta

Function Documentation

◆ _cp()

void _cp ( uint8_t *  reg,
struct z80 cpu 
)

set flags as if operand was subtracted from A

Parameters
regregister to subtract from A
cpuz80 CPU object

The CP instruction sets the flags as if the operand to CP were subtracted from the A register, however the subtraction does not actually occur, and the original value of A is left untouched.

Here is the call graph for this function:

◆ _dec8()

__BEGIN_DECLS void _dec8 ( uint8_t *  n,
struct z80 cpu 
)

decrements an 8-bit register

Parameters
nregister to decrement
cpuz80 CPU object
Bug:
dec8 isn't operating on flags

◆ _sbc_a_reg8()

void _sbc_a_reg8 ( struct z80 cpu,
uint8_t *  reg 
)

subtracts an 8-bit register from the A register with carry

Parameters
cpuz80 CPU object
regregister to subtract from A
Here is the call graph for this function:

◆ _sub_a_mem()

void _sub_a_mem ( struct z80 cpu,
uint8_t *  memory 
)

subtracts the contents of a memory address from the A register

Parameters
cpuz80 CPU object
memorypointer to memory to subtract from the A register
Here is the call graph for this function:

◆ _sub_a_reg8()

void _sub_a_reg8 ( struct z80 cpu,
uint8_t *  reg 
)

subtracts reg from the A register

Parameters
cpuz80 CPU object
reg8-bit register to subtract from A
Here is the call graph for this function: