aboutsummaryrefslogtreecommitdiffstats
path: root/parsing.go
diff options
context:
space:
mode:
Diffstat (limited to 'parsing.go')
-rw-r--r--parsing.go9
1 files changed, 6 insertions, 3 deletions
diff --git a/parsing.go b/parsing.go
index 765950a4c..4c3f1187e 100644
--- a/parsing.go
+++ b/parsing.go
@@ -11,8 +11,11 @@ import (
// Op codes
var OpCodes = map[string]string{
"STOP": "0",
- "PSH": "30", // 0x30
- /*
+ "PUSH": "48", // 0x30
+ "POP": "49", // 0x31
+ "LOAD": "54", // 0x36
+
+ /* OLD VM OPCODES
"ADD": "16", // 0x10
"SUB": "17", // 0x11
"MUL": "18", // 0x12
@@ -57,7 +60,7 @@ var OpCodes = map[string]string{
func CompileInstr(s string) (string, error) {
tokens := strings.Split(s, " ")
if OpCodes[tokens[0]] == "" {
- return "", errors.New(fmt.Sprintf("OP not found: %s", tokens[0]))
+ return s, errors.New(fmt.Sprintf("OP not found: %s", tokens[0]))
}
code := OpCodes[tokens[0]] // Replace op codes with the proper numerical equivalent