x86_cpm86.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* Copyright (C) 2002
  2. * This file is part of the ld86 command for Linux-86
  3. * It is distributed under the GNU Library General Public License.
  4. *
  5. * CP/M-86 CMD file header
  6. */
  7. #ifndef __CPM86_H
  8. #define __CPM86_H
  9. typedef char Short16[2];
  10. struct cpm86_group {
  11. unsigned char cg_type; /* 1=Code 2=Data */
  12. Short16 cg_len; /* Group length, paragraphs */
  13. Short16 cg_base; /* Group address, normally 0 for relocatable */
  14. Short16 cg_min; /* Minimum size, normally = group length */
  15. Short16 cg_max; /* Maximum size, normally 0x1000 (64k) */
  16. };
  17. struct cpm86_exec { /* CP/M-86 header */
  18. struct cpm86_group ce_group[8];
  19. unsigned char ce_spare[51];
  20. Short16 ce_rsxs; /* Record with RSX list */
  21. Short16 ce_fixups; /* Record with fixups */
  22. unsigned char ce_flags; /* Concurrent CP/M flags */
  23. };
  24. /* Group types */
  25. #define CG_EMPTY 0
  26. #define CG_CODE 1
  27. #define CG_DATA 2
  28. #define CG_EXTRA 3
  29. #define CG_STACK 4
  30. #define CG_AUX1 5
  31. #define CG_AUX2 6
  32. #define CG_AUX3 7
  33. #define CG_AUX4 8
  34. #define CG_PURE 9 /* Code that is known to be pure */
  35. #define CPM86_HEADERLEN 0x80
  36. #endif /* _CPM86_H */