blob: 08373a4958babf3e2e69bea96a273abbb6a06717 (
plain) (
tree)
|
|
:(before "End Globals")
// Operator to look at fields of records.
const int _PRINT = 99;
:(before "End Primitive Recipe Numbers")
Recipe_number["$print"] = _PRINT;
assert(Next_recipe_number < _PRINT);
:(before "End Primitive Recipe Implementations")
case _PRINT: {
if (isa_literal(instructions[pc].ingredients[0])) {
cout << instructions[pc].ingredients[0].name << '\n';
break;
}
vector<int> result(read_memory(instructions[pc].ingredients[0]));
for (size_t i = 0; i < result.size(); ++i) {
cout << result[i] << " ";
}
cout << '\n';
break;
}
|