vise/go/vm/opcodes.go

38 lines
435 B
Go
Raw Normal View History

2023-03-31 11:52:04 +02:00
package vm
const VERSION = 0
2023-04-02 13:12:06 +02:00
type Opcode uint16
2023-04-02 00:42:34 +02:00
// VM Opcodes
2023-03-31 11:52:04 +02:00
const (
2023-04-02 13:20:35 +02:00
NOOP = 0
2023-04-01 22:25:20 +02:00
CATCH = 1
CROAK = 2
LOAD = 3
RELOAD = 4
MAP = 5
MOVE = 6
HALT = 7
INCMP = 8
MSIZE = 9
MOUT = 10
_MAX = 10
2023-03-31 11:52:04 +02:00
)
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",
}
)