Dasm.h 685 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef DASM_H
  2. #define DASM_H
  3. #include <string>
  4. #include <vector>
  5. class SymbolTable;
  6. struct MemoryLayout;
  7. struct DisasmRow {
  8. enum RowType { INSTRUCTION, LABEL };
  9. RowType rowType;
  10. unsigned short addr;
  11. char numBytes;
  12. int infoLine;
  13. std::string instr;
  14. };
  15. static const DisasmRow DISABLED_ROW = {DisasmRow::INSTRUCTION, 0, 1, 0, "- "};
  16. static const int FIRST_INFO_LINE = 1;
  17. static const int LAST_INFO_LINE = -65536;
  18. typedef std::vector<DisasmRow> DisasmLines;
  19. void dasm(const unsigned char* membuf, unsigned short startAddr,
  20. unsigned short endAddr, DisasmLines& disasm,
  21. MemoryLayout *memLayout, SymbolTable *symTable, int currentPC);
  22. #endif // DASM_H