This is an implementation of the Mostek / Zilog Z80 processor NMOS version in Go
If you find this project useful, you may want to Buy me a Coffee! ☕ Thanks 👍
Add this:
go get github.com/codesqueak/z80@v1.2.0
Add this (depending on what bits you need)
import (
"github.com/codesqueak/z80/processor/pkg"
"github.com/codesqueak/z80/processor/pkg/hw"
)
github.com/codesqueak/z80/processor/pkg - contains processor methods
github.com/codesqueak/z80/processor/pkg/hw - contains interface definitions for Memory and I/O
The code attempts to faithfully reproduce the numerous undocumented instructions in the Z80. I have tested against a real device but if you find any issues, let me know.
To make a machine you need three components, the CPU, Memory and I/O. To see a simple example, look at the test in
core_instructions_test.go
.