dsc.h 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  1. /* Alpha VMS external format of Descriptors.
  2. Copyright (C) 2010-2022 Free Software Foundation, Inc.
  3. Written by Tristan Gingold <gingold@adacore.com>, AdaCore.
  4. This file is part of BFD, the Binary File Descriptor library.
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 3 of the License, or
  8. (at your option) any later version.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program; if not, write to the Free Software
  15. Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
  16. MA 02110-1301, USA. */
  17. #ifndef _VMS_DSC_H
  18. #define _VMS_DSC_H
  19. /* Descriptors. */
  20. #define DSC__K_DTYPE_Z 0 /* Unspecified. */
  21. #define DSC__K_DTYPE_V 1 /* Bit. */
  22. #define DSC__K_DTYPE_BU 2 /* Byte logical. */
  23. #define DSC__K_DTYPE_WU 3 /* Word logical. */
  24. #define DSC__K_DTYPE_LU 4 /* Longword logical. */
  25. #define DSC__K_DTYPE_QU 5 /* Quadword logical. */
  26. #define DSC__K_DTYPE_B 6 /* Byte integer. */
  27. #define DSC__K_DTYPE_W 7 /* Word integer. */
  28. #define DSC__K_DTYPE_L 8 /* Longword integer. */
  29. #define DSC__K_DTYPE_Q 9 /* Quadword integer. */
  30. #define DSC__K_DTYPE_F 10 /* Single-precision floating. */
  31. #define DSC__K_DTYPE_D 11 /* Double-precision floating. */
  32. #define DSC__K_DTYPE_FC 12 /* Complex. */
  33. #define DSC__K_DTYPE_DC 13 /* Double-precision Complex. */
  34. #define DSC__K_DTYPE_T 14 /* ASCII text string. */
  35. #define DSC__K_DTYPE_NU 15 /* Numeric string, unsigned. */
  36. #define DSC__K_DTYPE_NL 16 /* Numeric string, left separate sign. */
  37. #define DSC__K_DTYPE_NLO 17 /* Numeric string, left overpunched sign. */
  38. #define DSC__K_DTYPE_NR 18 /* Numeric string, right separate sign. */
  39. #define DSC__K_DTYPE_NRO 19 /* Numeric string, right overpunched sign. */
  40. #define DSC__K_DTYPE_NZ 20 /* Numeric string, zoned sign. */
  41. #define DSC__K_DTYPE_P 21 /* Packed decimal string. */
  42. #define DSC__K_DTYPE_ZI 22 /* Sequence of instructions. */
  43. #define DSC__K_DTYPE_ZEM 23 /* Procedure entry mask. */
  44. #define DSC__K_DTYPE_DSC 24 /* Descriptor, used for arrays of dyn strings. */
  45. #define DSC__K_DTYPE_OU 25 /* Octaword logical. */
  46. #define DSC__K_DTYPE_O 26 /* Octaword integer. */
  47. #define DSC__K_DTYPE_G 27 /* Double precision G floating, 64 bit. */
  48. #define DSC__K_DTYPE_H 28 /* Quadruple precision floating, 128 bit. */
  49. #define DSC__K_DTYPE_GC 29 /* Double precision complex, G floating. */
  50. #define DSC__K_DTYPE_HC 30 /* Quadruple precision complex, H floating. */
  51. #define DSC__K_DTYPE_CIT 31 /* COBOL intermediate temporary. */
  52. #define DSC__K_DTYPE_BPV 32 /* Bound Procedure Value. */
  53. #define DSC__K_DTYPE_BLV 33 /* Bound Label Value. */
  54. #define DSC__K_DTYPE_VU 34 /* Bit Unaligned. */
  55. #define DSC__K_DTYPE_ADT 35 /* Absolute Date-Time. */
  56. #define DSC__K_DTYPE_VT 37 /* Varying Text. */
  57. #define DSC__K_DTYPE_T2 38 /* 16-bit char. */
  58. #define DSC__K_DTYPE_VT2 39 /* 16-bit varying char. */
  59. #define DSC__K_CLASS_S 1 /* Fixed-length scalar/string. */
  60. #define DSC__K_CLASS_D 2 /* Dynamic string. */
  61. #define DSC__K_CLASS_V 3 /* Reserved. */
  62. #define DSC__K_CLASS_A 4 /* Contiguous array. */
  63. #define DSC__K_CLASS_P 5 /* Procedure argument descriptor. */
  64. #define DSC__K_CLASS_PI 6 /* Procedure incarnation descriptor. */
  65. #define DSC__K_CLASS_J 7 /* Reserved. */
  66. #define DSC__K_CLASS_JI 8 /* Obsolete. */
  67. #define DSC__K_CLASS_SD 9 /* Decimal (scalar) string. */
  68. #define DSC__K_CLASS_NCA 10 /* Non-contiguous array. */
  69. #define DSC__K_CLASS_VS 11 /* Varying string. */
  70. #define DSC__K_CLASS_VSA 12 /* Varying string array. */
  71. #define DSC__K_CLASS_UBS 13 /* Unaligned bit string. */
  72. #define DSC__K_CLASS_UBA 14 /* Unaligned bit array. */
  73. #define DSC__K_CLASS_SB 15 /* String with bounds. */
  74. #define DSC__K_CLASS_UBSB 16 /* Unaligned bit string with bounds. */
  75. /* Common part. */
  76. struct vms_dsc
  77. {
  78. unsigned char length[2];
  79. unsigned char dtype;
  80. unsigned char bclass;
  81. unsigned char pointer[4];
  82. };
  83. struct vms_dsc64
  84. {
  85. unsigned char mbo[2];
  86. unsigned char dtype;
  87. unsigned char bclass;
  88. unsigned char mbmo[4];
  89. unsigned char length[8];
  90. unsigned char pointer[8];
  91. };
  92. struct vms_dsc_nca
  93. {
  94. unsigned char length[2];
  95. unsigned char dtype;
  96. unsigned char bclass;
  97. unsigned char pointer[4];
  98. unsigned char scale;
  99. unsigned char digits;
  100. unsigned char aflags;
  101. unsigned char dimct;
  102. unsigned char arsize[4];
  103. unsigned char a0[4];
  104. };
  105. struct vms_dsc_ubs
  106. {
  107. unsigned char length[2];
  108. unsigned char dtype;
  109. unsigned char bclass;
  110. unsigned char base[4];
  111. unsigned char pos[4];
  112. };
  113. #endif /* _VMS_DSC_H */