about summary refs log blame commit diff stats
path: root/cpp/090debug
blob: ca88b86ce588a5691eb60fb37bf6979740c824ce (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13












                                                                   
:(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")
//: beware: overridden in later layers
case _PRINT: {
  vector<int> result(read_memory(instructions[pc].ingredients[0]));
  cout << result[0] << '\n';
  break;
}