vise/go/vm/opcodes.go

42 lines
495 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
2023-04-03 10:11:44 +02:00
MNEXT = 11
MPREV = 12
_MAX = 12
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",
2023-04-03 10:11:44 +02:00
MNEXT: "MNEXT",
MPREV: "MPREV",
}
)