home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / sd386v50.zip / sd386src.zip / TYPES.DOC < prev    next >
Text File  |  1996-03-26  |  59KB  |  1,183 lines

  1.  Type Records
  2.  ------------
  3.  
  4.                  Record type         | SD386 Internal type
  5.                 -------------------------------------------
  6.                |                     | SD386    |Internal
  7.    Start Leaves| MS-16 | MS-32 | IBM | Internal |Designator
  8.    --------------------------------------------------------
  9.    Type Record |       |       |     |          |Trec
  10.    Structure   | 0x79  | 0x79  | 0x79|   0x79   |T_STRUCT
  11.    Bit Fields  | 0x5C  | 0x5C  | 0x5C|   0x5C   |T_BITFLD
  12.    Type Defs   | 0x5D  | 0x5D  | 0x5D|   0x5D   |T_TYPDEF
  13.    Pointers    | 0x7A  | 0x7A  | 0x7A|   0x7A   |T_PTR
  14.    Enums       | 0x7B  | 0x7B  | 0x7B|   0x7B   |T_ENUM
  15.    Scalars     | 0x7B  | 0x7B  | 0x51|   0x51   |T_SCALAR
  16.    Array       | 0x78  | 0x78  | 0x78|   0x78   |T_ARRAY
  17.    List        | 0x7F  | 0x7F  | 0x7F|   0x7F   |T_LIST
  18.    Procedure   | 0x75  | 0x75  | 0x75|   0x75   |T_PROC <--___these two records are identical in the IBM format.
  19.    Function    | 0x54  | 0x54  | 0x54|   0x54   |T_FUNC <--
  20.    Skip        | 0x90  | 0x90  | 0x90|   0x90   |T_SKIP
  21.    Null        | 0x80  | 0x80  | 0x80|   0x80   |T_NULL
  22.    Class       |  -    |  -    | 0x40|   0x40   |T_CLASS
  23.    Member Fcn  |  -    |  -    | 0x45|   0x45   |T_MEMFNC
  24.    Class Member|  -    |  -    | 0x46|   0x46   |T_CLSMEM
  25.  
  26.  
  27.  Notes:
  28.  
  29.   1. Trec is the representation of the first leaf of all type records.
  30.  
  31.   2. In the IBM HL03 format, the rec id was removed from all records.
  32.  
  33.   3. The doc contains the following abbreviations for the various leaves.
  34.  
  35.         T  = Trec.
  36.         N  = 1 byte signed numeric leaf w/o a FID_SPAN prefix.
  37.         SN = Signed numeric leaf.
  38.         UN = Unsigned numeric leaf.
  39.         S  = String leaf.
  40.         I  = Index leaf.
  41.  
  42.   4. In our Internal format, all string leaves will have a 2 byte length.
  43.  
  44.   5. * => variable length name.
  45.      @ => variable length leaf.
  46.  
  47.   6. Our Internal format documentation shows FID_x bytes in the leaves;however, they are there for documentation
  48.      purposes. We're going to rewrite the code and eliminate these fields.
  49.  
  50.  
  51.   7. IBM "type qualifier" will be mapped to our internal flags byte in those records that require a "Flags" leaf.
  52.  
  53.  
  54.  
  55.   8. The MS format lumps scalars and enums into one scalar record.  The
  56.      simplified form of the record only includes a primitive type index.
  57.      We will map the MS simplified form of the enums to our internal
  58.      T_SCALAR and will map the general form to our internal T_ENUM.  We
  59.      have not seen the MS c compilers actually generate any simplified
  60.      forms of the enums;however, PLX which generates MS format records
  61.      does.  PL/X also generates actual enum records.  What we have to do
  62.      is distinguish between the actual enums and the "scalar" enums.  We
  63.      will have to use the record length to distinguish between the two.
  64.  
  65. 1------------------------------------------------------------------------------
  66.   Primitive types as taken from the MSC object module format doc.
  67.  
  68.   Types 0-511 are reserved. Types 0-255(high byte = 0) have meaning
  69.   according to the decoding of the following bits:
  70.  
  71.   xxxx xxxx x xx xxx xx
  72.   xxxx xxxx i md typ sz
  73.  
  74.   i=0 ==> special type don't interpret md,typ,and sz.
  75.   i=1 ==> interpret low order 7 bits as follows.
  76.  
  77.   md - Model
  78.   00 - Direct
  79.   01 - Near pointer
  80.   10 - Far pointer
  81.   11 - Huge pointer ( !!! We're stealing this one for our 0:16 )
  82.  
  83.   type - base type
  84.   000  - signed
  85.   001  - unsigned
  86.   010  - real
  87.   011  -
  88.   100  -
  89.   101  - void in IBM format.
  90.   110  -
  91.   111  - void in Microsoft format.
  92.  
  93.   sz   - size
  94.   00   - 8-bit
  95.   01   - 16-bit
  96.   10   - 32-bit
  97.   11   - void in IBM format.
  98.  
  99.  These are the primitives that we currently use. We may need to define others. Currently, there are definitions in
  100.  our $$type.h file that we do not use.
  101.  
  102.                         i md typ sz
  103.                         7 65 432 10
  104.   -----------------------------------------------------
  105.   TYPE_CHAR        0x80 1 00 000 00    8-bit  signed.
  106.   TYPE_SHORT       0x81 1 00 000 01    16-bit signed.
  107.   TYPE_LONG        0x82 1 00 000 10    32-bit signed.
  108.   TYPE_UCHAR       0x84 1 00 001 00    8-bit  unsigned.
  109.   TYPE_USHORT      0x85 1 00 001 01    16-bit unsigned.
  110.   TYPE_ULONG       0x86 1 00 001 10    32-bit unsigned.
  111.   TYPE_FLOAT       0x88 1 00 010 00    32-bit real.
  112.   TYPE_DOUBLE      0x89 1 00 010 01    64-bit real.
  113.   TYPE_LDOUBLE     0x8A 1 00 010 10    80-bit real.
  114.   TYPE_VOID        0x97 1 00 101 11    void.
  115.  
  116.   TYPE_PCHAR       0xA0 1 01 000 00    0:32 near ptr to 8-bit  signed.
  117.   TYPE_PSHORT      0xA1 1 01 000 01    0:32 near ptr to 16-bit signed.
  118.   TYPE_PLONG       0xA2 1 01 000 10    0:32 near ptr to 32-bit signed.
  119.   TYPE_PUCHAR      0xA4 1 01 001 00    0:32 near ptr to 8-bit  unsigned.
  120.   TYPE_PUSHORT     0xA5 1 01 001 01    0:32 near ptr to 16-bit unsigned.
  121.   TYPE_PULONG      0xA6 1 01 001 10    0:32 near ptr to 32-bit unsigned.
  122.   TYPE_PFLOAT      0xA8 1 01 010 00    0:32 near ptr to 32-bit real.
  123.   TYPE_PDOUBLE     0xA9 1 01 010 01    0:32 near ptr to 64-bit real.
  124.   TYPE_PLDOUBLE    0xAA 1 01 010 10    0:32 near ptr to 80-bit real.
  125.   TYPE_PVOID       0xB7 1 01 101 11    0:32 near ptr to void.
  126.  
  127.   TYPE_FPCHAR      0xC0 1 10 000 00    far ptr to 8-bit  signed.
  128.   TYPE_FPSHORT     0xC1 1 10 000 01    far ptr to 16-bit signed.
  129.   TYPE_FPLONG      0xC2 1 10 000 10    far ptr to 32-bit signed.
  130.   TYPE_FPUCHAR     0xC4 1 10 001 00    far ptr to 8-bit  unsigned.
  131.   TYPE_FPUSHORT    0xC5 1 10 001 01    far ptr to 16-bit unsigned.
  132.   TYPE_FPULONG     0xC6 1 10 001 10    far ptr to 32-bit unsigned.
  133.   TYPE_FPFLOAT     0xC8 1 10 010 00    far ptr to 32-bit real.
  134.   TYPE_FPDOUBLE    0xC9 1 10 010 01    far ptr to 64-bit real.
  135.   TYPE_FPLDOUBLE   0xCA 1 10 010 10    far ptr to 80-bit real.
  136.   TYPE_FPVOID      0xD7 1 10 101 11    far ptr to void.
  137.  
  138.   TYPE_N16PCHAR    0xE0 1 11 011 11    0:16 near ptr to 8-bit  signed.
  139.   TYPE_N16PSHORT   0xE1 1 11 000 01    0:16 near ptr to 16-bit signed.
  140.   TYPE_N16PLONG    0xE2 1 11 000 10    0:16 near ptr to 32-bit signed.
  141.   TYPE_N16PUCHAR   0xE4 1 11 001 00    0:16 near ptr to 8-bit  unsigned.
  142.   TYPE_N16PUSHORT  0xE5 1 11 001 01    0:16 near ptr to 16-bit unsigned.
  143.   TYPE_N16PULONG   0xE6 1 11 001 10    0:16 near ptr to 32-bit unsigned.
  144.   TYPE_N16PFLOAT   0xE8 1 11 010 00    0:16 near ptr to 32-bit real.
  145.   TYPE_N16PDOUBLE  0xE9 1 11 010 01    0:16 near ptr to 64-bit real.
  146.   TYPE_N16PLDOUBLE 0xEA 1 11 010 10    0:16 near ptr to 80-bit real.
  147.   TYPE_N16PVOID    0xF7 1 11 101 11    0:16 near ptr to void.
  148.  
  149. 1------------------------------------------------------------------------------
  150.  
  151.  Leaf definitions.
  152.  ----------------
  153.  
  154.     The following prefixes define the leaves:
  155.  
  156.       FID_NIL    0x80
  157.       FID_STRING 0x82
  158.       FID_INDEX  0x83
  159.       FID_SPAN
  160.  
  161.         Numeric Leaves
  162.         -----------------------
  163.           0x8B - 8  bit unsigned
  164.           0x85 - 16 bit unsigned
  165.           0x86 - 32 bit unsigned
  166.  
  167.           0x88 - 8  bit signed
  168.           0x89 - 16 bit signed
  169.           0x8A - 32 bit signed
  170.  
  171.  
  172.                    1
  173.                    ----
  174.              -----|    |<--- 1 byte numeric value <= 127.
  175.             |     |    |                            (0x7F)
  176.             |      ----
  177.             |
  178.             or if bit 7 of the first byte is set, then
  179.             |
  180.             |         --FID_span byte
  181.             |        |
  182.             |      1 |
  183.             |      ---- ----
  184.             |     |0x88|    |<--1 byte number signed/unsigned.
  185.             |     |0x8B|    |
  186.             |      ---- --------
  187.             |     |0x85|        |<--2 byte number signed/unsigned.
  188.              -----|0x89|        |
  189.                    ---- ----------------
  190.                   |0x86|                |<--4 byte number signed/unsigned.
  191.                   |0x8A|                |
  192.                    ---- ----------------
  193.  
  194. 1------------------------------------------------------------------------------
  195.  
  196.  Structure
  197.  ---------
  198.  
  199.   Microsoft 16/32 bit.
  200.   -------------------
  201.  
  202.       T          UN         UN         I          I          S          N
  203.      ---------- --------- ---------- ---------- ---------- ---------- ----------
  204.     | Trec     | Length  | Number of|  Type    | Name     | Tag      | Packing  |
  205.     |          | in bits | members  |  List    | List     | Name     |          |
  206.      ---------- --------- ---------- ---------- ---------- ---------- ----------
  207.  
  208.  
  209.     1     2        1    @    @    1    2        1    2        1     1     *              1
  210.     ---- -------- ---- ---- ---- ---- -------- ---- -------- ----- ----- ---------//--- -----
  211.    |rec |rec len |type|bit |num |FID |type lst|FID |name lst|FID  |name |struct        |pck'd|
  212.    |id  |        |    |len |mems|indx|index   |indx|index   |strng|len  |tag name      |     |
  213.    |0x01|        |0x79|    |    |0x83|        |0x83|        |0x82 |     |              |     |
  214.     ---- -------- ---- ---- ---- ---- -------- ---- -------- ---------------------//--- -----
  215.  
  216.   IBM HL01,HL02.
  217.   -------------
  218.     1     2        1   1     4                2        1    2        1    2        1     1     *
  219.     ---- -------- ---- ---- ---------------- -------- ---- -------- ---- -------- ----- ----- ---------/
  220.    |rec |rec len |type|type| size of struct |items in|FID |type lst|FID |name lst|FID  |name |struct
  221.    |id  |        |    |qual| in bytes       |struct  |indx|index   |indx|index   |strng|len  |tag name
  222.    |0x01|        |0x79|    |                |        |0x83|        |0x83|        |0x82 |     |
  223.     ---- -------- ---- ---- ---------------- -------- ---- -------- ---- -------- --------------------//
  224.  
  225.   IBM HL03.
  226.   ---------
  227.           2        1   1     4                2        1    2        1    2        1     1     *
  228.          -------- ---- ---- ---------------- -------- ---- -------- ---- -------- ----- ----- ---------/
  229.         |rec len |type|type| size of struct |items in|FID |type lst|FID |name lst|FID  |name |struct
  230.         |        |    |qual| in bytes       |struct  |indx|index   |indx|index   |strng|len  |tag name
  231.         |        |0x79|    |                |        |0x83|        |0x83|        |0x82 |     |
  232.          -------- ---- ---- ---------------- -------- ---- -------- ---- -------- --------------------//
  233.  
  234.   SD386 Internal.
  235.   --------------
  236.  
  237.       L          UN        UN         I          I          S
  238.      ---------- --------- ---------- ---------- ---------- ----------
  239.     | Trec     | Length  | Number of| Type Lst | Name Lst | Tag      |
  240.     |          | in bytes| members  | Index    | Index    | Name     |
  241.      ---------- --------- ---------- ---------- ---------- ----------
  242.  
  243.  
  244.           2        1    1    4                1    2        1    2        1    2        1     2        *
  245.          -------- ---- ---- ---------------- ---- -------- ---- -------- ---- -------- ----- -------- ---------/
  246.         |rec len |type|FID | size of struct |FID |num of  |FID |type lst|FID |name lst|FID  |name    |struct
  247.         |        |    |span| in bytes       |span|members |indx|index   |indx|index   |strng|len     |tag name
  248.         |        |0x79|0x86|                |0x85|        |0x83|        |0x83|        |0x82 |        |
  249.          -------- ---- ---- ---------------- ---- -------- ---- -------- ---- -------- -----------------------//
  250.  
  251.  Notes:
  252.  
  253.    1. We will not map the "pck'd" field from the Microsoft format.
  254.       The "type qualifier" in HL01 and HL02 only contained "packing" information. It was removed in HL03.
  255.       So, the "type qualifier" can be mapped to 0x00.
  256.    2. In our internal format, the IBM "type qualifier" will be part of the Trec.
  257.  
  258. 1------------------------------------------------------------------------------
  259.  
  260.  Bit Fields
  261.  ---------
  262.  
  263.   Microsoft 16/32 bit.
  264.   -------------------
  265.  
  266.       T          UN        UN         I
  267.      ---------- --------- ---------- ----------
  268.     | Trec     | Bitfield| Bitfield | Bitfield |
  269.     | 0x5C     | size    | base type| offset   |
  270.      ---------- --------- ---------- ----------
  271.  
  272.     1     2        1    1    1    1
  273.     ---- -------- ---- ---- ---- ----
  274.    |rec |rec len |type|size|base|off-|
  275.    |id  |        |    |    |type|set |<--offset of the bitfield within the base type.
  276.    |0x01|        |0x5C|    |    |    |
  277.     ---- -------- ---- ---- ---- ----
  278.                         |    |
  279.    numeric leaf of the--      ---- 0x6F - character
  280.    size of the bit                 0x7C - unsigned
  281.    field. Allowed values           0x7D - signed
  282.    are 0x00 - 0x20.                The Microsoft compilers will allow you to specify a char type for a bitfield;however,
  283.                                    it will get mapped to an int in the debug info.
  284.  
  285.   IBM HL01,HL02.
  286.   -------------                                                          --FID_span byte
  287.     1     2        1   1     1    @                                     |
  288.     ---- -------- ---- ---- ---- ----                                 1 |
  289.    |rec |rec len |type|type|off-|size|                                ---- ----
  290.    |id  |        |    |qual|set |    |<---Numeric leaf of the size   |0x88|    |<--1 byte signed number.
  291.    |0x01|        |0x5C|    |    |    |  | of the bit field in bits.  |    |    |     from 0x01 - 0x20.
  292.     ---- -------- ---- ---- ---- ----   |                             ---- ----
  293.                         |               |
  294.                         |               |                   ---------
  295.                         |<--------------|------------------ 4 3 2 1 0 <-bit
  296.                         |               |                   ---------
  297.                         |               |                   x x x x 0 - non-varying
  298.                         |               |                   x x x x 1 - varying
  299.                         |               |                   x x x 0 x - unsigned
  300.                         |               |                   x x x 1 x - signed
  301.                         |               |                   x x 0 x x - byte alignment
  302.                         |               |                   x x 1 x x - word alignment
  303.                         |               |                   x 0 x x x - display as string of 0 and 1
  304.                         |               |                   x 1 x x x - display as a value
  305.                         |               |                   0 x x x x - no descriptor required
  306.   IBM HL03.             |               |                   1 x x x x - descriptor required
  307.   --------              |               |
  308.           2        1   1|    1    @     |
  309.          -------- ---- ---- ---- ----   |
  310.         |rec len |type|type|off-|size|  |
  311.         |        |    |qual|set |    |<-
  312.         |        |0x5C|    |    |    |
  313.          -------- ---- ---- ---- ----
  314.  
  315.   SD386 Internal.
  316.   --------------
  317.  
  318.       T          N         N         N          N
  319.      ---------- --------- --------- ---------- ----------
  320.     | Trec     | Flags   | Bitfield| Bitfield | Bitfield |
  321.     |          |         | offset  | size     | base type|
  322.      ---------- --------- --------- ---------- ----------
  323.  
  324.           2        1   1     1    1     1        0x84 -  8 bit.
  325.          -------- ---- ---- ---- ----  ----      0x85 - 16 bit.
  326.         |rec len |type|flgs|off-|size |base|<--  0x86 - 32 bit.
  327.         |        |    |    |set |     |type|
  328.         |        |0x5C|    |    |     |    |
  329.          -------- ---- ---- ---- ----- ----
  330.  
  331.  
  332.  Note:
  333.  
  334.   1. We will have to map the Microsoft "base type" fields to our internal "base type" records. This will require some
  335.      trickery since a base type of 0x7C can be either 16 bits or 32 bits depending on whether the subsection is
  336.      Microsoft 16 bit or 32 bit.
  337.  
  338. 1------------------------------------------------------------------------------
  339.  
  340.  TypeDefs/UserDefs
  341.  -----------------
  342.  
  343.   Microsoft 16/32 bit.
  344.   -------------------
  345.  
  346.       T          I         S
  347.      ---------- --------- ----------
  348.     | Trec     | type    | typedef  |
  349.     | 0x5D     | index   | name     |
  350.      ---------- --------- ----------
  351.  
  352.  
  353.     1     2        1    1    2        1     1     *
  354.     ---- -------- ---- ---- -------- ----- ----- ---------//---
  355.    |rec |rec len |type|FID |type    |FID  |name |typedef       |
  356.    |id  |        |    |indx|index   |strng|len  |name          |
  357.    |0x01|        |0x5D|0x83|        |0x82 |     |              |
  358.     ---- -------- ---- ---- -------- ---------------------//---
  359.  
  360.  
  361.   IBM HL01,HL02.
  362.   -------------
  363.     1     2        1   1     1    2        1     1     *
  364.     ---- -------- ---- ---- ---- -------- ----- ----- ---------//---
  365.    |rec |rec len |type|type|FID |type    |FID  |name |typedef       |
  366.    |id  |        |    |qual|indx|index   |strng|len  |name          |
  367.    |0x01|        |0x5D|    |0x83|        |0x82 |     |              |
  368.     ---- -------- ---  ---- ---- -------- ----- ---------------//---
  369.  
  370.  
  371.   IBM HL03.
  372.   --------
  373.           2        1   1     1    2        1     1    *
  374.          -------- ---- ---- ---- -------- ----- ---- ---------//---
  375.         |rec len |type|type|FID |type    |FID  |name|typedef       |
  376.         |        |    |qual|indx|index   |strng|len |name          |
  377.         |        |0x5D|    |0x83|        |0x82 |    |              |
  378.          -------- ---  ---- ---- -------- ----- --------------//---
  379.  
  380.  
  381.  
  382.   SD386 Internal.
  383.   --------------
  384.  
  385.       T          I         S
  386.      ---------- --------- ----------
  387.     | Trec     | type    | typedef  |
  388.     | 0x5D     | index   | name     |
  389.      ---------- --------- ----------
  390.                      |
  391.                      |
  392.                       ---This may be a primitive or a complex type number.
  393.  
  394.  
  395.           2        1    1    2        1     2        *
  396.          -------- ---- ---- -------- ----- -------- ---------//---
  397.         |rec len |type|FID |type    |FID  |name    |typedef       |
  398.         |        |    |indx|index   |strng|len     |name          |
  399.         |        |0x5D|0x83|        |0x82 |        |              |
  400.          -------- ---  ---- -------- ----- ------------------//---
  401.  
  402.  
  403.    Notes:
  404.  
  405.     1. Microsoft compilers do not emit typedef records;however, we use the typedef record to support
  406.        the PL/X based variables.
  407.  
  408.     2. All type index fields for IBM or Microsoft may be primitive or complex numbers.
  409.  
  410.  
  411. 1------------------------------------------------------------------------------
  412.  
  413.  Pointers.
  414.  --------
  415.  
  416.   Microsoft 16/32 bit.
  417.   -------------------
  418.       T          N         I          I
  419.      ---------- --------- ---------- ----------
  420.     | Trec     | Model   | type     | ptr      |
  421.     | 0x7A     |         | index    | name     |
  422.      ---------- --------- ---------- ----------
  423.  
  424.                             -------------------------------------------------  NEAR 0x74
  425.     1     2        1    1  |       2        1     1     *                      FAR  0x73
  426.     ---- -------- ---- ----- ---- -------- ----- ----- ---------//---          HUGE 0x5E
  427.    |rec |rec len |type|Model|FID |type    |FID  |name |pointer       |
  428.    |id  |        |    |     |indx|index   |strng|len  |name          |
  429.    |0x01|        |0x7A|     |0x83|        |0x82 |     |              |
  430.     ---- -------- ---- ---------- -------- ----- ---------------//---
  431.  
  432.   IBM HL01,HL02.
  433.   -------------
  434.     1     2        1    1    1     2        1     1     *
  435.     ---- -------- ---- ----- ---- -------- ----- ----- ---------//---
  436.    |rec |rec len |type|type |FID |type    |FID  |name |pointer       |
  437.    |id  |        |    |qual |indx|index   |strng|len  |name          |
  438.    |0x01|        |0x7A|     |0x83|        |0x82 |     |              |
  439.     ---- -------- ---- ---------- -------- ----- ---------------//---
  440.                        |                  |                          |
  441.                        |                  |<----optional------------>|
  442.                        |
  443.                         ------------------------------------------------------------
  444.                                                                                     |
  445.                                                                                     |
  446.   IBM HL03.                                                                         |
  447.   --------                                                                          |
  448.           2        1    1    1     2        1     1     *                           |
  449.          -------- ---- ----- ---- -------- ----- ----- ---------//---               |
  450.         |rec len |type|type |FID |type    |FID  |name |pointer       |              |
  451.         |        |    |qual |indx|index   |strng|len  |name          |              |
  452.         |        |0x7A|     |0x83|        |0x82 |     |              |              |
  453.          -------- ---- ---------- -------- ----- ---------------//---               |
  454.                        |                                                            |    Pointer Model
  455.                        |                                                            |    ------------
  456.                         ---------------------------------------------------------------> 2 1 0
  457.                                                                                     |    ------------
  458.                                                                                     |    x x 0 - 16 bit
  459.                                                                                     |    x x 1 - 32 bit
  460.                                                                                     |    x 0 x - near
  461.                                                                                     |    x 1 x - far
  462.                                                                                     |
  463.   SD386 Internal.                                                                   |
  464.   --------------                                                                    |
  465.                                                                                     |
  466.       T          N         I          S                                             |
  467.      ---------- --------- ---------- ----------                                     |
  468.     | Trec     | Flags   | type     | ptr      |                                    |
  469.     | 0x7A     |         | index    | name     |                                    |
  470.      ---------- --------- ---------- ----------                                     |
  471.                                                                                     |
  472.                            ---------------------------------------------------------
  473.                           |
  474.           2        1    1 |  1     2        1     2        *
  475.          -------- ---- ----- ---- -------- ----- -------- ---------//---
  476.         |rec len |type|flgs |FID |type    |FID  |name    |pointer       |
  477.         |        |    |     |indx|index   |strng|len     |name          |
  478.         |        |0x7A|     |0x83|        |0x82 |        |              |
  479.          -------- ---- ---------- -------- ----- ------------------//---
  480.  
  481.   Notes:
  482.  
  483.    1. We will have to map the Microsoft "model" leaf to our "type qual" in the Trec leaf.
  484.    2. The "Flags" leaf will be a combination of the IBM "type qualifier" and the Microsoft
  485.       "Model" leaf.
  486.    3. We will map all 0:16 pointers to a primitive type of "Ex." This is actually a huge
  487.       pointer, but since we don't support huge pointers, we will steal the type to serve our purpose.
  488.       So, when we are mapping Microsoft "type indexes", if we encounter an "Ax" type, then we
  489.       need to map it to an "Ex". We will have to perform this test for ALL type index fields, both in
  490.       symbols and in types.
  491. 1------------------------------------------------------------------------------
  492.  
  493.  Enums.
  494.  -----
  495.  
  496.   Microsoft 16/32 bit.
  497.   -------------------
  498.  
  499.       T          N         N         S         I         SN        SN
  500.      ---------- --------- --------- --------- --------- --------- ---------
  501.     | Trec     | Length  | base    | name    | name lst| lbnd    | ubnd    |
  502.     |          | in bits | type    |         | index   |         |         |
  503.      ---------- --------- --------- --------- --------- --------- ---------
  504.  
  505.     1     2        1    1    1    1     1    *             1     2        @    @
  506.     ---- -------- ---- ---- ---- ----- ---- ---------//--- ---- -------- ---- ----
  507.    |rec |rec len |type|len |base|FID  |name|enum tag name |FID |name lst|lbnd|ubnd|
  508.    |id  |        |    |    |type|strng|len |              |indx|index   |    |    |
  509.    |0x01|        |0x7B|    |    |0x82 |    |              |0x83|        |    |    |
  510.     ---- -------- ---- ---- ---- ----- --------------//--- ---- -------- ---- ----
  511.                          |    |                                            |    |
  512.     numeric leaf of the -      ---- 0x7C - unsigned   numeric leaf of the -      - numeric leaf of the
  513.     size of the scalar              0x7D - signed     minimum value that           maximum value that
  514.     in bits. This will be:          0x6F - character  the scalar is
  515.     0x08 -  8 bits
  516.     0x10 - 16 bits
  517.     0x20 - 32 bits                                                                 to take.
  518.  
  519.  
  520.  
  521.   IBM HL01,HL02. ( The doc shows the name following the data type;however, the dumper shows it like this:)
  522.   -------------
  523.     1     2        1    1    1     2       1     2        @    @    1     1    *
  524.     ---- -------- ---- ----- ---- -------- ---- -------- ---- ---- ----- ---- ---------//---
  525.    |rec |rec len |type|type |FID |data    |FID |member  |lbnd|ubnd|FID  |name|enum tag name |
  526.    |id  |        |    |qual |indx|type    |indx|list    |    |    |strng|len |              |
  527.    |0x01|        |0x7B|     |0x83|        |0x83|index   |    |    |0x82 |    |              |
  528.     ---- -------- ---- ---------- -------- ---- -------- ---- ---- ----- --------------//---
  529.                                    |                       |    |
  530.        One of the primitive -------   numeric leaf of the -      - numeric leaf of the -
  531.        data types.                    minimum value that           maximum value that
  532.                                       the scalar is allowed        the scalar is allowed
  533.                                       to take.                     to take.
  534.  
  535.   IBM HL03.
  536.   --------
  537.           2        1    1    1     2       1     2        @    @    1     1    *
  538.          -------- ---- ----- ---- -------- ---- -------- ---- ---- ----- ---- ---------//---
  539.         |rec len |type|type |FID |data    |FID |member  |lbnd|ubnd|FID  |name|enum tag name |
  540.         |        |    |qual |indx|type    |indx|list    |    |    |strng|len |              |
  541.         |        |0x7B|     |0x83|        |0x83|index   |    |    |0x82 |    |              |
  542.          -------- ---- ---------- -------- ---- -------- ---- ---- ----- --------------//---
  543.                                    |                       |    |
  544.        One of the primitive -------   numeric leaf of the -      - numeric leaf of the -
  545.        data types.                    minimum value that           maximum value that
  546.                                       the scalar is allowed        the scalar is allowed
  547.                                       to take.                     to take.
  548.  
  549.   SD386 Internal.
  550.   ---------------
  551.       T          I          I         SN        SN        S
  552.      ---------- --------- --------- --------- --------- ---------
  553.     | Trec     | Data    | Name Lst| Lower   | Upper   | Tag     |
  554.     |          | type    | index   | bound   | bound   | name    |
  555.      ---------- --------- --------- --------- --------- ---------
  556.  
  557.  
  558.           2        1   1     2       1     2        1    4                1    4                 1     2       *
  559.          -------- ---- ---- -------- ---- -------- ---- ---------------- ---- ---------------- ----- ------- ---------//---
  560.         |rec len |type|FID |data    |FID |name    |FID |lbnd            |FID |ubnd            |FID  |name   |enum tag name |
  561.         |        |    |indx|type    |indx|list    |span|                |span|                |strng|len    |              |
  562.         |        |0x7B|0x83|        |0x83|index   |0x86|                |0x86|                |0x82 |       |              |
  563.          -------- ---- ---- -------- ---- -------- ---- ---------------- ---- ---------------- ----- -----------------//---
  564.                                 |                     |                   |
  565.        One of the primitive ----  numeric leaf of the-                     --- numeric leaf of the
  566.        data types.                minimum value that                           maximum value that
  567.                                   the scalar is allowed                        the scalar is allowed
  568.                                   to take.                                     to take.
  569.  
  570.   Notes:
  571.  
  572.    1. We will map the Microsoft "base type" field to "data type" by converting the Microsoft designators
  573.       to primitive types.
  574.  
  575.    2. The IBM format supports a Scalar( 0x51 ) type in addition an enum type. The IBM enum type is
  576.       the same as the Microsoft Scalar record. We do not support the IBM Scalar type.
  577.  
  578. 1------------------------------------------------------------------------------
  579.  
  580.  Scalars ( simplified form of the enum record.)
  581.  -------
  582.  
  583.   Microsoft 16/32 bit.
  584.   -------------------
  585.  
  586.       T          N         N
  587.      ---------- --------- ---------
  588.     | Trec     | Length  | base    |
  589.     |          | in bits | type    |
  590.      ---------- --------- ---------
  591.  
  592.     1     2        1    1    1
  593.     ---- -------- ---- ---- ----
  594.    |rec |rec len |type|len |base|
  595.    |id  |        |    |    |type|
  596.    |0x01|        |0x7B|    |    |
  597.     ---- -------- ---- ---- ----
  598.                          |    |
  599.     numeric leaf of the -      ---- 0x7C - unsigned
  600.     size of the scalar              0x7D - signed
  601.     in bits. This should            0x6F - character
  602.     always be 0x10 for 16
  603.     bit and 0x20 for 32 bit.
  604.  
  605.  
  606.     IBM HL01,HL02.
  607.     -------------                                                                                ---------
  608.                             ----------------------------------------------------------------------3 2 1 0
  609.                           |                                                                       --------
  610.                           |                                                                       x x x 0 - unpacked
  611.     1     2        1    1 |  1     2       1     1        1                                         x x x 1 - packed
  612.     ---- -------- ---- ----- ---- -------- ---- -------- -----                                      x x 0 x - real
  613.    |rec |rec len |type|type |FID |data    |FID |precis- |scale|                                     x x 1 x - complex
  614.    |id  |        |    |qual |indx|type    |prec|ion     |factr|                                     x 0 x x - fixed
  615.    |0x01|        |0x51|     |0x83|        |0x8C|        |     |                                     x 1 x x - float
  616.     ---- -------- ---- ---------- -------- ---- -------- -----                                      0 x x x - binary
  617.                                    |      |<----ignore these->|                                     1 x x x - decimal
  618.        One of the primitive -------             fields. Do
  619.        data types.                              not map.
  620.  
  621.  
  622.   IBM HL03.
  623.   --------
  624.                             ----------------------------------------------------------------------3 2 1 0
  625.                           |                                                                       --------
  626.                           |                                                                       x x x 0 - unpacked
  627.           2        1    1 |  1     2       1     1        1                                         x x x 1 - packed
  628.          -------- ---- ----- ---- -------- ---- -------- -----                                      x x 0 x - real
  629.         |rec len |type|type |FID |data    |FID |precis- |scale|                                     x x 1 x - complex
  630.         |        |    |qual |indx|type    |prec|ion     |factr|                                     x 0 x x - fixed
  631.         |        |0x51|     |0x83|        |0x8C|        |     |                                     x 1 x x - float
  632.          -------- ---- ---------- -------- ---- -------- -----                                      0 x x x - binary
  633.                                    |      |<----ignore these->|                                     1 x x x - decimal
  634.        One of the primitive -------             fields. Do
  635.        data types.                              not map.
  636.  
  637.   SD386 Internal.
  638.   ---------------
  639.  
  640.       T          I
  641.      ---------- ---------
  642.     | Trec     | Data    |
  643.     |          | type    |
  644.      ---------- ---------
  645.  
  646.  
  647.           2        1   1     2
  648.          -------- ---- ---- --------
  649.         |rec len |type|FID |data    |
  650.         |        |    |indx|type    |
  651.         |        |0x51|0x83|        |
  652.          -------- ---- ---- --------
  653.                                 |
  654.        One of the primitive ----
  655.        data types.
  656.  
  657.  
  658.  
  659.   Notes:
  660.  
  661.    1. We will map the Microsoft 0x7B simplified scalar to our internal 0x51 scalar.
  662.  
  663. 1------------------------------------------------------------------------------
  664.  
  665.  Arrays.
  666.  ------
  667.  
  668.   Microsoft 16/32 bit.
  669.   -------------------
  670.       T          UN        I         I         S
  671.      ---------- --------- --------- --------- ---------
  672.     | Trec     | Size in | Element | Indexing| Array   |<-- These last two fields are optional and probably
  673.     | 0x78     | bits    | Type    | Method  | Name    |    won't be there.
  674.      ---------- --------- --------- --------- ---------
  675.  
  676.  
  677.     1     2        1    @   1     2       1     2       1     1     *
  678.     ---- -------- ---- ---- ---- -------- ---- -------- ---- ----- ---------//---
  679.    |rec |rec len |type|len |FID |element |FID |indexing|FID |name |name          |
  680.    |id  |        |    |    |indx|type    |indx|method  |indx|len  |              |
  681.    |0x01|        |0x78|    |0x83|        |0x83|        |0x82|     |              |
  682.     ---- -------- ---- ---- ---- -------- ---- -------- ---- ----- ---------//---
  683.                          |         |       optional.
  684.                          |         |     |<------------------------------------->|
  685.     numeric leaf of the -          |
  686.     size of the array              |       We do not use these in ( or see them in a dump of )
  687.     in bits.                       |       the Microsoft format.
  688.                                    |
  689.                                      ---This is a primitive type or an index of a complex type.
  690.  
  691.   IBM HL01,HL02.
  692.   -------------
  693.     1     2        1    1    4                   1     2       1     2       1     1     *
  694.     ---- -------- ---- ---- -------------------- ---- -------- ---- -------- ---- ----- ---------//---
  695.    |rec |rec len |type|type|array size in bytes |FID |bounds  |FID |elem    |FID |name |array name    |
  696.    |id  |        |    |qual|                    |indx|index   |indx|type    |indx|len  |              |
  697.    |0x01|        |0x78|    |                    |0x83|        |0x83|        |0x82|     |              |
  698.     ---- -------- ---- ---- -------------------- ---- -------- ---- -------- ---- ----- ---------//---
  699.                         |    |                         |             |
  700.                         |    |                         |              ---This is a primitive type or an index of a complex type.
  701.                         |    |                         |
  702.                         |    |                          --This is the type index for a record that
  703.                         |    |                            contains the array bounds.
  704.                         |    |
  705.                         |      --- note that this number is not a numeric leaf
  706.                         |          and it should be.
  707.                         |
  708.   -----                 |
  709.   2 1 0 <-bit ----------
  710.   -----
  711.   x x 0 - row major
  712.   x x 1 - column major
  713.   x 0 x - unpacked
  714.   x 1 x - packed
  715.   0 x x - no descriptor required
  716.   1 x x - descriptor provided
  717.  
  718.  
  719.   IBM HL03.
  720.   --------
  721.           2        1    1    4                   1     2       1     2       1     1     *
  722.          -------- ---- ---- -------------------- ---- -------- ---- -------- ---- ----- ---------//---
  723.         |rec len |type|type|array size in bytes |FID |bounds  |FID |elem    |FID |name |array name    |
  724.         |        |    |qual|                    |indx|index   |indx|type    |indx|len  |              |
  725.         |        |0x78|    |                    |0x83|        |0x83|        |0x82|     |              |
  726.          -------- ---- ---- -------------------- ---- -------- ---- -------- ---- ----- ---------//---
  727.                         |    |                         |             |
  728.                         |    |                         |              ---This is a primitive type or an index of a complex type.
  729.                         |    |                         |
  730.                         |    |                          --This is the type index for a record that
  731.                         |    |                            contains the array bounds.
  732.                         |    |
  733.                         |      --- note that this number is not a numeric leaf
  734.                         |          and it should be.
  735.                         |
  736.   -----                 |
  737.   2 1 0 <-bit ----------
  738.   -----
  739.   x x 0 - row major
  740.   x x 1 - column major
  741.   x 0 x - unpacked
  742.   x 1 x - packed
  743.   0 x x - no descriptor required
  744.   1 x x - descriptor provided
  745. 1------------------------------------------------------------------------------
  746.  
  747.   SD386 Internal.
  748.   ---------------
  749.  
  750.       T          N         SN        I           I         S
  751.      ---------- --------- --------- ------------ --------- ---------
  752.     | Trec     | Flags   | Size in | Bounds     | Element | Array   |
  753.     | 0x78     |         | Bytes   | Type Index | Type    | Name    |
  754.      ---------- --------- --------- ------------ --------- ---------
  755.  
  756.           2        1    1   1     4                   1     2       1     2       1     2        *
  757.          -------- ---- ---- ---- -------------------- ---- -------- ---- -------- ---- -------- ---------//---
  758.         |rec len |type|flgs|FID |array size in bytes |FID |bounds  |FID |elem    |FID |name    |array name    |
  759.         |        |    |    |indx|                    |indx|typ indx|indx|type    |indx|len     |              |
  760.         |        |0x78|    |0x8A|                    |0x83|        |0x83|        |0x82|        |              |
  761.          -------- ---- ---- ---- -------------------- ---- -------- ---- -------- ---- -------- ---------//---
  762.  
  763.     Notes:
  764.      1. Set the bounds index = 0;
  765.      2. In the Microsoft records, the indexing method leaf and the name leaf are optional.
  766.      3. We assume that the "indexing method" specified in the Microsoft format is always "int" so
  767.         we will ignore this field.
  768.      4. In the IBM records, there will be a name leaf;however, it will have a zero length.
  769.      5. Example Microsoft dump:
  770.  
  771.                               523) Array  : Bytes:40 Type:515
  772.                                             7885 4001 8303 02
  773.      6. Example IBM dump:
  774.                               515) Array    : RowMjr Unpacked No-Desc-Req Bytes:80 Bounds:0 Type:LONG
  775.                                               Name:**NoName**
  776.                                               7800 5000 0000 8300 0083 8200 8200
  777.  
  778. 1------------------------------------------------------------------------------
  779.  Lists.
  780.  ------
  781.  
  782.   Microsoft 16/32 bit.
  783.   -------------------
  784.  
  785.     Type List
  786.       T          I         I
  787.      ---------- --------- --------- ----/...
  788.     | Trec     | Type    | Type    |
  789.     | 0x7F     | Index   | Index   |
  790.      ---------- --------- --------- ----/...
  791.  
  792.     1     2        1   1     2       1     2
  793.     ---- -------- ---- ---- -------- ---- -------- ----/...
  794.    |rec |rec len |type|FID |type    |FID |type    |
  795.    |id  |        |    |indx|        |indx|        |
  796.    |0x01|        |0x7F|0x83|        |0x83|        |
  797.     ---- -------- ---- ---- -------- ---- -------- ----/...
  798.  
  799.     Name List
  800.       T          S         SN
  801.      ---------- --------- --------- ----/...
  802.     | Trec     | Name    | Offset  |
  803.     | 0x7F     |         |         |
  804.      ---------- --------- --------- ----/...
  805.  
  806.     1     2        1   1     1     *             @      1     1     *             @
  807.     ---- -------- ---- ---- ----- ---------//--- ------ ---- ----- ---------//--- ------ ----/...
  808.    |rec |rec len |type|FID |name |member name   |offset|FID |name |member name   |offset|
  809.    |id  |        |    |indx|len  |              |      |indx|len  |              |      |
  810.    |0x01|        |0x7F|0x82|     |              |      |0x82|     |              |      |
  811.     ---- -------- ---- ---- ----- ---------//--- ------ ---- ----- ---------//--- ------ ----/...
  812.  
  813.   IBM HL01,HL02.
  814.   -------------
  815.  
  816.     Type List
  817.     1     2        1    1   1     2       1     2
  818.     ---- -------- ---- ---- ---- -------- ---- -------- ----/...
  819.    |rec |rec len |type|type|FID |type    |FID |type    |
  820.    |id  |        |    |qual|indx|        |indx|        |
  821.    |0x01|        |0x7F|    |0x83|        |0x83|        |
  822.     ---- -------- ---- ---- ---- -------- ---- -------- ----/...
  823.                         |
  824.                         |                                                  -----
  825.                         |<-----------------------------------------------  2 1 0 <-bit
  826.                         |                                                  -----
  827.                         |                                                  0 0 0 - not used
  828.                         |                                                  0 0 1 - type list
  829.                         |                                                  0 1 0 - name list
  830.                         |                                                  0 1 1 - enumerated list
  831.                         |                                                  1 0 0 - proc list
  832.                         |
  833.     Name List           |
  834.     1     2        1    1   1     1     *             @      1     1     *             @
  835.     ---- -------- ---- ---- ---- ----- ---------//--- ------ ---- ----- ---------//--- ------ ----/...
  836.    |rec |rec len |type|type|FID |name |member name   |byte  |FID |name |member name   |byte  |
  837.    |id  |        |    |qual|indx|len  |              |offset|indx|len  |              |offset|
  838.    |0x01|        |0x7F|    |0x82|     |              |      |0x82|     |              |      |
  839.     ---- -------- ---- ---- ---- ----- ---------//--- ------ ---- ----- ---------//--- ------ ----/...
  840.                                                             |
  841.                                                              --numeric leaf with the offset of the
  842.                                                                member relative to the beginning
  843.                                                                of the structure.
  844.  
  845.   IBM HL03.
  846.   --------                  -- see flags for HL01/HL02
  847.                           |
  848.     Type List             |
  849.           2        1    1 | 1     2       1     2
  850.          -------- ---- ---- ---- -------- ---- -------- ----/...
  851.         |rec len |type|type|FID |type    |FID |type    |
  852.         |        |    |qual|indx|        |indx|        |
  853.         |        |0x7F|    |0x83|        |0x83|        |
  854.          -------- ---- ---- ---- -------- ---- -------- ----/...
  855.  
  856.     Name List
  857.           2        1    1   1      1     *             @      1      1     *             @
  858.          -------- ---- ---- ----- ----- ---------//--- ------ ----- ----- ---------//--- ------ ----/...
  859.         |rec len |type|type|FID  |name |member name   |byte  |FID  |name |member name   |byte  |
  860.         |        |    |qual|strng|len  |              |offset|strng|len  |              |offset|
  861.         |        |0x7F|    |0x82 |     |              |      |0x82 |     |              |      |
  862.          -------- ---- ---- ----- ----- ---------//--- ------ ----- ----- ---------//--- ------ ----/...
  863.                                                             |
  864.                                                              --numeric leaf with the offset of the
  865.                                                                member relative to the beginning
  866.                                                                of the structure.
  867.  
  868.   SD386 Internal.
  869.   ---------------
  870.  
  871.     Type List
  872.  
  873.       T         1       I         I
  874.      ---------- ------ --------- --------- ----/...
  875.     | Trec     |Flags | Type    | Type    |
  876.     | 0x7F     |      | Index   | Index   |
  877.      ---------- ------ --------- --------- ----/...
  878.  
  879.           2        1   1    1     2       1     2
  880.          -------- ---- ---- ---- -------- ---- -------- ----/...
  881.         |rec len |type|flgs|FID |type    |FID |type    |
  882.         |        |    |    |indx|        |indx|        |
  883.         |        |0x7F|    |0x83|        |0x83|        |
  884.          -------- ---- ---- ---- -------- ---- -------- ----/...
  885.                         |
  886.                         |                                               -----
  887.                          ---------------------------------------------- 2 1 0 <-bit
  888.     Name List                                                      |    -----
  889.                                                                    |    0 0 0 - not used
  890.       T         1       S         UN                               |    0 0 1 - type list
  891.      ---------- ------ --------- --------- ----/...                |    0 1 0 - name list
  892.     | Trec     |Flags | Name    | Byte    |                        |    0 1 1 - enumerated list
  893.     | 0x7F     |      |         | Offset  |                        |    1 0 0 - proc list
  894.      ---------- ------ --------- --------- ----/...                |
  895.                                                                    |
  896.                           -----------------------------------------
  897.                          |
  898.           2        1   1 |  1     2        *             1    4      1     2         *             1    4
  899.          -------- ---- ---- ---- -------- ---------//--- ----------- ---- --------- ---------//--- ----------- ----/...
  900.         |rec len |type|flgs|FID |name    |member name   |FID |byte  |FID |name     |member name   |FID |byte  |
  901.         |        |    |    |indx|len     |              |span|offset|indx|len      |              |span|offset|
  902.         |        |0x7F|    |0x82|        |              |    |      |0x82|         |              |    |      |
  903.          -------- ---- ---- ---- -------- ---------//--- ---- ------ ---- --------- ---------//--- ---- ------ ----/...
  904.                                                                |
  905.                                                                 --numeric leaf with the offset of the
  906.                                                                   member relative to the beginning
  907.                                                                   of the structure.
  908.  
  909. 1------------------------------------------------------------------------------
  910.  Procedures/Functions.
  911.  ---------------------
  912.  
  913.   Microsoft 16/32 bit.
  914.   -------------------
  915.       T                    I         N         N         I
  916.      ---------- --------- --------- --------- --------- ----------
  917.     | Trec     | Null    | Return  | Calling | Num     | Parm Type|
  918.     | 0x75     |         | Type    | conv    | Parms   | Index    |
  919.      ---------- --------- --------- --------- --------- ----------
  920.  
  921.     1     2        1    1   1     2       1    1     1     2
  922.     ---- -------- ---- ---- ---- -------- ---- ----- ---- --------
  923.    |rec |rec len |type|null|FID |ret type|call|num  |FID |type    |<-----type index of list of type indexes for the
  924.    |id  |        |    |    |indx|index   |conv|parms|indx|index   |      parameter types.
  925.    |0x01|        |0x75|0x80|0x83|        |    |     |0x83|        |
  926.     ---- -------- ---- ---- ---- -------- ---- ----- ---- --------
  927.                                            |
  928.                                            |
  929.                                              ----------------------------calling convention of
  930.                                                                          the procedure.
  931.  
  932.                                                                           0x63 - c ( args pushed right to left, caller pops )
  933.                                                                           0x64 - c long
  934.                                                                           0x95 - near fastcall
  935.                                                                           0x96 - far fastcall
  936.  
  937.   IBM HL01, HL02. ( IBM generates function(0x54) records.)
  938.   --------------
  939.     1     2        1    1   2             2          1     2       1     2
  940.     ---- -------- ---- ---- ------------ ----------- ---- -------- ---- --------
  941.    |rec |rec len |type|type|num of parms|max parms  |FID |ret type|FID |type    |<----- type index of list of type indexes for the
  942.    |id  |        |    |qual|            |           |indx|index   |indx|index   |  |    parameter types.
  943.    |0x01|        |0x54|    |            |           |0x83|        |0x83|        |  |
  944.     ---- -------- ---- ---- ------------ ----------- ---- -------- ---- --------   |
  945.                          |                                                         |
  946.                          |                                                         |    -----------
  947.                          |<-------------------------------------------------------- --- 5 4 3 2 1 0 <-bit
  948.                          |                                                         |    -----------
  949.                          |                                                         |    x x x x x 0 - args pushed left to right
  950.                          |                                                         |    x x x x x 1 - args pushed right to left
  951.                          |                                                         |    x x x x 0 x - callee pops
  952.                          |                                                         |    x x x x 1 x - caller pops
  953.                          |                                                         |    x x x 0 x x - 16 bit function
  954.                          |                                                         |    x x x 1 x x - 32 bit function
  955.                          |                                                         |    x x 0 x x x - near
  956.                          |                                                         |    x x 1 x x x - far
  957.                          |                                                         |    x 0 x x x x - fixed parms
  958.                          |                                                         |    x 1 x x x x - variable parms
  959.                          |                                                         |    0 x x x x x - OS/2 calling convention
  960.                          |                                                         |    1 x x x x x - private calling convention
  961.                          |                                                         |
  962.   IBM HL03.              |                                                         |
  963.   --------               |                                                         |
  964.           2        1    1|  2             2          1     2       1     2         |
  965.          -------- ---- ---- ------------ ----------- ---- -------- ---- --------   |
  966.         |rec len |type|type|num of parms|max parms  |FID |ret type|FID |type    |  |
  967.         |        |    |qual|            |           |indx|index   |indx|index   |<-
  968.         |        |0x54|    |            |           |0x83|        |0x83|        |
  969.          -------- ---- ---- ------------ ----------- ---- -------- ---- --------
  970.  
  971. 1------------------------------------------------------------------------------
  972.   SD386 Internal.
  973.   ---------------
  974.  
  975.       T          N         UN        UN        I         I
  976.      ---------- --------- --------- --------- --------- ----------
  977.     | Trec     | Flags   | Number  | Max num | Return  | Parm List|
  978.     | 0x75     |         | of parms| of parms| Type    | Index    |
  979.      ---------- --------- --------- --------- --------- ----------
  980.  
  981.           2        1    1   1    2            1     2          1     2       1     2
  982.          -------- ---- ---- ---- ------------ ---------------- ---- -------- ---- --------
  983.         |rec len |type|flgs|FID |num of parms|FID |max parms  |FID |ret type|FID |parm lst|<---type index of list of type indexes for the
  984.         |        |    |    |span|            |span|           |indx|index   |indx|index   |    parameter types.
  985.         |        |0x75|    |0x85|            |0x85|           |0x83|        |0x83|        |
  986.          -------- ---- ---- ---- ------------ ---- ----------- ---- -------- ---- --------
  987.                          |
  988.                          |
  989.    -----------           |
  990.    5 4 3 2 1 0 <-bit ----
  991.    -----------
  992.    x x x x x 0 - args pushed left to right
  993.    x x x x x 1 - args pushed right to left
  994.    x x x x 0 x - callee pops
  995.    x x x x 1 x - caller pops
  996.    x x x 0 x x - 16 bit function
  997.    x x x 1 x x - 32 bit function
  998.    x x 0 x x x - near
  999.    x x 1 x x x - far
  1000.    x 0 x x x x - fixed parms
  1001.    x 1 x x x x - variable parms
  1002.    0 x x x x x - OS/2 calling convention
  1003.    1 x x x x x - private calling convention
  1004.  
  1005.    Notes:
  1006.  
  1007.      1. Map the Microsoft the calling convention to the IBM type qualifier byte.
  1008.      2. Do not map the Microsoft "null" leaf.
  1009.  
  1010.  
  1011. 1------------------------------------------------------------------------------
  1012.  
  1013.  Skip.
  1014.  ----
  1015.  
  1016.   Microsoft 16/32 bit.
  1017.   -------------------
  1018.       T          2         ?
  1019.      ---------- --------- ---------
  1020.     | Trec     | Next    | padding |
  1021.     | 0x90     | Index   |         |
  1022.      ---------- --------- ---------
  1023.  
  1024.     1     2        1    2        *
  1025.     ---- -------- ---- -------- ----
  1026.    |rec |rec len |type|new     |pad |
  1027.    |id  |        |    |index   |    |
  1028.    |0x01|        |0x90|        |    |
  1029.     ---- -------- ---- -------- ----
  1030.                              |
  1031.                              |
  1032.                               -- this is the next sequential index.
  1033.  
  1034.   IBM HL01,HL02,HL03.
  1035.   -------------------
  1036.  
  1037.     Not supported.
  1038.  
  1039.  
  1040.   SD386 Internal.
  1041.   --------------
  1042.       T          I
  1043.      ---------- ---------
  1044.     | Trec     | Next    |
  1045.     | 0x94     | Index   |
  1046.      ---------- ---------
  1047.  
  1048.           2        1    2
  1049.          -------- ---- --------
  1050.         |rec len |type|new     |
  1051.         |        |    |index   |
  1052.         |        |0x90|        |
  1053.          -------- ---- --------
  1054.                              |
  1055.                              |
  1056.                               -- this is the sequential index.
  1057.  
  1058.  
  1059. 1------------------------------------------------------------------------------
  1060.  
  1061.  Null.
  1062.  ----
  1063.  
  1064.   Microsoft.
  1065.   ---------
  1066.  
  1067.       T
  1068.      ----------
  1069.     | Trec     |
  1070.     | 0x80     |
  1071.      ----------
  1072.  
  1073.     1     2        1
  1074.     ---- -------- ----
  1075.    |rec |rec len |type|
  1076.    |id  |        |    |
  1077.    |0x01|        |0x80|
  1078.     ---- -------- ----
  1079.  
  1080.   IBM HL01,HL02,HL03.
  1081.   -------------------
  1082.  
  1083.     Not supported.
  1084.  
  1085.   SD386 Internal.
  1086.   --------------
  1087.  
  1088.       T
  1089.      ----------
  1090.     | Trec     |
  1091.     | 0x80     |
  1092.      ----------
  1093.  
  1094.           2        1
  1095.          -------- ----
  1096.         |rec len |type|
  1097.         |        |    |
  1098.         |        |0x80|
  1099.          -------- ----
  1100.  
  1101.    Notes:
  1102.  
  1103.    1.  All records that we don't support will be mapped to this record.
  1104.  
  1105.    2.  There is no "Flags" leaf for this record.
  1106.  
  1107. 1------------------------------------------------------------------------------
  1108.  
  1109.  Class
  1110.  -----
  1111.  
  1112.   Microsoft 16/32 bit.
  1113.   -------------------
  1114.   IBM HL01,HL02,HL03.
  1115.   ------------------
  1116.  
  1117.     - Not supported.
  1118.  
  1119.   IBM HL04.
  1120.   ---------
  1121.           2        1   1     4                2        2        1     1     *
  1122.          -------- ---- ---- ---------------- -------- -------- ----- ----- ---------/
  1123.         |rec len |type|type| size of class  |num     |item lst|ENC  |ENC  |class
  1124.         |        |    |qual| in bytes       |class   |index   |1st  |2nd  |name
  1125.         |        |0x40|    |                |members |        |Byte |Byte |
  1126.          -------- ---- ---- ---------------- -------- -------- --------------------//
  1127.  
  1128.   SD386 Internal.
  1129.   --------------
  1130.  
  1131.           2        1   1     4                2        2        2        *
  1132.          -------- ---- ---- ---------------- -------- -------- -------- ---------/
  1133.         |rec len |type|type| size of class  |num     |item lst|name    |class
  1134.         |        |    |qual| in bytes       |class   |index   |len     |tag name
  1135.         |        |0x79|    |                |members |        |        |
  1136.          -------- ---- ---- ---------------- -------- -------- -----------------//
  1137.  
  1138. 1------------------------------------------------------------------------------
  1139.  
  1140.  Member Function
  1141.  ---------------
  1142.  
  1143.   Microsoft 16/32 bit.
  1144.   -------------------
  1145.   IBM HL01,HL02,HL03.
  1146.   ------------------
  1147.  
  1148.     - Not supported.
  1149.  
  1150.   IBM HL04.
  1151.   ---------
  1152.  
  1153.      non-virtual member
  1154.      ------------------
  1155.  
  1156.           2        1   1     1    2        1/2         *
  1157.          -------- ---- ---- ---- -------- ----- ----- ---------/
  1158.         |rec len |type|type|pro-|sub     |ENC        |member
  1159.         |        |    |qual|tect|record  |Length     |name
  1160.         |        |0x45|    |ion |index   |Prefix     |
  1161.          -------- ---- ---- ---- -------- --------------------//
  1162.  
  1163.  
  1164.      virtual member
  1165.      --------------
  1166.  
  1167.           2        1   1     1    2        @               @         *
  1168.          -------- ---- ---- ---- -------- --------------- --------- ---------/
  1169.         |rec len |type|type|pro-|sub     |FID_span/virtno|  ENC    |member
  1170.         |        |    |qual|tect|record  |               |         |name
  1171.         |        |0x45|    |ion |index   |               |         |
  1172.          -------- ---- ---- ---- -------- ----------------------------------//
  1173.  
  1174.   SD386 Internal.
  1175.   --------------
  1176.           2        1   1     1    2        4               2         *
  1177.          -------- ---- ---- ---- -------- --------------- --------- ---------/
  1178.         |rec len |type|type|pro-|sub     |vTableIndex    | name    |member
  1179.         |        |    |qual|tect|record  |               | len     |name
  1180.         |        |0x45|    |ion |index   |               |         |
  1181.          -------- ---- ---- ---- -------- ----------------------------------//
  1182.  
  1183.