Documentation ¶
Overview ¶
Package z80 is the Zilog Z80 processor.
Index ¶
Constants ¶
View Source
const ( // FlagC is the carry flag FlagC = uint8(1 << 0) // FlagN is set after subtraction FlagN = uint8(1 << 1) // FlagV is the overflow flag (also parity) FlagV = uint8(1 << 2) // FlagP is the parity flag (also overflow) FlagP = uint8(1 << 2) // Flag3 is undefined Flag3 = uint8(1 << 3) // FlagH is the half-carry flag FlagH = uint8(1 << 4) // Flag5 is undefined Flag5 = uint8(1 << 5) // FlagZ is the zero flag FlagZ = uint8(1 << 6) // FlagS is the sign flag FlagS = uint8(1 << 7) )
Variables ¶
This section is empty.
Functions ¶
func Formatter ¶
func Formatter() rcs.CodeFormatter
func NewDisassembler ¶
func NewDisassembler(mem *rcs.Memory) *rcs.Disassembler
Types ¶
type CPU ¶
type CPU struct { Name string A uint8 // Accumulator F uint8 // Flags B uint8 C uint8 D uint8 E uint8 H uint8 L uint8 A1 uint8 // Shadow registers F1 uint8 B1 uint8 C1 uint8 D1 uint8 E1 uint8 H1 uint8 L1 uint8 I uint8 // Interrupt vector base R uint8 // DRAM refresh counter IXH uint8 IXL uint8 IYH uint8 IYL uint8 SP uint16 // Stack pointer IFF1 bool // Interrupt flip flops IFF2 bool IM uint8 // Interrupt mode Halt bool // Halted by instruction Ports *rcs.Memory IRQ bool IRQData uint8 NMI bool RESET bool WatchIRQ bool // contains filtered or unexported fields }
CPU is the Zilog Z80 processor.
func (*CPU) NewDisassembler ¶
func (c *CPU) NewDisassembler() *rcs.Disassembler
NewDisassembler creates a disassembler that can handle Z80 machine code.
Click to show internal directories.
Click to hide internal directories.