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. uint16_t initCS=0;
  7. uint16_t initIP=0; /* These are initial load values */
  8. uint16_t initSS=0; /* Probably not of great interest */
  9. uint16_t initSP=0;
  10. bool fCOM=false; /* Flag set if COM program (else EXE)*/
  11. int cReloc=0; /* No. of relocation table entries */
  12. std::vector<uint32_t> relocTable; /* Ptr. to relocation table */
  13. uint8_t * map=nullptr; /* Memory bitmap ptr */
  14. int cProcs=0; /* Number of procedures so far */
  15. int offMain=0; /* The offset of the main() proc */
  16. uint16_t segMain=0; /* The segment of the main() proc */
  17. bool bSigs=false; /* True if signatures loaded */
  18. int cbImage=0; /* Length of image in bytes */
  19. uint8_t * Imagez=nullptr; /* Allocated by loader to hold entire program image */
  20. int addressingMode=0;
  21. public:
  22. const uint8_t *image() const {return Imagez;}
  23. void displayLoadInfo();
  24. };