diff options
Diffstat (limited to 'cpp/016jump')
-rw-r--r-- | cpp/016jump | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/cpp/016jump b/cpp/016jump index 80f7aa8d..669c7258 100644 --- a/cpp/016jump +++ b/cpp/016jump @@ -1,10 +1,8 @@ -:(before "End Globals") +:(before "End Primitive Recipe Declarations") // Jump ops. -const int JUMP = 10; +JUMP, :(before "End Primitive Recipe Numbers") Recipe_number["jump"] = JUMP; -assert(Next_recipe_number == JUMP); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case JUMP: { trace("run") << "ingredient 0 is " << instructions[pc].ingredients[0].value; @@ -34,12 +32,10 @@ recipe main [ +run: instruction main/2 +run: instruction main/1 -:(before "End Globals") -const int JUMP_IF = 11; +:(before "End Primitive Recipe Declarations") +JUMP_IF, :(before "End Primitive Recipe Numbers") Recipe_number["jump-if"] = JUMP_IF; -assert(Next_recipe_number == JUMP_IF); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case JUMP_IF: { vector<int> arg0 = read_memory(instructions[pc].ingredients[0]); @@ -76,12 +72,10 @@ recipe main [ +run: instruction main/1 +mem: storing 1 in location 123 -:(before "End Globals") -const int JUMP_UNLESS = 12; +:(before "End Primitive Recipe Declarations") +JUMP_UNLESS, :(before "End Primitive Recipe Numbers") Recipe_number["jump-unless"] = JUMP_UNLESS; -assert(Next_recipe_number == JUMP_UNLESS); -Next_recipe_number++; :(before "End Primitive Recipe Implementations") case JUMP_UNLESS: { vector<int> arg0 = read_memory(instructions[pc].ingredients[0]); |