BinaryImage.h 1.1 KB

12345678910111213141516171819202122232425
  1. #pragma once
  2. #include <stdint.h>
  3. #include <vector>
  4. struct PROG /* Loaded program image parameters */
  5. {
  6. int16_t initCS;
  7. int16_t initIP; /* These are initial load values */
  8. int16_t initSS; /* Probably not of great interest */
  9. uint16_t initSP;
  10. bool fCOM; /* Flag set if COM program (else EXE)*/
  11. int cReloc; /* No. of relocation table entries */
  12. std::vector<uint32_t> relocTable; /* Ptr. to relocation table */
  13. uint8_t * map; /* Memory bitmap ptr */
  14. int cProcs; /* Number of procedures so far */
  15. int offMain; /* The offset of the main() proc */
  16. uint16_t segMain; /* The segment of the main() proc */
  17. bool bSigs; /* True if signatures loaded */
  18. int cbImage; /* Length of image in bytes */
  19. uint8_t * Imagez; /* Allocated by loader to hold entire program image */
  20. int addressingMode;
  21. public:
  22. const uint8_t *image() const {return Imagez;}
  23. void displayLoadInfo();
  24. };