opcode

package
v0.0.0-...-5b0769d Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package opcode provides/defines Z80's instruction set and its operation codes.

Index

Constants

This section is empty.

Variables

View Source
var AllOPCodes = [][]*OPCode{
	load8,
	load16,
	exbtsg,
	arith8,
	ctrl,
	arith16,
	rotateshift,
	bitop,
	jump,
	callret,
	inout,
	undoc,
}

AllOPCodes includes all operations of Z80.

Functions

func DumpDecodeLayer

func DumpDecodeLayer(w io.Writer) error

DumpDecodeLayer dumps default decode layer to io.Writer for debugging

func WriteSwitchDecoder

func WriteSwitchDecoder(w io.Writer) error

WriteSwitchDecoder writes codes for decoder "switch" statements.

Types

type Code

type Code struct {
	C uint8
	M uint8
	V func(uint8) bool
}

Code is definition of an operation code. (mask). 0 bits in M are for constant bits, 1 bits are variable bits for operation code.

func (Code) String

func (c Code) String() string

type OPCode

type OPCode struct {
	// N is string presentation (=label) of opcode.
	N string

	// C is codes definition.
	C []Code

	// T is T cycle and its length is M cycle.
	T []int

	// T2 is T cycle for the special conditions.
	T2 []int
}

OPCode defines opration code and its function.

func (*OPCode) String

func (op *OPCode) String() string

Jump to

Keyboard shortcuts

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