home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 4 Drivers / 04-Drivers.zip / cs0929a.zip / myprintf.lst < prev    next >
Encoding:
File List  |  1999-09-29  |  44.8 KB  |  1,170 lines

  1.  
  2. Module: D:\dev\csrc\os2dd\scd\myprintf.c
  3. Group: 'DGROUP' CONST,CONST2,_DATA,_BSS
  4.  
  5. Segment: _DATA  WORD   00000011 bytes  
  6.  0000  30 31 32 33 34 35 36 37 _ddhextab       - 01234567
  7.  0008  38 39 41 42 43 44 45 46                 - 89ABCDEF
  8.  0010  00                                      - .
  9.  
  10. No disassembly errors
  11.  
  12. ------------------------------------------------------------
  13.  
  14. Segment: _BSS  PARA   00000104 bytes  
  15.  
  16. No disassembly errors
  17.  
  18. ------------------------------------------------------------
  19.  
  20. Segment: _TEXT  PARA   00000566 bytes  
  21.  
  22. //
  23. // myprintf()
  24. // 25-Jan-99
  25. //
  26. // see ras40's stuff for perhaps a more recent version
  27. //
  28. // Note: if "%s" then string pointer in the ,... section must be a FAR POINTER! in the , ...
  29. //       part of the string:  ddprintf(dest,"%s","a string"); will fail because compiler
  30. //       only passes near pointer for "a string" -- either pass a far pointer, or use
  31. //       ddprintf(dest,"%s",(char __far *)"a string"), or don't use strings in the arg list,
  32. //       but instead actual (far) pointers
  33. //
  34. // static VOID PrintCom(USHORT basePort, UCHAR byte);
  35. // static VOID ddputstring (char far *St);
  36. // static char far *ddprintf_DecWordToASCII(char far *StrPtr, WORD wDecVal, WORD Option);
  37. // static char far *ddprintf_DecLongToASCII(char far *StrPtr, DWORD lDecVal,WORD Option);
  38. // static char far *ddprintf_HexWordToASCII(char far *StrPtr, WORD wHexVal, WORD Option);
  39. // static char far *ddprintf_HexLongToASCII(char far *StrPtr, DWORD wHexVal, WORD Option);
  40. // VOID __cdecl ddprintf (char far *DbgStr , ...);
  41. //
  42. // writes to com port 2 a ddprintf() string (up to MAX_STR_SIZE bytes)
  43. // (or could write to screen at init (DosPutMessage) or basedev (devhelp save_message)
  44. //
  45. // 16-bit version, so %u limited to word-size data (use %lh for 32-bit data (%lx, too)
  46. // though %p always goes after seg:off so expects 32-bit data
  47. //
  48. // should only include in debug builds (probably, or at least move data and code to INIT segment)
  49.  
  50. //#define DRV_16 (can only find it used in a PAS16 mixer thing)
  51.  
  52. //#define FAST_OUT  // only output strings starting with ~ if defined
  53.  
  54. #include "cs40.h"
  55.  
  56. #pragma code_seg ("_TEXT");
  57. #pragma data_seg ("_DATA","DATA");
  58.  
  59. #define MAX_STR_SIZE 260
  60.  
  61. #define LEADING_ZEROES          0x8000
  62. #define SIGNIFICANT_FIELD       0x0007
  63.  
  64. static char ddhextab[]="0123456789ABCDEF";
  65. static char dd_BuildString[MAX_STR_SIZE];
  66.  
  67. // Following declarations are need for string display from basedev
  68. //#define MSG_REPLACEMENT_STRING 1178   /* replacement string */
  69. //UCHAR szStringOut [CCHMAXPATH];
  70. //static MSGTABLE StringOutMsg = {MSG_REPLACEMENT_STRING, 1, NULL};
  71.  
  72. // dx+5 is LSR register
  73. // dx is baseport (also data register)
  74.  
  75. VOID PrintCom(USHORT basePort, UCHAR byte);  // aux asm macro
  76. #pragma aux PrintCom =\
  77.         "add dx,5"    \
  78. "wait4:  in al,dx"    \
  79.         "test al,20h" \
  80.         "jz wait4"    \
  81.         "sub dx,5"    \
  82.         "mov al,ah"   \
  83.         "out dx,al"   \
  84.  parm caller nomemory [dx] [ah]  \
  85.  modify exact [ax dx];
  86.  
  87.  
  88. static VOID ddputstring (char far *St) {
  89.  
  90. // putmessage
  91.    //int      iMsgLength;
  92.    //char far *TempSt;
  93.    //
  94.    //TempSt = St;
  95.    //iMsgLength = 0;
  96.    //while (*TempSt != '\0')
  97.    //   {
  98.    //   TempSt++;
  99.    //   iMsgLength++;
  100.    //   }               // Should strcat a \r\n to the string.
  101.    //DosPutMessage (1, iMsgLength, St);         // For ring-3 initialization
  102.  
  103. // savemessage
  104.    //chhTrace_Save_Message (St);
  105.    //chhStringOutMsg.MsgStrings[0] = St;
  106.    //chhDevHelp_Save_Message ((NPBYTE)&StringOutMsg);
  107.  
  108.    //dd_strcpy (szStringOut, (NPBYTE)St);      // For ring-0 initialization
  109.    //szStringOut [CCHMAXPATH-1] = '\0';
  110.  
  111.  
  112. // added this to write to com2 (25-Jan-99)
  113. // commessage
  114.  0000  53                ddputstring_    push    bx
  115.  0001  89 c3                             mov     bx,ax
  116.  0003  8e c2                             mov     es,dx
  117.  
  118.    char al = 0;
  119.  0005  26 80 3f 00                       cmp     byte ptr es:[bx],00H
  120.  0009  74 1d                             je      L3
  121.  
  122.    while (*St) {
  123.  000b  ba f8 02          L1              mov     dx,02f8H
  124.  
  125.       al = *St++;
  126.       PrintCom(0x2F8,al);
  127.  000e  26 8a 27                          mov     ah,es:[bx]
  128.  0011  83 c2 05                          add     dx,0005H
  129.  0014  ec                L2              in      al,dx
  130.  0015  a8 20                             test    al,20H
  131.  0017  74 fb                             je      L2
  132.  0019  83 ea 05                          sub     dx,0005H
  133.  001c  88 e0                             mov     al,ah
  134.  001e  ee                                out     dx,al
  135.  
  136.  001f  26 8a 57 01                       mov     dl,es:[bx+1H]
  137.  
  138.    }
  139. //   if (al) {
  140. //      PrintCom(0x2F8,13);
  141. //      PrintCom(0x2F8,10);
  142. //   }
  143.  0023  43                                inc     bx
  144.  0024  84 d2                             test    dl,dl
  145.  0026  75 e3                             jne     L1
  146.  
  147. }
  148.  
  149.  0028  5b                L3              pop     bx
  150.  0029  c3                                ret     
  151.  002a  89 c0                             mov     ax,ax
  152.  
  153. static char far *ddprintf_DecWordToASCII(char far *StrPtr, WORD wDecVal, WORD Option) {
  154.  
  155.   BOOL fNonZero=FALSE;
  156.   WORD Digit;
  157.  002c                    ddprintf_DecWordToASCII_:
  158.  002c  56                                push    si
  159.  002d  55                                push    bp
  160.  002e  89 e5                             mov     bp,sp
  161.  0030  83 ec 02                          sub     sp,0002H
  162.  0033  89 c6                             mov     si,ax
  163.  0035  8e c2                             mov     es,dx
  164.  0037  89 4e fe                          mov     [bp-2H],cx
  165.  
  166.   WORD Power=10000;
  167.  
  168.   while (Power)
  169.      {
  170.  003a  b8 10 27                          mov     ax,2710H
  171.  003d  31 c9                             xor     cx,cx
  172.  
  173.      Digit=0;
  174.      while (wDecVal >=Power)                   //Digit=wDecVal/Power;
  175.         {
  176.         Digit++;
  177.  003f  31 d2             L4              xor     dx,dx
  178.  0041  39 c3                             cmp     bx,ax
  179.  0043  72 07                             jb      L6
  180.  
  181.  0045  29 c3             L5              sub     bx,ax
  182.  
  183.         wDecVal-=Power;
  184.  0047  42                                inc     dx
  185.  
  186.         }
  187.  
  188.  0048  39 c3                             cmp     bx,ax
  189.  004a  73 f9                             jae     L5
  190.  
  191.      if (Digit)
  192.  004c  85 d2             L6              test    dx,dx
  193.  004e  74 03                             je      L7
  194.  
  195.         fNonZero=TRUE;
  196.  
  197.  0050  b9 01 00                          mov     cx,0001H
  198.  
  199.      if (Digit ||
  200.          fNonZero ||
  201.          (Option & LEADING_ZEROES) ||
  202.          ((Power==1) && (fNonZero==FALSE)))
  203.          {
  204.          *StrPtr=(char)('0'+Digit);
  205.  0053  75 13             L7              jne     L8
  206.  0055  85 c9                             test    cx,cx
  207.  0057  75 0f                             jne     L8
  208.  0059  f6 46 ff 80                       test    byte ptr [bp-1H],80H
  209.  005d  75 09                             jne     L8
  210.  005f  3d 01 00                          cmp     ax,0001H
  211.  0062  75 0c                             jne     L9
  212.  0064  85 d2                             test    dx,dx
  213.  0066  75 08                             jne     L9
  214.  
  215.  0068  46                L8              inc     si
  216.  
  217.          StrPtr++;
  218.          }
  219.  
  220.  0069  80 c2 30                          add     dl,30H
  221.  006c  26 88 54 ff                       mov     es:[si-1H],dl
  222.  
  223.      if (Power==10000)
  224.  0070  3d 10 27          L9              cmp     ax,2710H
  225.  0073  75 05                             jne     L10
  226.  
  227.         Power=1000;
  228.  0075  b8 e8 03                          mov     ax,03e8H
  229.  
  230.      else if (Power==1000)
  231.  0078  eb 20                             jmp     L14
  232.  007a  3d e8 03          L10             cmp     ax,03e8H
  233.  007d  75 05                             jne     L11
  234.  
  235.         Power=100;
  236.  007f  b8 64 00                          mov     ax,0064H
  237.  
  238.      else if (Power==100)
  239.  0082  eb 16                             jmp     L14
  240.  0084  3d 64 00          L11             cmp     ax,0064H
  241.  0087  75 05                             jne     L12
  242.  
  243.         Power=10;
  244.  0089  b8 0a 00                          mov     ax,000aH
  245.  
  246.      else if (Power==10)
  247.  008c  eb 0c                             jmp     L14
  248.  008e  3d 0a 00          L12             cmp     ax,000aH
  249.  0091  75 05                             jne     L13
  250.  
  251.         Power=1;
  252.  0093  b8 01 00                          mov     ax,0001H
  253.  
  254.      else
  255.  0096  eb 02                             jmp     L14
  256.  
  257.         Power=0;
  258.      } // end while
  259.  
  260.   return (StrPtr);
  261.  0098  31 c0             L13             xor     ax,ax
  262.  009a  85 c0             L14             test    ax,ax
  263.  009c  75 a1                             jne     L4
  264.  
  265. }
  266.  
  267.  
  268.  009e  89 f0                             mov     ax,si
  269.  00a0  8c c2                             mov     dx,es
  270.  00a2  89 ec                             mov     sp,bp
  271.  00a4  5d                                pop     bp
  272.  00a5  5e                                pop     si
  273.  00a6  c3                                ret     
  274.  00a7  fc                                cld     
  275.  
  276. static char far *ddprintf_DecLongToASCII(char far *StrPtr, DWORD lDecVal,WORD Option) {
  277.  
  278.  00a8                    ddprintf_DecLongToASCII_:
  279.  00a8  56                                push    si
  280.  00a9  57                                push    di
  281.  00aa  55                                push    bp
  282.  00ab  89 e5                             mov     bp,sp
  283.  00ad  83 ec 06                          sub     sp,0006H
  284.  00b0  89 46 fc                          mov     [bp-4H],ax
  285.  00b3  8e c2                             mov     es,dx
  286.  00b5  89 de                             mov     si,bx
  287.  
  288.    BOOL  fNonZero=FALSE;
  289.    DWORD Digit;
  290.  00b7  31 d2                             xor     dx,dx
  291.  00b9  b8 9a 3b                          mov     ax,3b9aH
  292.  00bc  89 56 fe                          mov     [bp-2H],dx
  293.  
  294.    DWORD Power=1000000000;                      // 1 billion
  295.  
  296.    while (Power)
  297.       {
  298.  00bf  ba 00 ca                          mov     dx,0ca00H
  299.  
  300.       Digit=0;                                                                        // Digit=lDecVal/Power
  301.       while (lDecVal >=Power)                   // replaced with while loop
  302.          {
  303.  00c2  31 db             L15             xor     bx,bx
  304.  00c4  89 5e fa                          mov     [bp-6H],bx
  305.  00c7  39 c1                             cmp     cx,ax
  306.  00c9  77 06                             ja      L16
  307.  00cb  75 1e                             jne     L17
  308.  00cd  39 d6                             cmp     si,dx
  309.  00cf  72 1a                             jb      L17
  310.  
  311.          Digit++;
  312.  00d1  8b 7e fa          L16             mov     di,[bp-6H]
  313.  00d4  83 c7 01                          add     di,0001H
  314.  00d7  83 d3 00                          adc     bx,0000H
  315.  
  316.          lDecVal-=Power;
  317.  00da  29 d6                             sub     si,dx
  318.  00dc  19 c1                             sbb     cx,ax
  319.  00de  89 7e fa                          mov     [bp-6H],di
  320.  
  321.          }
  322.  
  323.  00e1  39 c1                             cmp     cx,ax
  324.  00e3  77 ec                             ja      L16
  325.  00e5  75 04                             jne     L17
  326.  00e7  39 d6                             cmp     si,dx
  327.  00e9  73 e6                             jae     L16
  328.  00eb  8b 7e fa          L17             mov     di,[bp-6H]
  329.  
  330.       if (Digit)
  331.  00ee  85 db                             test    bx,bx
  332.  00f0  75 04                             jne     L18
  333.  00f2  85 ff                             test    di,di
  334.  00f4  74 05                             je      L19
  335.  
  336.          fNonZero=TRUE;
  337.  
  338.  00f6  c7 46 fe 01 00    L18             mov     word ptr [bp-2H],0001H
  339.  
  340.       if (Digit ||
  341.           fNonZero ||
  342.           (Option & LEADING_ZEROES) ||
  343.           ((Power==1) && (fNonZero==FALSE)))
  344.          {
  345.  00fb  85 db             L19             test    bx,bx
  346.  00fd  75 20                             jne     L20
  347.  00ff  83 7e fa 00                       cmp     word ptr [bp-6H],0000H
  348.  0103  75 1a                             jne     L20
  349.  0105  8b 7e fe                          mov     di,[bp-2H]
  350.  0108  85 ff                             test    di,di
  351.  010a  75 13                             jne     L20
  352.  010c  f6 46 09 80                       test    byte ptr [bp+9H],80H
  353.  0110  75 0d                             jne     L20
  354.  0112  85 c0                             test    ax,ax
  355.  0114  75 1a                             jne     L21
  356.  0116  83 fa 01                          cmp     dx,0001H
  357.  0119  75 15                             jne     L21
  358.  011b  85 ff                             test    di,di
  359.  011d  75 11                             jne     L21
  360.  
  361.          *StrPtr=(char)('0'+Digit);
  362.  011f  8b 7e fc          L20             mov     di,[bp-4H]
  363.  0122  8a 5e fa                          mov     bl,[bp-6H]
  364.  
  365.          StrPtr++;
  366.          }
  367.  
  368.  0125  47                                inc     di
  369.  0126  80 c3 30                          add     bl,30H
  370.  0129  89 7e fc                          mov     [bp-4H],di
  371.  012c  26 88 5d ff                       mov     es:[di-1H],bl
  372.  
  373.       if (Power==1000000000)                    // 1 billion
  374.  0130  3d 9a 3b          L21             cmp     ax,3b9aH
  375.  0133  75 0f                             jne     L22
  376.  0135  81 fa 00 ca                       cmp     dx,0ca00H
  377.  0139  75 09                             jne     L22
  378.  
  379.          Power=100000000;
  380.  013b  ba 00 e1                          mov     dx,0e100H
  381.  013e  b8 f5 05                          mov     ax,05f5H
  382.  
  383.       else if (Power==100000000)
  384.  0141  e9 89 00                          jmp     L32
  385.  0144  3d f5 05          L22             cmp     ax,05f5H
  386.  0147  75 0f                             jne     L23
  387.  0149  81 fa 00 e1                       cmp     dx,0e100H
  388.  014d  75 09                             jne     L23
  389.  
  390.          Power=10000000;
  391.  014f  ba 80 96                          mov     dx,9680H
  392.  0152  b8 98 00                          mov     ax,0098H
  393.  
  394.       else if (Power==10000000)
  395.  0155  e9 75 00                          jmp     L32
  396.  0158  3d 98 00          L23             cmp     ax,0098H
  397.  015b  75 0f                             jne     L24
  398.  015d  81 fa 80 96                       cmp     dx,9680H
  399.  0161  75 09                             jne     L24
  400.  
  401.          Power=1000000;
  402.  0163  ba 40 42                          mov     dx,4240H
  403.  0166  b8 0f 00                          mov     ax,000fH
  404.  
  405.       else if (Power==1000000)
  406.  0169  e9 61 00                          jmp     L32
  407.  016c  3d 0f 00          L24             cmp     ax,000fH
  408.  016f  75 0e                             jne     L25
  409.  0171  81 fa 40 42                       cmp     dx,4240H
  410.  0175  75 08                             jne     L25
  411.  
  412.          Power=100000;
  413.  0177  ba a0 86                          mov     dx,86a0H
  414.  017a  b8 01 00                          mov     ax,0001H
  415.  
  416.       else if (Power==100000)
  417.  017d  eb 4e                             jmp     L32
  418.  017f  3d 01 00          L25             cmp     ax,0001H
  419.  0182  75 0b                             jne     L26
  420.  0184  81 fa a0 86                       cmp     dx,86a0H
  421.  0188  75 05                             jne     L26
  422.  
  423.          Power=10000;
  424.  018a  ba 10 27                          mov     dx,2710H
  425.  
  426.       else if (Power==10000)
  427.  018d  eb 3c                             jmp     L31
  428.  018f  85 c0             L26             test    ax,ax
  429.  0191  75 0b                             jne     L27
  430.  0193  81 fa 10 27                       cmp     dx,2710H
  431.  0197  75 05                             jne     L27
  432.  
  433.          Power=1000;
  434.  0199  ba e8 03                          mov     dx,03e8H
  435.  
  436.       else if (Power==1000)
  437.  019c  eb 2d                             jmp     L31
  438.  019e  85 c0             L27             test    ax,ax
  439.  01a0  75 0b                             jne     L28
  440.  01a2  81 fa e8 03                       cmp     dx,03e8H
  441.  01a6  75 05                             jne     L28
  442.  
  443.          Power=100;
  444.  01a8  ba 64 00                          mov     dx,0064H
  445.  
  446.       else if (Power==100)
  447.  01ab  eb 1e                             jmp     L31
  448.  01ad  85 c0             L28             test    ax,ax
  449.  01af  75 0a                             jne     L29
  450.  01b1  83 fa 64                          cmp     dx,0064H
  451.  01b4  75 05                             jne     L29
  452.  
  453.          Power=10;
  454.  01b6  ba 0a 00                          mov     dx,000aH
  455.  
  456.       else if (Power==10)
  457.  01b9  eb 10                             jmp     L31
  458.  01bb  85 c0             L29             test    ax,ax
  459.  01bd  75 0a                             jne     L30
  460.  01bf  83 fa 0a                          cmp     dx,000aH
  461.  01c2  75 05                             jne     L30
  462.  
  463.          Power=1;
  464.  01c4  ba 01 00                          mov     dx,0001H
  465.  
  466.       else
  467.  01c7  eb 02                             jmp     L31
  468.  
  469.          Power=0;
  470.       }
  471.    return (StrPtr);
  472.  01c9  31 d2             L30             xor     dx,dx
  473.  01cb  31 c0             L31             xor     ax,ax
  474.  01cd  85 c0             L32             test    ax,ax
  475.  01cf  0f 85 ef fe                       jne     L15
  476.  01d3  85 d2                             test    dx,dx
  477.  01d5  0f 85 e9 fe                       jne     L15
  478.  
  479. }
  480.  
  481.  
  482.  01d9  8b 46 fc                          mov     ax,[bp-4H]
  483.  01dc  8c c2                             mov     dx,es
  484.  01de  89 ec                             mov     sp,bp
  485.  01e0  5d                                pop     bp
  486.  01e1  5f                                pop     di
  487.  01e2  5e                                pop     si
  488.  01e3  c2 02 00                          ret     0002H
  489.  01e6  89 c0                             mov     ax,ax
  490.  
  491. static char far *ddprintf_HexWordToASCII(char far *StrPtr, WORD wHexVal, WORD Option) {
  492.  
  493.    BOOL fNonZero=FALSE;
  494.    WORD Digit;
  495.  01e8                    ddprintf_HexWordToASCII_:
  496.  01e8  56                                push    si
  497.  01e9  57                                push    di
  498.  01ea  55                                push    bp
  499.  01eb  89 e5                             mov     bp,sp
  500.  01ed  83 ec 04                          sub     sp,0004H
  501.  01f0  89 c6                             mov     si,ax
  502.  01f2  8e c2                             mov     es,dx
  503.  01f4  89 5e fc                          mov     [bp-4H],bx
  504.  01f7  89 4e fe                          mov     [bp-2H],cx
  505.  
  506.    WORD Power=0xF000;
  507.  01fa  b8 00 f0                          mov     ax,0f000H
  508.  
  509.    WORD ShiftVal=12;
  510.  
  511.    while (Power)
  512.       {
  513.  01fd  ba 0c 00                          mov     dx,000cH
  514.  0200  31 ff                             xor     di,di
  515.  
  516.       Digit=(wHexVal & Power)>>ShiftVal;
  517.  0202  8b 5e fc          L33             mov     bx,[bp-4H]
  518.  0205  21 c3                             and     bx,ax
  519.  0207  88 d1                             mov     cl,dl
  520.  0209  d3 eb                             shr     bx,cl
  521.  
  522.       if (Digit)
  523.  020b  85 db                             test    bx,bx
  524.  020d  74 03                             je      L34
  525.  
  526.          fNonZero=TRUE;
  527.  
  528.  020f  bf 01 00                          mov     di,0001H
  529.  
  530.       if (Digit ||
  531.           fNonZero ||
  532.           (Option & LEADING_ZEROES) ||
  533.           ((Power==0x0F) && (fNonZero==FALSE)))
  534.          //*StrPtr++=(char)('0'+Digit);
  535.  0212  75 13             L34             jne     L35
  536.  0214  85 ff                             test    di,di
  537.  0216  75 0f                             jne     L35
  538.  0218  f6 46 ff 80                       test    byte ptr [bp-1H],80H
  539.  021c  75 09                             jne     L35
  540.  021e  3d 0f 00                          cmp     ax,000fH
  541.  0221  75 0d                             jne     L36
  542.  0223  85 db                             test    bx,bx
  543.  0225  75 09                             jne     L36
  544.  0227  46                L35             inc     si
  545.  
  546.          *StrPtr++=ddhextab[Digit];
  547.  
  548.  0228  8a 9f 00 00                       mov     bl,[bx+_ddhextab]
  549.  022c  26 88 5c ff                       mov     es:[si-1H],bl
  550.  
  551.       Power>>=4;
  552.  0230  c1 e8 04          L36             shr     ax,04H
  553.  
  554.       ShiftVal-=4;
  555.  0233  83 ea 04                          sub     dx,0004H
  556.  
  557.       } // end while
  558.  
  559.    return (StrPtr);
  560.  0236  85 c0                             test    ax,ax
  561.  0238  75 c8                             jne     L33
  562.  
  563. }
  564.  
  565.  
  566.  023a  89 f0                             mov     ax,si
  567.  023c  8c c2                             mov     dx,es
  568.  023e  89 ec                             mov     sp,bp
  569.  0240  5d                                pop     bp
  570.  0241  5f                                pop     di
  571.  0242  5e                                pop     si
  572.  0243  c3                                ret     
  573.  
  574. static char far *ddprintf_HexLongToASCII(char far *StrPtr, DWORD wHexVal, WORD Option) {
  575.  
  576.    BOOL  fNonZero=FALSE;
  577.    DWORD Digit;
  578.  0244                    ddprintf_HexLongToASCII_:
  579.  0244  56                                push    si
  580.  0245  57                                push    di
  581.  0246  55                                push    bp
  582.  0247  89 e5                             mov     bp,sp
  583.  0249  83 ec 0a                          sub     sp,000aH
  584.  024c  89 46 fe                          mov     [bp-2H],ax
  585.  024f  8e c2                             mov     es,dx
  586.  0251  89 5e f6                          mov     [bp-0aH],bx
  587.  0254  89 4e f8                          mov     [bp-8H],cx
  588.  
  589.    DWORD Power=0xF0000000;
  590.  0257  b8 00 f0                          mov     ax,0f000H
  591.  025a  31 d2                             xor     dx,dx
  592.  
  593.    DWORD ShiftVal=28;
  594.  
  595.    while (Power)
  596.       {
  597.  025c  be 1c 00                          mov     si,001cH
  598.  025f  89 56 fc                          mov     [bp-4H],dx
  599.  
  600.       Digit=(wHexVal & Power)>>ShiftVal;
  601.  0262  8b 5e f6          L37             mov     bx,[bp-0aH]
  602.  0265  8b 7e f8                          mov     di,[bp-8H]
  603.  0268  89 f1                             mov     cx,si
  604.  026a  21 c7                             and     di,ax
  605.  026c  21 d3                             and     bx,dx
  606.  026e  e3 06                             jcxz    L39
  607.  0270  d1 ef             L38             shr     di,1
  608.  0272  d1 db                             rcr     bx,1
  609.  0274  e2 fa                             loop    L38
  610.  0276  89 d9             L39             mov     cx,bx
  611.  0278  89 7e fa                          mov     [bp-6H],di
  612.  
  613.       if (Digit)
  614.  027b  85 ff                             test    di,di
  615.  027d  75 04                             jne     L40
  616.  027f  85 db                             test    bx,bx
  617.  0281  74 05                             je      L41
  618.  
  619.          fNonZero=TRUE;
  620.  
  621.  0283  c7 46 fc 01 00    L40             mov     word ptr [bp-4H],0001H
  622.  
  623.       if (Digit ||
  624.           fNonZero ||
  625.           (Option & LEADING_ZEROES) ||
  626.           ((Power==0x0F) && (fNonZero==FALSE)))
  627.  0288  83 7e fa 00       L41             cmp     word ptr [bp-6H],0000H
  628.  028c  75 1f                             jne     L42
  629.  028e  85 c9                             test    cx,cx
  630.  0290  75 1b                             jne     L42
  631.  0292  83 7e fc 00                       cmp     word ptr [bp-4H],0000H
  632.  0296  75 15                             jne     L42
  633.  0298  f6 46 09 80                       test    byte ptr [bp+9H],80H
  634.  029c  75 0f                             jne     L42
  635.  029e  85 c0                             test    ax,ax
  636.  02a0  75 1d                             jne     L43
  637.  02a2  83 fa 0f                          cmp     dx,000fH
  638.  02a5  75 18                             jne     L43
  639.  02a7  83 7e fc 00                       cmp     word ptr [bp-4H],0000H
  640.  02ab  75 12                             jne     L43
  641.  
  642.           *StrPtr++=ddhextab[Digit];
  643.  
  644.  02ad  89 cb             L42             mov     bx,cx
  645.  02af  8b 7e fe                          mov     di,[bp-2H]
  646.  02b2  8a 9f 00 00                       mov     bl,[bx+_ddhextab]
  647.  02b6  26 88 1d                          mov     es:[di],bl
  648.  02b9  8d 5d 01                          lea     bx,[di+1H]
  649.  02bc  89 5e fe                          mov     [bp-2H],bx
  650.  
  651.       if (Power==0xF0000000)                  // 1 billion
  652.  02bf  3d 00 f0          L43             cmp     ax,0f000H
  653.  02c2  75 0b                             jne     L44
  654.  02c4  85 d2                             test    dx,dx
  655.  02c6  75 07                             jne     L44
  656.  02c8  b8 00 0f                          mov     ax,0f00H
  657.  
  658.          Power=0xF000000;
  659.  02cb  31 d2                             xor     dx,dx
  660.  
  661.       else if (Power==0xF000000)
  662.  02cd  eb 5f                             jmp     L52
  663.  02cf  3d 00 0f          L44             cmp     ax,0f00H
  664.  02d2  75 0b                             jne     L45
  665.  02d4  85 d2                             test    dx,dx
  666.  02d6  75 07                             jne     L45
  667.  02d8  b8 f0 00                          mov     ax,00f0H
  668.  
  669.          Power=0xF00000;
  670.  02db  31 d2                             xor     dx,dx
  671.  
  672.       else if (Power==0xF00000)
  673.  02dd  eb 4f                             jmp     L52
  674.  02df  3d f0 00          L45             cmp     ax,00f0H
  675.  02e2  75 0b                             jne     L46
  676.  02e4  85 d2                             test    dx,dx
  677.  02e6  75 07                             jne     L46
  678.  02e8  b8 0f 00                          mov     ax,000fH
  679.  
  680.          Power=0xF0000;
  681.  02eb  31 d2                             xor     dx,dx
  682.  
  683.       else if (Power==0xF0000)
  684.  02ed  eb 3f                             jmp     L52
  685.  02ef  3d 0f 00          L46             cmp     ax,000fH
  686.  02f2  75 09                             jne     L47
  687.  02f4  85 d2                             test    dx,dx
  688.  02f6  75 05                             jne     L47
  689.  
  690.          Power=0xF000;
  691.  02f8  ba 00 f0                          mov     dx,0f000H
  692.  
  693.       else if (Power==0xF000)
  694.  02fb  eb 2f                             jmp     L51
  695.  02fd  85 c0             L47             test    ax,ax
  696.  02ff  75 0b                             jne     L48
  697.  0301  81 fa 00 f0                       cmp     dx,0f000H
  698.  0305  75 05                             jne     L48
  699.  
  700.          Power=0xF00;
  701.  0307  ba 00 0f                          mov     dx,0f00H
  702.  
  703.       else if (Power==0xF00)
  704.  030a  eb 20                             jmp     L51
  705.  030c  85 c0             L48             test    ax,ax
  706.  030e  75 0b                             jne     L49
  707.  0310  81 fa 00 0f                       cmp     dx,0f00H
  708.  0314  75 05                             jne     L49
  709.  
  710.          Power=0xF0;
  711.  0316  ba f0 00                          mov     dx,00f0H
  712.  
  713.       else if (Power==0xF0)
  714.  0319  eb 11                             jmp     L51
  715.  031b  85 c0             L49             test    ax,ax
  716.  031d  75 0b                             jne     L50
  717.  031f  81 fa f0 00                       cmp     dx,00f0H
  718.  0323  75 05                             jne     L50
  719.  
  720.          Power=0xF;
  721.  0325  ba 0f 00                          mov     dx,000fH
  722.  
  723.       else Power=0;
  724.  
  725.  0328  eb 02                             jmp     L51
  726.  032a  31 d2             L50             xor     dx,dx
  727.  032c  31 c0             L51             xor     ax,ax
  728.  
  729.       ShiftVal-=4;
  730.  032e  83 c6 fc          L52             add     si,0fffcH
  731.  
  732.       } // end while
  733.  
  734.    return (StrPtr);
  735.  0331  85 c0                             test    ax,ax
  736.  0333  0f 85 2b ff                       jne     L37
  737.  0337  85 d2                             test    dx,dx
  738.  0339  0f 85 25 ff                       jne     L37
  739.  
  740. }
  741.  
  742. // saveregs is not saving all regs! so have to do it myself to be sure all are really saved
  743. // esp. es:bx (can't use pusha/popa since need bp)
  744. // diff between __saveregs and not is just es (probably all that's called for for __cdecl)
  745. // si/di is already saved
  746.  
  747.  033d  8b 46 fe                          mov     ax,[bp-2H]
  748.  0340  8c c2                             mov     dx,es
  749.  0342  89 ec                             mov     sp,bp
  750.  0344  5d                                pop     bp
  751.  0345  5f                                pop     di
  752.  0346  5e                                pop     si
  753.  0347  c2 02 00                          ret     0002H
  754.  034a  89 c0                             mov     ax,ax
  755.  
  756. VOID __cdecl ddprintf (char far *DbgStr , ...) {
  757.  
  758.    char far *BuildPtr; //=dd_BuildString;
  759.    char far *pStr;     //=(char far *) DbgStr;
  760.    char far *SubStr;
  761.    union {
  762.     VOID    far *VoidPtr;
  763.     WORD    far *WordPtr;
  764.     DWORD   far *LongPtr;
  765.     DWORD far *StringPtr;
  766.    } Parm;
  767.    WORD wBuildOption;
  768.  
  769. // !!!
  770. // fast out
  771.  
  772. #ifdef FAST_OUT
  773.  if (*DbgStr != '~') return;  // only let strings starting with ~ through
  774. #endif
  775.  
  776.  034c  56                _ddprintf       push    si
  777.  034d  57                                push    di
  778.  034e  55                                push    bp
  779.  034f  89 e5                             mov     bp,sp
  780.  0351  83 ec 0a                          sub     sp,000aH
  781.  
  782.    BuildPtr = dd_BuildString;
  783.  0354  be 00 00                          mov     si,offset _dd_BuildString
  784.  
  785.    pStr = DbgStr;
  786.  
  787.  0357  8b 7e 08                          mov     di,[bp+8H]
  788.  035a  8b 46 0a                          mov     ax,[bp+0aH]
  789.  
  790.    Parm.VoidPtr=(VOID far *) &DbgStr;
  791.  035d  8d 5e 08                          lea     bx,[bp+8H]
  792.  0360  8c 5e fc                          mov     [bp-4H],ds
  793.  0363  8c 56 f8                          mov     [bp-8H],ss
  794.  0366  89 46 fe                          mov     [bp-2H],ax
  795.  0369  89 5e f6                          mov     [bp-0aH],bx
  796.  036c  8d 57 04                          lea     dx,[bx+4H]
  797.  036f  8e c0                             mov     es,ax
  798.  0371  89 fb                             mov     bx,di
  799.  
  800.    Parm.StringPtr++;                            // skip size of string pointer
  801.  
  802.    while (*pStr) {
  803.       
  804.  0373  8c 56 f8                          mov     [bp-8H],ss
  805.  0376  26 8a 27                          mov     ah,es:[bx]
  806.  0379  89 56 f6                          mov     [bp-0aH],dx
  807.  037c  84 e4                             test    ah,ah
  808.  037e  0f 84 a9 01                       je      L72
  809.  
  810.       if (BuildPtr >= (char far *) &dd_BuildString[MAX_STR_SIZE-2]) break; // don't overflow target
  811.  
  812.  0382  81 fe 02 01       L53             cmp     si,offset _dd_BuildString+102H
  813.  0386  0f 83 a1 01                       jae     L72
  814.  
  815.       switch (*pStr)
  816.       {
  817.          case '%':
  818.             wBuildOption=0;
  819.             pStr++;
  820.  038a  8e 46 fe                          mov     es,[bp-2H]
  821.  038d  26 8a 05                          mov     al,es:[di]
  822.  0390  8d 55 01                          lea     dx,[di+1H]
  823.  0393  3c 0d                             cmp     al,0dH
  824.  0395  72 0f                             jb      L54
  825.  0397  0f 86 76 01                       jbe     L70
  826.  039b  3c 25                             cmp     al,25H
  827.  039d  0f 82 70 01                       jb      L70
  828.  03a1  76 0c                             jbe     L55
  829.  03a3  e9 6b 01                          jmp     L70
  830.  03a6  3c 0a             L54             cmp     al,0aH
  831.  03a8  0f 84 55 01                       je      L69
  832.  03ac  e9 62 01                          jmp     L70
  833.  
  834.  03af  89 d3             L55             mov     bx,dx
  835.  03b1  26 8a 07                          mov     al,es:[bx]
  836.  
  837.             if (*pStr=='0')
  838.                {
  839.  03b4  89 d7                             mov     di,dx
  840.  03b6  98                                cbw     
  841.  03b7  31 c9                             xor     cx,cx
  842.  03b9  3d 30 00                          cmp     ax,0030H
  843.  03bc  75 04                             jne     L56
  844.  
  845.                wBuildOption|=LEADING_ZEROES;
  846.  03be  b9 00 80                          mov     cx,8000H
  847.  
  848.                pStr++;
  849.                }
  850.  
  851.             //if (*pStr=='u')    // always unsigned
  852.             //   pStr++;        // this means %u won't work!  buggy crap
  853.  
  854.  03c1  47                                inc     di
  855.  
  856.             switch(*pStr)
  857.                {
  858.                case 'x':
  859.                case 'X':
  860.  03c2  8e 46 fe          L56             mov     es,[bp-2H]
  861.  03c5  26 8a 05                          mov     al,es:[di]
  862.  03c8  3c 6c                             cmp     al,6cH
  863.  03ca  72 2a                             jb      L58
  864.  03cc  8d 5d 01                          lea     bx,[di+1H]
  865.  03cf  8c c2                             mov     dx,es
  866.  03d1  89 5e fa                          mov     [bp-6H],bx
  867.  03d4  0f 86 c7 00                       jbe     L65
  868.  03d8  3c 73                             cmp     al,73H
  869.  03da  72 11                             jb      L57
  870.  03dc  76 6e                             jbe     L62
  871.  03de  3c 75                             cmp     al,75H
  872.  03e0  0f 82 2d 01                       jb      L70
  873.  03e4  76 46                             jbe     L61
  874.  03e6  3c 78                             cmp     al,78H
  875.  03e8  74 22                             je      L60
  876.  03ea  e9 24 01                          jmp     L70
  877.  03ed  3c 70             L57             cmp     al,70H
  878.  03ef  0f 84 85 00                       je      L64
  879.  03f3  e9 1b 01                          jmp     L70
  880.  03f6  3c 58             L58             cmp     al,58H
  881.  03f8  72 09                             jb      L59
  882.  03fa  76 10                             jbe     L60
  883.  03fc  3c 64                             cmp     al,64H
  884.  03fe  74 2c                             je      L61
  885.  0400  e9 0e 01                          jmp     L70
  886.  0403  84 c0             L59             test    al,al
  887.  0405  0f 84 17 01                       je      L71
  888.  0409  e9 05 01                          jmp     L70
  889.  
  890.                   BuildPtr=ddprintf_HexWordToASCII(BuildPtr, *Parm.WordPtr++,wBuildOption);
  891.  040c  c4 5e f6          L60             les     bx,dword ptr [bp-0aH]
  892.  040f  8b 56 f6                          mov     dx,[bp-0aH]
  893.  0412  89 f0                             mov     ax,si
  894.  0414  83 c2 02                          add     dx,0002H
  895.  0417  26 8b 1f                          mov     bx,es:[bx]
  896.  041a  89 56 f6                          mov     [bp-0aH],dx
  897.  041d  8b 56 fc                          mov     dx,[bp-4H]
  898.  
  899.                   pStr++;
  900.  0420  47                                inc     di
  901.  0421  e8 00 00                          call    ddprintf_HexWordToASCII_
  902.  0424  89 c6                             mov     si,ax
  903.  0426  89 56 fc                          mov     [bp-4H],dx
  904.  
  905.                   continue;
  906.  
  907.                case 'u':
  908.                case 'd':
  909.  0429  e9 f4 00                          jmp     L71
  910.  
  911.                   BuildPtr=ddprintf_DecWordToASCII(BuildPtr, *Parm.WordPtr++,wBuildOption);
  912.  042c  c4 5e f6          L61             les     bx,dword ptr [bp-0aH]
  913.  042f  83 c3 02                          add     bx,0002H
  914.  0432  8b 56 fc                          mov     dx,[bp-4H]
  915.  0435  26 8b 47 fe                       mov     ax,es:[bx-2H]
  916.  0439  89 5e f6                          mov     [bp-0aH],bx
  917.  043c  89 c3                             mov     bx,ax
  918.  043e  89 f0                             mov     ax,si
  919.  
  920.                   pStr++;
  921.  0440  47                                inc     di
  922.  0441  e8 00 00                          call    ddprintf_DecWordToASCII_
  923.  0444  89 c6                             mov     si,ax
  924.  0446  89 56 fc                          mov     [bp-4H],dx
  925.  
  926.                   continue;
  927.  
  928.                case 's':
  929.  0449  e9 d4 00                          jmp     L71
  930.  
  931.                   SubStr=(char far *)*Parm.StringPtr;
  932.  044c  c4 5e f6          L62             les     bx,dword ptr [bp-0aH]
  933.  044f  26 8b 17                          mov     dx,es:[bx]
  934.  0452  26 8b 4f 02                       mov     cx,es:[bx+2H]
  935.  
  936.                   while (*BuildPtr++ = *SubStr++);
  937.  0456  8e c1             L63             mov     es,cx
  938.  0458  89 d3                             mov     bx,dx
  939.  045a  46                                inc     si
  940.  045b  26 8a 07                          mov     al,es:[bx]
  941.  045e  8e 46 fc                          mov     es,[bp-4H]
  942.  0461  42                                inc     dx
  943.  0462  26 88 44 ff                       mov     es:[si-1H],al
  944.  0466  84 c0                             test    al,al
  945.  0468  75 ec                             jne     L63
  946.  
  947.                   Parm.StringPtr++;
  948.  046a  8b 5e f6                          mov     bx,[bp-0aH]
  949.  
  950.                   BuildPtr--;  // remove the \0
  951.  046d  4e                                dec     si
  952.  046e  83 c3 04                          add     bx,0004H
  953.  
  954.                   pStr++;
  955.  0471  47                                inc     di
  956.  0472  89 5e f6                          mov     [bp-0aH],bx
  957.  
  958.                   continue;
  959.  
  960.  0475  e9 a8 00                          jmp     L71
  961.  
  962.                case 'p':
  963.  0478  c4 5e f6          L64             les     bx,dword ptr [bp-0aH]
  964.  047b  8b 7e f6                          mov     di,[bp-0aH]
  965.  
  966.                   BuildPtr=ddprintf_HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
  967.  047e  51                                push    cx
  968.  047f  89 f0                             mov     ax,si
  969.  0481  8d 55 04                          lea     dx,[di+4H]
  970.  0484  26 8b 1f                          mov     bx,es:[bx]
  971.  0487  26 8b 4d 02                       mov     cx,es:[di+2H]
  972.  048b  89 56 f6                          mov     [bp-0aH],dx
  973.  048e  8b 56 fc                          mov     dx,[bp-4H]
  974.  
  975.                   pStr++;
  976.  0491  8b 7e fa                          mov     di,[bp-6H]
  977.  0494  e8 00 00                          call    ddprintf_HexLongToASCII_
  978.  0497  89 c6                             mov     si,ax
  979.  0499  89 56 fc                          mov     [bp-4H],dx
  980.  
  981.                   continue;
  982.  
  983.                case 'l':
  984.                   pStr++;
  985.  049c  e9 81 00                          jmp     L71
  986.  
  987.  049f  26 8a 07          L65             mov     al,es:[bx]
  988.  
  989.                   switch (*pStr)
  990.                   {
  991.                   case 'x':
  992.  04a2  89 df                             mov     di,bx
  993.  04a4  3c 64                             cmp     al,64H
  994.  04a6  72 0e                             jb      L66
  995.  04a8  76 33                             jbe     L68
  996.  04aa  3c 75                             cmp     al,75H
  997.  04ac  72 72                             jb      L71
  998.  04ae  76 2d                             jbe     L68
  999.  04b0  3c 78                             cmp     al,78H
  1000.  04b2  74 06                             je      L67
  1001.  04b4  eb 6a                             jmp     L71
  1002.  04b6  3c 58             L66             cmp     al,58H
  1003.  04b8  75 66                             jne     L71
  1004.  
  1005.                   case 'X':
  1006.  04ba  c4 5e f6          L67             les     bx,dword ptr [bp-0aH]
  1007.  
  1008.                      BuildPtr=ddprintf_HexLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
  1009.  04bd  51                                push    cx
  1010.  04be  8d 57 04                          lea     dx,[bx+4H]
  1011.  04c1  26 8b 07                          mov     ax,es:[bx]
  1012.  04c4  26 8b 4f 02                       mov     cx,es:[bx+2H]
  1013.  04c8  89 56 f6                          mov     [bp-0aH],dx
  1014.  04cb  89 c3                             mov     bx,ax
  1015.  04cd  8b 56 fc                          mov     dx,[bp-4H]
  1016.  04d0  89 f0                             mov     ax,si
  1017.  
  1018.                      pStr++;
  1019.  04d2  47                                inc     di
  1020.  04d3  e8 00 00                          call    ddprintf_HexLongToASCII_
  1021.  04d6  89 c6                             mov     si,ax
  1022.  04d8  89 56 fc                          mov     [bp-4H],dx
  1023.  
  1024.                      continue;
  1025.  
  1026.                   case 'u':
  1027.  04db  eb 43                             jmp     L71
  1028.  
  1029.                   case 'd':
  1030.  04dd  c4 5e f6          L68             les     bx,dword ptr [bp-0aH]
  1031.  
  1032.                      BuildPtr=ddprintf_DecLongToASCII(BuildPtr, *Parm.LongPtr++,wBuildOption);
  1033.  04e0  51                                push    cx
  1034.  04e1  83 c3 04                          add     bx,0004H
  1035.  04e4  89 f0                             mov     ax,si
  1036.  04e6  26 8b 57 fc                       mov     dx,es:[bx-4H]
  1037.  04ea  26 8b 4f fe                       mov     cx,es:[bx-2H]
  1038.  04ee  89 5e f6                          mov     [bp-0aH],bx
  1039.  04f1  89 d3                             mov     bx,dx
  1040.  04f3  8b 56 fc                          mov     dx,[bp-4H]
  1041.  
  1042.                      pStr++;
  1043.  04f6  47                                inc     di
  1044.  04f7  e8 00 00                          call    ddprintf_DecLongToASCII_
  1045.  04fa  89 c6                             mov     si,ax
  1046.  04fc  89 56 fc                          mov     [bp-4H],dx
  1047.  
  1048.                      continue;
  1049.  
  1050.                   } // end switch
  1051.                   continue;    // dunno what he wants
  1052.  
  1053.                case 0:
  1054.                   continue;
  1055.                } // end switch
  1056.             break;
  1057.  
  1058.          case '\\':   // that means a literal '\' is in the stream, not just a '\n' (binary 10)
  1059.          case '\r':   // CR, already is literal (assumed "msg\n" only stores a binary 10)
  1060.             break;
  1061.  
  1062.          case '\n':
  1063.  04ff  eb 1f                             jmp     L71
  1064.  
  1065.             *BuildPtr++=13;
  1066.             *BuildPtr++=10;
  1067.  0501  8e 46 fc          L69             mov     es,[bp-4H]
  1068.  0504  26 c6 04 0d                       mov     byte ptr es:[si],0dH
  1069.  0508  46                                inc     si
  1070.  
  1071.  0509  89 d7                             mov     di,dx
  1072.  
  1073.             pStr++;
  1074.  050b  26 88 04                          mov     es:[si],al
  1075.  050e  46                                inc     si
  1076.  
  1077.             continue;
  1078.  
  1079.       } // end switch
  1080.  
  1081.  050f  eb 0f                             jmp     L71
  1082.  
  1083.       *BuildPtr++=*pStr++;
  1084.  0511  8e 46 fe          L70             mov     es,[bp-2H]
  1085.  0514  46                                inc     si
  1086.  0515  26 8a 05                          mov     al,es:[di]
  1087.  0518  8e 46 fc                          mov     es,[bp-4H]
  1088.  051b  47                                inc     di
  1089.  051c  26 88 44 ff                       mov     es:[si-1H],al
  1090.  
  1091.    } // end while
  1092.  
  1093.  0520  8e 46 fe          L71             mov     es,[bp-2H]
  1094.  0523  26 80 3d 00                       cmp     byte ptr es:[di],00H
  1095.  0527  0f 85 57 fe                       jne     L53
  1096.  
  1097.    *BuildPtr=0;                                 // cauterize the string
  1098.  052b  8e 46 fc          L72             mov     es,[bp-4H]
  1099.  052e  26 c6 04 00                       mov     byte ptr es:[si],00H
  1100.  0532  8c db                             mov     bx,ds
  1101.  0534  8a 36 00 00                       mov     dh,_dd_BuildString
  1102.  
  1103.    ddputstring((char far *) dd_BuildString);    // display
  1104.  
  1105.    return;
  1106.  0538  be 00 00                          mov     si,offset _dd_BuildString
  1107.  053b  84 f6                             test    dh,dh
  1108.  053d  74 21                             je      L75
  1109.  053f  b9 f8 02                          mov     cx,02f8H
  1110.  0542  8e c3                             mov     es,bx
  1111.  0544  89 ca             L73             mov     dx,cx
  1112.  0546  26 8a 24                          mov     ah,es:[si]
  1113.  0549  83 c2 05                          add     dx,0005H
  1114.  054c  ec                L74             in      al,dx
  1115.  054d  a8 20                             test    al,20H
  1116.  054f  74 fb                             je      L74
  1117.  0551  83 ea 05                          sub     dx,0005H
  1118.  0554  88 e0                             mov     al,ah
  1119.  0556  ee                                out     dx,al
  1120.  0557  26 8a 44 01                       mov     al,es:[si+1H]
  1121.  055b  46                                inc     si
  1122.  055c  84 c0                             test    al,al
  1123.  055e  75 e4                             jne     L73
  1124.  
  1125. }
  1126.  
  1127.  
  1128.  0560  89 ec             L75             mov     sp,bp
  1129.  0562  5d                                pop     bp
  1130.  0563  5f                                pop     di
  1131.  0564  5e                                pop     si
  1132.  0565  c3                                ret     
  1133.  
  1134. No disassembly errors
  1135.  
  1136. List of external symbols
  1137.  
  1138. Symbol
  1139. ----------------
  1140. _ddhextab        000002b4 0000022a
  1141. _dd_BuildString  00000539 00000536 00000384 00000355
  1142. ddprintf_HexWordToASCII_ 
  1143.                  00000422
  1144. ddprintf_DecWordToASCII_ 
  1145.                  00000442
  1146. ddprintf_HexLongToASCII_ 
  1147.                  000004d4 00000495
  1148. ddprintf_DecLongToASCII_ 
  1149.                  000004f8
  1150. ------------------------------------------------------------
  1151. List of public symbols
  1152.  
  1153. SYMBOL          GROUP           SEGMENT          ADDRESS
  1154. ---------------------------------------------------------
  1155. _dd_BuildString DGROUP          _BSS             00000000
  1156. _ddhextab       DGROUP          _DATA            00000000
  1157. _ddprintf                       _TEXT            0000034c
  1158. ddprintf_DecLongToASCII_ 
  1159.                                 _TEXT            000000a8
  1160. ddprintf_DecWordToASCII_ 
  1161.                                 _TEXT            0000002c
  1162. ddprintf_HexLongToASCII_ 
  1163.                                 _TEXT            00000244
  1164. ddprintf_HexWordToASCII_ 
  1165.                                 _TEXT            000001e8
  1166. ddputstring_                    _TEXT            00000000
  1167.  
  1168. ------------------------------------------------------------
  1169.  
  1170.