home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / UNIX3862.ZIP / U386-06.ZIP / U386-6.TD0 / usr / include / sys / hetero.h < prev    next >
Encoding:
C/C++ Source or Header  |  1988-06-26  |  1.8 KB  |  83 lines

  1. /*    Copyright (c) 1984, 1986, 1987, 1988 AT&T    */
  2. /*      All Rights Reserved      */
  3.  
  4. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T    */
  5. /*    The copyright notice above does not evidence any       */
  6. /*    actual or intended publication of such source code.    */
  7.  
  8.  
  9. #ident    "@(#)head.sys:hetero.h    1.4"
  10.  
  11. /*
  12.  *    Define machine attributes for heterogeneity.
  13.  *
  14.  *    Machine attribute consists of three components -
  15.  *    byte ordering, alignment, and data unit size.
  16.  *    The machine attributes are defined in a byte (8 bits),
  17.  *    the lower 2 bits are used to define the byte ordering,
  18.  *    the middle 3 bits are used to define the alignment,
  19.  *    the higher 3 bits are used to define the data unit size.
  20.  *
  21.  *
  22.  *    BYTE_ORDER    0x01    3B, IBM byte ordering
  23.  *            0x02    VAX byte ordering
  24.  *    ALIGNMENT    0x04    word aligned (4 bytes boundary)
  25.  *            0x08    half-word aligned (2 bytes boundary)
  26.  *            0x0c    byte aligned
  27.  *    UNIT_SIZE    0x20    4 bytes integer, 2 bytes short, 4 bytes pointer
  28.  *            0x40    2 bytes integer, 2 bytes short, 2 bytes pointer
  29.  */
  30.  
  31.  
  32. /*
  33.  *    Define masks for machine attributes
  34.  */
  35.  
  36. #define BYTE_MASK    0x03
  37. #define ALIGN_MASK    0x1c
  38. #define UNIT_MASK    0xe0
  39.  
  40.  
  41. /*
  42.  *    Define what need to be converted - header or data parts
  43.  */
  44.  
  45. #define ALL_CONV    0    /* convert both header and data parts */
  46. #define DATA_CONV    1    /* convert data part */
  47. #define NO_CONV        2    /* no conversion needed */
  48.  
  49.  
  50.  
  51. #ifdef u3b2
  52. /*
  53.  *    Define machine attributes for 3B
  54.  */
  55.  
  56. #define BYTE_ORDER    0x01
  57. #define ALIGNMENT    0x04
  58. #define UNIT_SIZE    0x20
  59. #endif
  60.  
  61. #ifdef i286
  62. /*
  63.  *    Define machine attributes for Intel 286
  64.  */
  65.  
  66. #define BYTE_ORDER    0x02
  67. #define ALIGNMENT    0x08
  68. #define UNIT_SIZE    0x40
  69. #endif
  70.  
  71. #ifdef i386
  72. /*
  73.  *    Define machine attributes for Intel 386
  74.  */
  75.  
  76. #define BYTE_ORDER    0x02
  77. #define ALIGNMENT    0x04
  78. #define UNIT_SIZE    0x20
  79. #endif
  80.  
  81.  
  82. #define MACHTYPE    (BYTE_ORDER | ALIGNMENT | UNIT_SIZE)
  83.