tinycpm

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package tinycpm provides minimal CP/M compatible BIOS to run Z80 Exerciser tests.

Index

Constants

View Source
const Start = 0x0100

Start is an address where a program starts.

Variables

This section is empty.

Functions

func New

func New() (*Memory, *IO)

New creates Memory and IO.

Types

type IO

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

IO creates a new I/O, which used with minimal CP/M

func NewIO

func NewIO() *IO

NewIO creates a new I/O, which used with minimal CP/M

func (*IO) In

func (io *IO) In(addr uint8) uint8

In inputs a value from "addr" port. However this shows warning message always.

func (*IO) Out

func (io *IO) Out(addr uint8, value uint8)

Out outputs "value" to "addr" port. Only supports addr=0x0000, otherwise show warning message.

func (*IO) SetStdout

func (io *IO) SetStdout(w io.Writer)

SetStdout overrides stdout for this I/O.

func (*IO) SetWarnLogger

func (io *IO) SetWarnLogger(l *log.Logger)

SetWarnLogger overrides a warning logger.

type Memory

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

Memory provides 64K bytes array memory.

func NewMemory

func NewMemory() *Memory

NewMemory creates a new memory which includes minimal CP/M.

func (*Memory) Get

func (m *Memory) Get(addr uint16) uint8

Get gets a byte at addr of memory.

func (*Memory) LoadFile

func (m *Memory) LoadFile(name string) error

LoadFile loads a file from "Start" (0x0100) as program.

func (*Memory) Set

func (m *Memory) Set(addr uint16, value uint8)

Set sets a byte at addr of memory.

Jump to

Keyboard shortcuts

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