From 9581faf5fdacf4a135bcdf77d6f0fbe0d6eecba8 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 3 Jan 2014 13:40:38 +0100 Subject: Parsing for block and tx --- parsing.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'parsing.go') 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 -- cgit v1.2.3