adjusted output_bytecode() to use global stack #146