vm

package
v0.0.0-...-cf91f57 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2022 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidFileDescriptor = fmt.Errorf("invalid file descriptor")
)

Functions

This section is empty.

Types

type ALU

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

func (*ALU) ADD

func (alu *ALU) ADD(a, b uint64) uint64

func (*ALU) AND

func (alu *ALU) AND(a, b uint64) uint64

func (*ALU) Carry

func (alu *ALU) Carry() bool

func (*ALU) Equal

func (alu *ALU) Equal() bool

func (*ALU) GreaterThan

func (alu *ALU) GreaterThan() bool

func (*ALU) GreaterThanEqual

func (alu *ALU) GreaterThanEqual() bool

func (*ALU) LSL

func (alu *ALU) LSL(a, b uint64) uint64

func (*ALU) LSR

func (alu *ALU) LSR(a, b uint64) uint64

func (*ALU) LessThan

func (alu *ALU) LessThan() bool

func (*ALU) LessThanEqual

func (alu *ALU) LessThanEqual() bool

func (*ALU) Negative

func (alu *ALU) Negative() bool

func (*ALU) NotEqual

func (alu *ALU) NotEqual() bool

func (*ALU) OR

func (alu *ALU) OR(a, b uint64) uint64

func (*ALU) SUB

func (alu *ALU) SUB(a, b uint64) uint64

func (*ALU) XOR

func (alu *ALU) XOR(a, b uint64) uint64

func (*ALU) Zero

func (alu *ALU) Zero() bool

type VirtualMachine

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

func NewVirtualMachine

func NewVirtualMachine(mem memory.Addressable, quiet bool) *VirtualMachine

func (*VirtualMachine) ExecuteInstruction

func (v *VirtualMachine) ExecuteInstruction()

func (*VirtualMachine) Halt

func (v *VirtualMachine) Halt()

func (*VirtualMachine) Halted

func (v *VirtualMachine) Halted() bool

func (*VirtualMachine) InitStack

func (v *VirtualMachine) InitStack(stackStartAddress uint64)

func (*VirtualMachine) Memory

func (v *VirtualMachine) Memory() memory.Addressable

func (*VirtualMachine) PrintState

func (v *VirtualMachine) PrintState()

Jump to

Keyboard shortcuts

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