asm

package
v0.0.0-...-a671402 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2022 License: BSD-2-Clause Imports: 6 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 {
	Opcode           Opcode
	RegA, RegB, RegC Register
	Value            uint32
}

func NewInstruction

func NewInstruction(in string) *Instruction

func (*Instruction) Pack

func (i *Instruction) Pack() uint32

@todo make some kind of polymorphism for different opcodes

func (*Instruction) String

func (i *Instruction) String() string

type Opcode

type Opcode uint8
const (
	CMOV Opcode = iota
	ARRI
	ARRA
	ADD
	MUL
	DIV
	NOTA
	HALT
	ALLO
	ABAN
	OUTP
	INP
	LOAD
	ORTH
)

func NewOpcode

func NewOpcode(input string) Opcode

func (Opcode) String

func (i Opcode) String() string

type Register

type Register uint8

func NewRegister

func NewRegister(input string) Register

func (Register) String

func (r Register) String() string

Jump to

Keyboard shortcuts

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