vise/go/vm/opcodes.go
2023-04-03 09:11:44 +01:00

42 lines
495 B
Go

package vm
const VERSION = 0
type Opcode uint16
// VM Opcodes
const (
NOOP = 0
CATCH = 1
CROAK = 2
LOAD = 3
RELOAD = 4
MAP = 5
MOVE = 6
HALT = 7
INCMP = 8
MSIZE = 9
MOUT = 10
MNEXT = 11
MPREV = 12
_MAX = 12
)
var (
OpcodeString = map[Opcode]string{
NOOP: "NOOP",
CATCH: "CATCH",
CROAK: "CROAK",
LOAD: "LOAD",
RELOAD: "RELOAD",
MAP: "MAP",
MOVE: "MOVE",
HALT: "HALT",
INCMP: "INCMP",
MSIZE: "MSIZE",
MOUT: "MOUT",
MNEXT: "MNEXT",
MPREV: "MPREV",
}
)