Conditional return instructions

This commit is contained in:
Ian Gulliver
2021-11-19 16:30:11 -10:00
parent 7a24eee583
commit 50f986fb13
4 changed files with 94 additions and 30 deletions

View File

@@ -3,10 +3,8 @@ package vm
type OpCodeType uint32
const (
OpNoOp OpCodeType = 0x00000000
OpNop = OpNoOp
OpReturn = 0x00000002
OpRet = OpReturn
OpNoOp OpCodeType = 0x00000000
OpNop = OpNoOp
OpMove = 0x00000100
OpMov = OpMove
@@ -53,4 +51,11 @@ const (
OpCalT = OpCallIfTrue
OpCallIfFalse = 0x00000502
OpCalF = OpCallIfFalse
OpReturn = 0x00000600
OpRet = OpReturn
OpReturnIfTrue = 0x00000601
OpRetT = OpReturnIfTrue
OpReturnIfFalse = 0x00000602
OpRetF = OpReturnIfFalse
)