// // BinaryTokenACS::output_ACS0 // template<typename T> void BinaryTokenACS::output_ACS0 (std::ostream *out, std::vector<T> const &instructions) { typename std::vector<T>::const_iterator instr; // 0 *out << 'A' << 'C' << 'S' << '\0'; write_ACS0_32(out, ObjectExpression::get_address_count()); // 8 for (instr = instructions.begin(); instr != instructions.end(); ++instr) instr->writeACS0(out); // directoryOffset ObjectData::Script::Iterate(write_ACS0_script_counter, NULL); write_ACS0_script_count(out); // directoryOffset+4 ObjectData::Script::Iterate(write_ACS0_script, out); // directoryOffset+4+(scriptCount*12) ObjectData::String::Iterate(write_ACS0_string_counter, NULL); write_ACS0_string_count(out); // directoryOffset+4+(scriptCount*12)+4 ObjectData::String::Iterate(write_ACS0_string_offset, out); // directoryOffset+4+(scriptCount*12)+4+(stringCount*4) ObjectData::String::Iterate(write_ACS0_string, out); }