io

package
v0.0.0-...-97f5b4b Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SioBase  = 0x20
	SioAData = SioBase + 0 + 0
	SioACtrl = SioBase + 0 + 2
	SioBData = SioBase + 1 + 0
	SioBCtrl = SioBase + 1 + 2
)

constants defining the address used

Variables

This section is empty.

Functions

func NewDebugDevice

func NewDebugDevice() debugDevice

NewDebugDevice returns a new IO device that can be used for debugging

Types

type Device

type Device interface {
	// Write writes a single byte to the specified port
	Write(port, val uint8)

	// Read reads a single byte from the specified port
	Read(port uint8) uint8
}

Device defines the interface for communicating with an IO device using IN and OUT operations

type SIO

type SIO struct {
	// contains filtered or unexported fields
}

SIO implements the IODevice interface and represents the Z80 Serial Input/Output device

func NewSIO

func NewSIO(r *io.Reader, w *io.Writer) *SIO

NewSIO returns a new SIO/2 serial input output device tied to the console

func (*SIO) Read

func (s *SIO) Read(port uint8) uint8

func (*SIO) Write

func (s *SIO) Write(port, val uint8)

Jump to

Keyboard shortcuts

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