about summary refs log tree commit diff stats
path: root/cpp/016jump
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-03-17 11:23:29 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-03-17 13:19:20 -0700
commit3ba6357924e1098a28e43c94a4573a3d2978b5e9 (patch)
tree9a5a4b181a82a77646b1c9d796bdd8b4159dc337 /cpp/016jump
parent5f0e4762468c412d57fb54236a0ee90e23a2cb14 (diff)
downloadmu-3ba6357924e1098a28e43c94a4573a3d2978b5e9.tar.gz
949 - paving the way for jumps to labels
Addresses for reagents are now computed after all transforms.
Diffstat (limited to 'cpp/016jump')
-rw-r--r--cpp/016jump6
1 files changed, 3 insertions, 3 deletions
diff --git a/cpp/016jump b/cpp/016jump
index 2ce18859..827e70f4 100644
--- a/cpp/016jump
+++ b/cpp/016jump
@@ -8,7 +8,7 @@ Next_recipe_number++;
 :(before "End Primitive Recipe Implementations")
 case JUMP: {
   trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].name;
-  pc += to_int(instructions[pc].ingredients[0].name);
+  pc += instructions[pc].ingredients[0].value;
   break;
 }
 
@@ -49,7 +49,7 @@ case JUMP_IF: {
     break;
   }
   trace("run") << "ingredient 1 is " << instructions[pc].ingredients[1].name;
-  pc += to_int(instructions[pc].ingredients[1].name);
+  pc += instructions[pc].ingredients[1].value;
   trace("run") << "jumping to instruction " << pc+1;
   break;
 }
@@ -91,7 +91,7 @@ case JUMP_UNLESS: {
     break;
   }
   trace("run") << "ingredient 1 is " << instructions[pc].ingredients[1].name;
-  pc += to_int(instructions[pc].ingredients[1].name);
+  pc += instructions[pc].ingredients[1].value;
   trace("run") << "jumping to instruction " << pc+1;
   break;
 }