cpu

package
v0.0.0-...-5560990 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 30, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// C is carry flag
	C flags = iota + 1
	// H is half carry flag
	H
	// N is negative flag
	N
	// Z is zero flag
	Z
)

Variables

View Source
var EMPTY = &inst{0xFF, "EMPTY", 0, 1, func(cpu *CPU, operands []byte) {
}}

EMPTY is empty instruction

Functions

This section is empty.

Types

type CPU

type CPU struct {
	PC   types.Word
	SP   types.Word
	Regs Registers
	// contains filtered or unexported fields
}

CPU is cpu state struct

func NewCPU

func NewCPU(logger logger.Logger, bus bus.Accessor, irq interrupt.Interrupt) *CPU

NewCPU is CPU constructor

func (*CPU) GetRegisters

func (cpu *CPU) GetRegisters() Registers

For Debugging

func (*CPU) Step

func (cpu *CPU) Step() Cycle

Step execute an instruction

type Cycle

type Cycle = uint

type Registers

Registers is generic cpu registers

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL