tm

package
v0.0.0-...-36d9f8f Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Instruction

type Instruction struct {
	Op string

	A int
	B int
	C int
	// contains filtered or unexported fields
}

func (Instruction) String

func (i Instruction) String() string

func (*Instruction) UnmarshalText

func (i *Instruction) UnmarshalText(text []byte) error

type Machine

type Machine struct {
	IP int

	Registers Registers
	// contains filtered or unexported fields
}

func NewMachine

func NewMachine() *Machine

func (*Machine) Execute

func (computer *Machine) Execute(registers Registers, program Program, trace func() bool) int

type Program

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

func (*Program) UnmarshalText

func (p *Program) UnmarshalText(text []byte) error

type Registers

type Registers [6]int

func (Registers) String

func (r Registers) String() string

Jump to

Keyboard shortcuts

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