sim

package
v0.0.0-...-3598644 Latest Latest
Warning

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

Go to latest
Published: May 10, 2018 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package sim provides a simple simulator for interacting with the Motorola 68000 emulator package.

The simulator provides standard I/O using a similar protocol to the Teesside simulator.

See: http://www.easy68k.com/QuickStart/TrapTasks.htm

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoProcessor = errors.New("no processor configured")
	ErrNoWriter    = errors.New("write operation requested but no writer is attached")
	ErrNoReader    = errors.New("read operation requested but no reader is attached")
)

Functions

This section is empty.

Types

type Simulator

type Simulator struct {
	Processor *m68k.Processor
	Writer    io.Writer
	Reader    io.Reader
	// contains filtered or unexported fields
}

A Simulator provides standard I/O for a Motorola 68000 emulator using a similar protocol to the Teesside simulator.

func New

func New() (s *Simulator, err error)

New returns a new simulator with default configuration.

func (*Simulator) Register

func (c *Simulator) Register() (err error)

Register configures the given Processor for use with the Simulator.

func (*Simulator) Run

func (c *Simulator) Run() (err error)

Run configures the underlying Processor and executes any program loaded into memory, starting from the location of the Program Counter.

func (*Simulator) Trace

func (c *Simulator) Trace(w io.Writer)

Trace configures the simulator to write trace messages to the given Writer.

func (*Simulator) Trap

func (c *Simulator) Trap(p *m68k.Processor, v int) (err error)

Trap handles TRAP 15 instructions from the underlying Processor.

Jump to

Keyboard shortcuts

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