8080-Emulator  0.1
An Intel 8080 emulator for Space Invaders
Public Attributes | List of all members
cpu_state Struct Reference

cpu_state: This structure keeps runtime state of all the registers in the CPU. More...

#include <cpu_8080.h>

Collaboration diagram for cpu_state:
Collaboration graph
[legend]

Public Attributes

uint8_t ACC
 
program_status_word PSW
 
uint8_t C
 
uint8_t B
 
uint8_t E
 
uint8_t D
 
uint8_t L
 
uint8_t H
 
uint16_t BC
 
uint16_t DE
 
uint16_t HL
 
union {
   struct {
      uint8_t   C
 
      uint8_t   B
 
      uint8_t   E
 
      uint8_t   D
 
      uint8_t   L
 
      uint8_t   H
 
   } 
 
   struct {
      uint16_t   BC
 
      uint16_t   DE
 
      uint16_t   HL
 
   } 
 
}; 
 
uint16_t SP
 
uint16_t PC
 
uint8_t intt
 
uint8_t pend_intt
 
uint8_t(* IN_Func )(uint8_t)
 
void(* OUT_Func )(uint8_t, uint8_t)
 
v_memory mem
 
uint16_t rom_size
 
uint8_t halt
 

Detailed Description

cpu_state: This structure keeps runtime state of all the registers in the CPU.

Member Data Documentation

◆ 

union { ... }

General Purpose Registers in CPU

◆ ACC

uint8_t cpu_state::ACC

Register 7

◆ B

uint8_t cpu_state::B

Register 0, Pair B

◆ BC

uint16_t cpu_state::BC

Extended Reg Pair BC

◆ C

uint8_t cpu_state::C

Register 1, Pair B

◆ D

uint8_t cpu_state::D

Register 2, Pair D

◆ DE

uint16_t cpu_state::DE

Extended Reg Pair DE

◆ E

uint8_t cpu_state::E

Register 3, Pair D

◆ H

uint8_t cpu_state::H

Register 4, Pair H

◆ halt

uint8_t cpu_state::halt

the cpu is halted

◆ HL

uint16_t cpu_state::HL

Extended Reg Pair HL

◆ IN_Func

uint8_t(* cpu_state::IN_Func) (uint8_t)

IN/OUT port Wrappers

◆ intt

uint8_t cpu_state::intt

Interrupt status Reg

◆ L

uint8_t cpu_state::L

Register 5, Pair H

◆ mem

v_memory cpu_state::mem

Additional state to make emulation smoother mem pointer, points to vMemeory chunck

◆ PC

uint16_t cpu_state::PC

Program Counter

◆ pend_intt

uint8_t cpu_state::pend_intt

Pending Interrupts

◆ PSW

program_status_word cpu_state::PSW

Program Status Word

◆ rom_size

uint16_t cpu_state::rom_size

Size of the ROM currenlty loaded

◆ SP

uint16_t cpu_state::SP

Special Purpose 16bit Regs Stack Pointer


The documentation for this struct was generated from the following file: