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

  1.  
  2. Module: D:\dev\csrc\os2dd\scd\init.c
  3. Group: 'DGROUP' CONST,CONST2,_DATA,_BSS,_INITDATA
  4.  
  5. Segment: CONST  WORD   00000215 bytes  
  6.  0000  2d 2d 58 2d 2d 0d 0a 00 L1              - --X--...
  7.  0008  49 52 51 20 28 2d 69 3a L2              - IRQ (-i:
  8.  0010  6e 29 0d 0a 00 00                       - n)....
  9.  0016  42 61 73 65 20 70 6f 72 L3              - Base por
  10.  001e  74 20 28 2d 62 70 3a 78                 - t (-bp:x
  11.  0026  29 0d 0a 00                             - )...
  12.  002a  43 6f 6e 74 72 6f 6c 20 L4              - Control 
  13.  0032  70 6f 72 74 20 28 2d 63                 - port (-c
  14.  003a  70 3a 78 29 0d 0a 00 00                 - p:x)....
  15.  0042  4d 6f 64 65 20 28 2d 78 L5              - Mode (-x
  16.  004a  6d 3a 6e 29 0d 0a 00 00                 - m:n)....
  17.  0052  44 65 76 69 63 65 20 28 L6              - Device (
  18.  005a  2d 64 65 76 3a 6e 29 0d                 - -dev:n).
  19.  0062  0a 00                                   - ..
  20.  0064  50 6c 61 79 20 44 4d 41 L7              - Play DMA
  21.  006c  20 28 2d 64 70 3a 6e 29                 -  (-dp:n)
  22.  0074  0d 0a 00 00                             - ....
  23.  0078  50 6c 61 79 20 44 4d 41 L8              - Play DMA
  24.  0080  20 73 69 7a 65 20 28 2d                 -  size (-
  25.  0088  64 70 73 3a 78 29 0d 0a                 - dps:x)..
  26.  0090  00 00                                   - ..
  27.  0092  50 6c 61 79 20 44 4d 41 L9              - Play DMA
  28.  009a  20 49 50 42 20 28 2d 64                 -  IPB (-d
  29.  00a2  70 69 3a 6e 29 0d 0a 00                 - pi:n)...
  30.  00aa  50 6c 61 79 20 44 4d 41 L10             - Play DMA
  31.  00b2  20 6d 6f 64 65 20 28 2d                 -  mode (-
  32.  00ba  64 70 6d 3a 6e 29 0d 0a                 - dpm:n)..
  33.  00c2  00 0a                                   - ..
  34.  00c4  52 65 63 20 44 4d 41 20 L11             - Rec DMA 
  35.  00cc  28 2d 64 72 3a 6e 29 0d                 - (-dr:n).
  36.  00d4  0a 00                                   - ..
  37.  00d6  52 65 63 20 44 4d 41 20 L12             - Rec DMA 
  38.  00de  73 69 7a 65 20 28 2d 64                 - size (-d
  39.  00e6  72 73 3a 78 29 0d 0a 00                 - rs:x)...
  40.  00ee  52 65 63 20 44 4d 41 20 L13             - Rec DMA 
  41.  00f6  49 50 42 20 28 2d 64 72                 - IPB (-dr
  42.  00fe  69 3a 6e 29 0d 0a 00 2d                 - i:n)...-
  43.  0106  52 65 63 20 44 4d 41 20 L14             - Rec DMA 
  44.  010e  6d 6f 64 65 20 28 2d 64                 - mode (-d
  45.  0116  72 6d 3a 6e 29 0d 0a 00                 - rm:n)...
  46.  011e  46 6c 61 67 73 20 28 76 L15             - Flags (v
  47.  0126  61 72 69 6f 75 73 29 0d                 - arious).
  48.  012e  0a 00                                   - ..
  49.  0130  55 6e 6b 6e 6f 77 6e 20 L16             - Unknown 
  50.  0138  28 3f 29 0d 0a 00                       - (?)...
  51.  013e  20 28 43 53 34 32 33 78 L17             -  (CS423x
  52.  0146  29 00                                   - ).
  53.  0148  20 28 31 3f 29 00       L18             -  (1?).
  54.  014e  20 28 32 3f 29 00       L19             -  (2?).
  55.  0154  20 28 4f 50 4c 33 53 41 L20             -  (OPL3SA
  56.  015c  33 29 00 70 43 53 34 30                 - 3).pCS40
  57.  0164  3a 20 49 6e 73 74 61 6c                 - : Instal
  58.  016c  6c 65 64 0d 0a 00                       - led...
  59.  0172  77 61 76 65 70 6c 61 79 L21             - waveplay
  60.  017a  49 6e 69 74 28 29 20 66                 - Init() f
  61.  0182  61 69 6c 65 64 2c 20 72                 - ailed, r
  62.  018a  63 3d 25 75 0a 00 77 61                 - c=%u..wa
  63.  0192  76 65 72 65 63 49 6e 69                 - verecIni
  64.  019a  74 28 29 20 66 61 69 6c                 - t() fail
  65.  01a2  65 64 00 3a                             - ed.:
  66.  01a6  77 61 76 65 72 65 63 49 L22             - waverecI
  67.  01ae  6e 69 74 28 29 20 66 61                 - nit() fa
  68.  01b6  69 6c 65 64 2c 20 72 63                 - iled, rc
  69.  01be  3d 25 75 0a 00 52                       - =%u..R
  70.  01c4  73 74 72 61 74 4d 6f 64 L23             - stratMod
  71.  01cc  65 32 49 6e 69 74 3a 65                 - e2Init:e
  72.  01d4  6e 64 43 6f 64 65 3d 25                 - ndCode=%
  73.  01dc  78 2c 20 65 6e 64 44 61                 - x, endDa
  74.  01e4  74 61 3d 25 78 2c 20 64                 - ta=%x, d
  75.  01ec  73 3d 25 78 0a 00                       - s=%x..
  76.  01f2  0d 0a 00 28             L24             - ...(
  77.  01f6  64 65 76 69 63 65 3d 63 L25             - device=c
  78.  01fe  73 34 30 2e 73 79 73 20                 - s40.sys 
  79.  0206  00 31                                   - .1
  80.  0208  20 2a 6e 6f 74 20 73 65 L26             -  *not se
  81.  0210  74 2a 0d 0a 00                          - t*...
  82.  
  83. No disassembly errors
  84.  
  85. ------------------------------------------------------------
  86.  
  87. Segment: CONST2  WORD   00000113 bytes  
  88.  0000  0d 0a 43 53 34 32 33 78 _signOnMsg      - ..CS423x
  89.  0008  20 26 20 4f 50 4c 33 53                 -  & OPL3S
  90.  0010  41 78 20 61 75 64 69 6f                 - Ax audio
  91.  0018  20 64 72 69 76 65 72 20                 -  driver 
  92.  0020  5b 43 53 34 30 3a 39 39                 - [CS40:99
  93.  0028  30 39 32 39 5d 0d 0a 00                 - 0929]...
  94.  0030  20 20 20 20 20 49 52 51 _irqMsg         -      IRQ
  95.  0038  3d 20 20 00                             - =  .
  96.  003c  62 61 73 65 50 6f 72 74 _basePortMsg    - basePort
  97.  0044  3d 30 78 00                             - =0x.
  98.  0048  63 74 72 6c 50 6f 72 74 _ctrlPortMsg    - ctrlPort
  99.  0050  3d 30 78 00                             - =0x.
  100.  0054  20 20 20 20 6d 6f 64 65 _modeMsg        -     mode
  101.  005c  3d 20 20 00                             - =  .
  102.  0060  20 20 64 65 76 69 63 65 _deviceMsg      -   device
  103.  0068  3d 20 20 00                             - =  .
  104.  006c  70 6c 61 79 20 44 4d 41 _playDMAMsg     - play DMA
  105.  0074  3d 20 20 00                             - =  .
  106.  0078  20 20 20 20 73 69 7a 65 _playSizeMsg    -     size
  107.  0080  3d 30 78 00                             - =0x.
  108.  0084  20 20 20 20 20 49 50 42 _playIPBMsg     -      IPB
  109.  008c  3d 20 20 00                             - =  .
  110.  0090  20 20 20 20 6d 6f 64 65 _playModeMsg    -     mode
  111.  0098  3d 20 20 00                             - =  .
  112.  009c  20 72 65 63 20 44 4d 41 _recDMAMsg      -  rec DMA
  113.  00a4  3d 20 20 00                             - =  .
  114.  00a8  20 20 20 20 73 69 7a 65 _recSizeMsg     -     size
  115.  00b0  3d 30 78 00                             - =0x.
  116.  00b4  20 20 20 20 20 49 50 42 _recIPBMsg      -      IPB
  117.  00bc  3d 20 20 00                             - =  .
  118.  00c0  20 20 20 20 6d 6f 64 65 _recModeMsg     -     mode
  119.  00c8  3d 20 20 00                             - =  .
  120.  00cc  20 20 20 66 6c 61 67 73 _clFlagsMsg     -    flags
  121.  00d4  3d 30 78 00                             - =0x.
  122.  00d8  43 53 34 30 2e 53 59 53 _errorPrepMsg   - CS40.SYS
  123.  00e0  20 63 6d 64 6c 69 6e 65                 -  cmdline
  124.  00e8  20 70 61 72 73 65 20 65                 -  parse e
  125.  00f0  72 72 6f 72 3a 20 00                    - rror: .
  126.  00f7  43 53 34 30 2e 53 59 53 _initExitMsg    - CS40.SYS
  127.  00ff  20 69 6e 73 74 61 6c 6c                 -  install
  128.  0107  20 65 72 72 6f 72 2c 20                 -  error, 
  129.  010f  72 63 3d 00                             - rc=.
  130.  
  131. No disassembly errors
  132.  
  133. ------------------------------------------------------------
  134.  
  135. Segment: _DATA  WORD   00000028 bytes  
  136.  0000  00 00                   _errorMsg       DW      DGROUP:L1
  137.  0002  08 00                                   DW      DGROUP:L2
  138.  0004  16 00                                   DW      DGROUP:L3
  139.  0006  2a 00                                   DW      DGROUP:L4
  140.  0008  42 00                                   DW      DGROUP:L5
  141.  000a  52 00                                   DW      DGROUP:L6
  142.  000c  64 00                                   DW      DGROUP:L7
  143.  000e  78 00                                   DW      DGROUP:L8
  144.  0010  92 00                                   DW      DGROUP:L9
  145.  0012  aa 00                                   DW      DGROUP:L10
  146.  0014  c4 00                                   DW      DGROUP:L11
  147.  0016  d6 00                                   DW      DGROUP:L12
  148.  0018  ee 00                                   DW      DGROUP:L13
  149.  001a  06 01                                   DW      DGROUP:L14
  150.  001c  1e 01                                   DW      DGROUP:L15
  151.  001e  30 01                                   DW      DGROUP:L16
  152.  0020  3e 01                   _deviceStr      DW      DGROUP:L17
  153.  0022  48 01                                   DW      DGROUP:L18
  154.  0024  4e 01                                   DW      DGROUP:L19
  155.  0026  54 01                                   DW      DGROUP:L20
  156.  
  157. No disassembly errors
  158.  
  159. ------------------------------------------------------------
  160.  
  161. Segment: _INITTEXT  PARA   0000166d bytes  
  162.  
  163. //
  164. // init.c
  165. // 3-Feb-99
  166. //
  167. // USHORT stratMode2Init(REQPACK __far *rpPtr);
  168. //
  169. // will make call into slam basedev to get resources (won't use RM... but have to
  170. // write a slam, with IDC hook, probably use assembly like wacker...?)
  171.  
  172. #include "cs40.h"
  173.  
  174. // if these are put in initdata they'll increase file size by 8K
  175.  
  176. const CHAR   signOnMsg[] = "\r\nCS423x & OPL3SAx audio driver [CS40:990929]\r\n";
  177. const CHAR      irqMsg[] = "     IRQ=  ";
  178. const CHAR basePortMsg[] = "basePort=0x";
  179. const CHAR ctrlPortMsg[] = "ctrlPort=0x";
  180. const CHAR     modeMsg[] = "    mode=  ";
  181. const CHAR   deviceMsg[] = "  device=  ";
  182. const CHAR  playDMAMsg[] = "play DMA=  ";
  183. const CHAR playSizeMsg[] = "    size=0x";
  184. const CHAR  playIPBMsg[] = "     IPB=  ";
  185. const CHAR playModeMsg[] = "    mode=  ";
  186. const CHAR   recDMAMsg[] = " rec DMA=  ";
  187. const CHAR  recSizeMsg[] = "    size=0x";
  188. const CHAR   recIPBMsg[] = "     IPB=  ";
  189. const CHAR  recModeMsg[] = "    mode=  ";
  190. const CHAR  clFlagsMsg[] = "   flags=0x";
  191.  
  192. const CHAR  errorPrepMsg[] = "CS40.SYS cmdline parse error: ";
  193. const CHAR *errorMsg[] = {"--X--\r\n",
  194.                           "IRQ (-i:n)\r\n",
  195.                           "Base port (-bp:x)\r\n",
  196.                           "Control port (-cp:x)\r\n",
  197.                           "Mode (-xm:n)\r\n",
  198.                           "Device (-dev:n)\r\n",
  199.                           "Play DMA (-dp:n)\r\n",
  200.                           "Play DMA size (-dps:x)\r\n",
  201.                           "Play DMA IPB (-dpi:n)\r\n",
  202.                           "Play DMA mode (-dpm:n)\r\n",
  203.                           "Rec DMA (-dr:n)\r\n",
  204.                           "Rec DMA size (-drs:x)\r\n",
  205.                           "Rec DMA IPB (-dri:n)\r\n",
  206.                           "Rec DMA mode (-drm:n)\r\n",
  207.                           "Flags (various)\r\n",
  208.                           "Unknown (?)\r\n"};
  209.  
  210. const CHAR *deviceStr[] = {" (CS423x)",
  211.                            " (1?)",
  212.                            " (2?)",
  213.                            " (OPL3SA3)"};
  214.  
  215. const CHAR  initExitMsg[] = "CS40.SYS install error, rc=";
  216.  
  217. #pragma code_seg ("_INITTEXT");
  218. #pragma data_seg ("_INITDATA","ENDDS");
  219.  
  220. #pragma intrinsic (strlen,strcat);
  221. #include "d:\w10a\h\string.h"   // use explicit else uses ddk, etc.
  222.  
  223. extern USHORT endCode;
  224. extern USHORT endData;
  225.  
  226. USHORT ParseCL(UCHAR __far *clPtr);
  227. char __far * __cdecl _itoa (int val,char __far *buf,int radix);
  228. char __far * __cdecl _ltoa (long val,char __far *buf,int radix);
  229. char __far * __cdecl _ultoa (unsigned long val,char __far *buf,int radix);
  230. long __cdecl strtol (const char __far *nptr,char __far * __far *endptr,int ibase);
  231. unsigned long __cdecl strtoul (const char __far *nptr,char __far * __far *endptr,int ibase);
  232.  
  233. // -------------------------------------
  234. // in:
  235. //out:
  236. //nts:
  237.  
  238. USHORT stratMode2Init(REQPACK __far *rpPtr) {
  239.  
  240.  USHORT rc = 0;
  241.  USHORT heapSize;
  242.  USHORT flags = 0;
  243.  CHAR __far *errPtr = 0;
  244.  CHAR valueMsg[64];
  245.  
  246.  0000  53                stratMode2Init_ push    bx
  247.  0001  51                                push    cx
  248.  0002  56                                push    si
  249.  0003  57                                push    di
  250.  0004  55                                push    bp
  251.  0005  89 e5                             mov     bp,sp
  252.  0007  83 ec 42                          sub     sp,0042H
  253.  000a  89 c6                             mov     si,ax
  254.  000c  89 d1                             mov     cx,dx
  255.  
  256.  Device_Help = rpPtr->init.Device_Help;
  257.  
  258.  rpPtr->status = RPDONE | RPERR | RPGENFAIL;
  259.  000e  8e c2                             mov     es,dx
  260.  0010  26 8b 44 0e                       mov     ax,es:[si+0eH]
  261.  0014  26 8b 54 10                       mov     dx,es:[si+10H]
  262.  0018  a3 00 00                          mov     _Device_Help,ax
  263.  001b  89 16 02 00                       mov     _Device_Help+2H,dx
  264.  
  265.  001f  26 c7 44 0e 00 00                 mov     word ptr es:[si+0eH],0000H
  266.  
  267.  rpPtr->init.sizeCS = 0;
  268.  rpPtr->init.sizeDS = 0;
  269.  
  270.  0025  26 c7 44 03 0c 81                 mov     word ptr es:[si+3H],810cH
  271.  
  272.  heapSize = HeapInit(8192);
  273.  
  274.  // do any log setup here...
  275.  
  276.  002b  b8 00 20                          mov     ax,2000H
  277.  002e  26 c7 44 10 00 00                 mov     word ptr es:[si+10H],0000H
  278.  0034  e8 00 00                          call    HeapInit_
  279.  
  280.  rc = ParseCL(rpPtr->init.argsPtr);
  281.  0037  8e c1                             mov     es,cx
  282.  0039  26 8b 44 12                       mov     ax,es:[si+12H]
  283.  003d  26 8b 54 14                       mov     dx,es:[si+14H]
  284.  0041  e8 00 00                          call    ParseCL_
  285.  0044  89 46 fe                          mov     [bp-2H],ax
  286.  
  287.  if (rc) goto ExitRightNow;
  288.  
  289.  errPtr = "CS40: Installed\r\n";
  290.  
  291.  // resource manager access here (create, detect PnP, etc.) here...
  292.  
  293.  // had created IRQ object for timer here...
  294.  // had setup more hardware types here (FMSYNTH or MPU...)
  295.  
  296.  flags = 0;
  297.  0047  85 c0                             test    ax,ax
  298.  0049  0f 85 7c 01                       jne     L40
  299.  
  300.  004d  a1 00 00                          mov     ax,_gDMAplay
  301.  0050  8b 1e 00 00                       mov     bx,_gDMArec
  302.  
  303.  if (gDMAplay != gDMArec) flags = flags | FLAGS_WAVEAUDIO_FULLDUPLEX;
  304.  0054  31 d2                             xor     dx,dx
  305.  0056  39 d8                             cmp     ax,bx
  306.  0058  74 03                             je      L27
  307.  005a  ba 01 00                          mov     dx,0001H
  308.  
  309.  if (gDMAplay >= 4)       flags = flags | FLAGS_WAVEAUDIO_DMA16;
  310.  005d  83 3e 00 00 04    L27             cmp     word ptr _gDMAplay,0004H
  311.  0062  72 03                             jb      L28
  312.  0064  80 ca 02                          or      dl,02H
  313.  
  314.  if (gDMAplayMode != 0)   flags = flags | FLAGS_WAVEAUDIO_FTYPEDMA;
  315.  
  316.  0067  83 3e 00 00 00    L28             cmp     word ptr _gDMAplayMode,0000H
  317.  006c  74 03                             je      L29
  318.  006e  80 ca 04                          or      dl,04H
  319.  
  320.  rc = waveplayInit(gDMAplay, flags, gIRQ);
  321.  
  322.  0071  8b 1e 00 00       L29             mov     bx,_gIRQ
  323.  0075  a1 00 00                          mov     ax,_gDMAplay
  324.  0078  e8 00 00                          call    waveplayInit_
  325.  007b  89 46 fe                          mov     [bp-2H],ax
  326.  
  327.  if (rc) {
  328.  007e  85 c0                             test    ax,ax
  329.  0080  74 16                             je      L30
  330.  
  331. if (gCLflags & FLAGS_CL_DDPRINT) ddprintf("waveplayInit() failed, rc=%u\n");
  332.     goto ExitNow;
  333.  }
  334.  
  335.  flags = 0;
  336.  0082  f6 06 01 00 40                    test    byte ptr _gCLflags+1H,40H
  337.  0087  0f 84 b6 00                       je      L37
  338.  008b  1e                                push    ds
  339.  008c  68 72 01                          push    offset L21
  340.  008f  e8 00 00                          call    _ddprintf
  341.  0092  83 c4 04                          add     sp,0004H
  342.  0095  e9 a9 00                          jmp     L37
  343.  
  344.  0098  a1 00 00          L30             mov     ax,_gDMAplay
  345.  009b  8b 1e 00 00                       mov     bx,_gDMArec
  346.  
  347.  if (gDMAplay != gDMArec) flags = flags | FLAGS_WAVEAUDIO_FULLDUPLEX;
  348.  009f  31 d2                             xor     dx,dx
  349.  00a1  39 d8                             cmp     ax,bx
  350.  00a3  74 03                             je      L31
  351.  00a5  ba 01 00                          mov     dx,0001H
  352.  
  353.  if (gDMArec >= 4)        flags = flags | FLAGS_WAVEAUDIO_DMA16;
  354.  00a8  83 3e 00 00 04    L31             cmp     word ptr _gDMArec,0004H
  355.  00ad  72 03                             jb      L32
  356.  00af  80 ca 02                          or      dl,02H
  357.  
  358.  if (gDMArecMode != 0)    flags = flags | FLAGS_WAVEAUDIO_FTYPEDMA;
  359.  
  360.  00b2  83 3e 00 00 00    L32             cmp     word ptr _gDMArecMode,0000H
  361.  00b7  74 03                             je      L33
  362.  00b9  80 ca 04                          or      dl,04H
  363.  
  364.  rc = waverecInit(gDMArec, flags, gIRQ);
  365.  
  366.  00bc  8b 1e 00 00       L33             mov     bx,_gIRQ
  367.  00c0  a1 00 00                          mov     ax,_gDMArec
  368.  00c3  e8 00 00                          call    waverecInit_
  369.  00c6  89 46 fe                          mov     [bp-2H],ax
  370.  
  371.  if (rc) {
  372.     errPtr = "waverecInit() failed";
  373.  00c9  85 c0                             test    ax,ax
  374.  00cb  74 13                             je      L34
  375.  
  376. if (gCLflags & FLAGS_CL_DDPRINT) ddprintf("waverecInit() failed, rc=%u\n");
  377.     goto ExitNow;
  378.  }
  379.  
  380.  00cd  f6 06 01 00 40                    test    byte ptr _gCLflags+1H,40H
  381.  00d2  74 6d                             je      L37
  382.  00d4  1e                                push    ds
  383.  00d5  68 a6 01                          push    offset L22
  384.  00d8  e8 00 00                          call    _ddprintf
  385.  00db  83 c4 04                          add     sp,0004H
  386.  00de  eb 61                             jmp     L37
  387.  
  388.  rc = chipsetInit();
  389.  00e0  e8 00 00          L34             call    chipsetInit_
  390.  00e3  89 46 fe                          mov     [bp-2H],ax
  391.  
  392.  if (rc) goto ExitNow;
  393.  
  394.  00e6  85 c0                             test    ax,ax
  395.  00e8  75 57                             jne     L37
  396.  
  397.  if (gCLflags & FLAGS_CL_SETDTM) chipsetSetDTM(gCLflags & FLAGS_CL_SETDTM);
  398.  
  399.  // had init'ed mixer here...
  400.  //InitMixer();
  401.  
  402.  // had done VDD setup here...
  403.  // fill in the ADAPTERINFO
  404.  //codec_info.ulNumPorts = NUMIORANGES;
  405.  //codec_info.Range[0].ulPort  =  pResourcesWSS->uIOBase[0];
  406.  //codec_info.Range[0].ulRange =  pResourcesWSS->uIOLength[0];
  407.  //...
  408.  //// set up the addressing to the codec data for the vdd
  409.  //pfcodec_info = (ADAPTERINFO __far *)&codec_info;
  410.  //DevHelp_VirtToLin (SELECTOROF(pfcodec_info), (ULONG)(OFFSETOF(pfcodec_info)),(PLIN)&pLincodec);
  411.  // copy the pdd name out of the header.
  412.  //for (i = 0; i < sizeof(szPddName)-1 ; i++) {
  413.  //   if (phdr->abName[i] <= ' ')
  414.  //      break;
  415.  //   szPddName[i] = phdr->abName[i];
  416.  //}
  417.  //// register the VDD IDC entry point..
  418.  //DevHelp_RegisterPDD ((NPSZ)szPddName, (PFN)IDCEntry_VDD);
  419.  
  420.  00ea  f6 06 00 00 02                    test    byte ptr _gCLflags,02H
  421.  00ef  74 0a                             je      L35
  422.  00f1  a1 00 00                          mov     ax,_gCLflags
  423.  00f4  30 e4                             xor     ah,ah
  424.  00f6  24 02                             and     al,02H
  425.  00f8  e8 00 00                          call    chipsetSetDTM_
  426.  
  427.  if (gCLflags & FLAGS_CL_TESTONLY) rc = 666;
  428.  
  429.  00fb  f6 06 01 00 80    L35             test    byte ptr _gCLflags+1H,80H
  430.  0100  74 05                             je      L36
  431.  0102  c7 46 fe 9a 02                    mov     word ptr [bp-2H],029aH
  432.  
  433.  if (rc) goto ExitNow;
  434.  
  435.  0107  83 7e fe 00       L36             cmp     word ptr [bp-2H],0000H
  436.  010b  75 34                             jne     L37
  437.  
  438.  rpPtr->status = RPDONE;
  439.  010d  8e c1                             mov     es,cx
  440.  010f  26 c7 44 03 00 01                 mov     word ptr es:[si+3H],0100H
  441.  
  442.  rpPtr->init.sizeCS = (USHORT)&endCode;
  443.  rpPtr->init.sizeDS = (USHORT)&endData;
  444.  
  445.  0115  26 c7 44 0e 00 00                 mov     word ptr es:[si+0eH],offset _endCode
  446.  
  447. if (gCLflags & FLAGS_CL_DDPRINT) ddprintf("stratMode2Init:endCode=%x, endData=%x, ds=%x\n",rpPtr->init.sizeCS,rpPtr->init.sizeDS,_DS());
  448.  
  449. ExitNow:
  450.  
  451.  011b  8a 36 01 00                       mov     dh,_gCLflags+1H
  452.  011f  26 c7 44 10 00 00                 mov     word ptr es:[si+10H],offset _endData
  453.  0125  f6 c6 40                          test    dh,40H
  454.  0128  74 17                             je      L37
  455.  012a  8c d8                             mov     ax,ds
  456.  012c  50                                push    ax
  457.  012d  26 8b 7c 10                       mov     di,es:[si+10H]
  458.  0131  57                                push    di
  459.  0132  26 8b 44 0e                       mov     ax,es:[si+0eH]
  460.  0136  50                                push    ax
  461.  0137  1e                                push    ds
  462.  0138  68 c4 01                          push    offset L23
  463.  013b  e8 00 00                          call    _ddprintf
  464.  013e  83 c4 0a                          add     sp,000aH
  465.  
  466.  if (rc && (gCLflags & FLAGS_CL_QUIET) == 0) {
  467.  0141  83 7e fe 00       L37             cmp     word ptr [bp-2H],0000H
  468.  0145  0f 84 80 00                       je      L40
  469.  0149  f6 06 00 00 80                    test    byte ptr _gCLflags,80H
  470.  014e  75 79                             jne     L40
  471.  
  472.     DosPutMessage(STDOUT,_fstrlen(initExitMsg),initExitMsg);
  473.  0150  6a 01                             push    0001H
  474.  0152  8c d8                             mov     ax,ds
  475.  0154  bf 00 00                          mov     di,offset _initExitMsg
  476.  0157  8e c0                             mov     es,ax
  477.  0159  b9 ff ff                          mov     cx,0ffffH
  478.  015c  31 c0                             xor     ax,ax
  479.  015e  f2 ae                             repne   scasb    
  480.  0160  f7 d1                             not     cx
  481.  0162  49                                dec     cx
  482.  0163  51                                push    cx
  483.  0164  1e                                push    ds
  484.  0165  68 00 00                          push    offset _initExitMsg
  485.  0168  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  486.  
  487.     _ultoa(rc,valueMsg,10);
  488.  016d  6a 00                             push    0000H
  489.  016f  6a 0a                             push    000aH
  490.  0171  16                                push    ss
  491.  0172  8d 56 be                          lea     dx,[bp-42H]
  492.  0175  52                                push    dx
  493.  0176  8b 5e fe                          mov     bx,[bp-2H]
  494.  0179  6a 00                             push    0000H
  495.  017b  8c de                             mov     si,ds
  496.  017d  53                                push    bx
  497.  017e  8d 7e be                          lea     di,[bp-42H]
  498.  0181  e8 00 00                          call    _xtoa
  499.  
  500.     _fstrcat(valueMsg,"\r\n");
  501.  0184  b8 f2 01                          mov     ax,offset L24
  502.  0187  8c d2                             mov     dx,ss
  503.  0189  83 c4 0c                          add     sp,000cH
  504.  018c  8e c2                             mov     es,dx
  505.  018e  1e                                push    ds
  506.  018f  57                                push    di
  507.  0190  96                                xchg    ax,si
  508.  0191  8e d8                             mov     ds,ax
  509.  0193  b9 ff ff                          mov     cx,0ffffH
  510.  0196  b0 00                             mov     al,00H
  511.  0198  f2 ae                             repne   scasb    
  512.  019a  4f                                dec     di
  513.  019b  8a 04             L38             mov     al,[si]
  514.  019d  aa                                stosb   
  515.  019e  3c 00                             cmp     al,00H
  516.  01a0  74 0b                             je      L39
  517.  01a2  8a 44 01                          mov     al,[si+1H]
  518.  01a5  83 c6 02                          add     si,0002H
  519.  01a8  aa                                stosb   
  520.  01a9  3c 00                             cmp     al,00H
  521.  01ab  75 ee                             jne     L38
  522.  01ad  5f                L39             pop     di
  523.  01ae  1f                                pop     ds
  524.  
  525.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  526.  }
  527.  
  528. ExitRightNow:
  529.  return rc;
  530.  01af  6a 01                             push    0001H
  531.  01b1  8d 7e be                          lea     di,[bp-42H]
  532.  01b4  b9 ff ff                          mov     cx,0ffffH
  533.  01b7  31 c0                             xor     ax,ax
  534.  01b9  f2 ae                             repne   scasb    
  535.  01bb  f7 d1                             not     cx
  536.  01bd  49                                dec     cx
  537.  01be  51                                push    cx
  538.  01bf  16                                push    ss
  539.  01c0  8d 56 be                          lea     dx,[bp-42H]
  540.  01c3  52                                push    dx
  541.  01c4  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  542.  
  543. }
  544.  
  545. // ------------------------------------------------------
  546. //USHORT gIRQ          = 99;       // 1  -i:5
  547. //USHORT gBasePort     = 0;        // 2  -bp:534
  548. //USHORT gCtrlPort     = 0;        // 3  -cp:390
  549. //USHORT gMode         = 2;        // 4  -xm:2
  550. //USHORT gDevice       = 99;       // 5  -dev:3       0=CS 3=OPL3SA3
  551. //USHORT gDMAplay      = 99;       // 6  -dp:1
  552. //USHORT gDMAplaySize  = 0x8000;   // 7  -dps:8000    DMA buffer size (max is 60KB)
  553. //USHORT gDMAplayIPB   = 2;        // 8  -dpi:2       ints per buffer -- power of 2 (2,4,8,16,32)
  554. //USHORT gDMAplayMode  = 1;        // 9  -dpm:1       1=typeF DMA, else not
  555. //USHORT gDMArec       = 99;       //10  -dr:0        can be same -dp: (then is not full duplex)
  556. //USHORT gDMArecSize   = 0x8000;   //11  -drs:8000    DMA buffer size (max is 60KB)
  557. //USHORT gDMArecIPB    = 2;        //12  -dri:2       ints per buffer -- power of 2 (2,4,8,16,32)
  558. //USHORT gDMArecMode   = 1;        //13  -drm:1       1=typeF DMA, else not
  559. //USHORT gCLflags      = 0;        //14  various flags (-v bit0=1, ...)
  560. //                                 //15 none of the above
  561. //#define FLAGS_CL_VERBOSE  1
  562.  
  563.  01c9  8b 46 fe          L40             mov     ax,[bp-2H]
  564.  01cc  89 ec                             mov     sp,bp
  565.  01ce  5d                                pop     bp
  566.  01cf  5f                                pop     di
  567.  01d0  5e                                pop     si
  568.  01d1  59                                pop     cx
  569.  01d2  5b                                pop     bx
  570.  01d3  c3                                ret     
  571.  01d4  fc 02             L41             DW      L50
  572.  01d6  04 03                             DW      L51
  573.  01d8  fc 02                             DW      L50
  574.  01da  04 03                             DW      L51
  575.  01dc  fc 02                             DW      L50
  576.  01de  04 03                             DW      L51
  577.  01e0  fc 02                             DW      L50
  578.  01e2  fc 02                             DW      L50
  579.  01e4  fc 02                             DW      L50
  580.  01e6  fc 02                             DW      L50
  581.  
  582. USHORT ParseCL(UCHAR __far *clPtr) {
  583.  
  584.  USHORT rc = 0;
  585.  ULONG tVal;
  586.  01e8  53                ParseCL_        push    bx
  587.  01e9  51                                push    cx
  588.  01ea  56                                push    si
  589.  01eb  57                                push    di
  590.  01ec  55                                push    bp
  591.  01ed  89 e5                             mov     bp,sp
  592.  01ef  83 ec 4c                          sub     sp,004cH
  593.  01f2  89 c3                             mov     bx,ax
  594.  01f4  8e c2                             mov     es,dx
  595.  
  596.  UCHAR __far *tPtr = clPtr;
  597.  01f6  89 c7                             mov     di,ax
  598.  01f8  31 d2                             xor     dx,dx
  599.  01fa  8c c1                             mov     cx,es
  600.  01fc  89 56 fa                          mov     [bp-6H],dx
  601.  
  602.  UCHAR __far *ePtr = 0;
  603.  01ff  89 56 f4                          mov     [bp-0cH],dx
  604.  0202  89 56 f6                          mov     [bp-0aH],dx
  605.  
  606.  UCHAR __far *argListPtr = 0;
  607.  
  608.  UCHAR sw0, sw1, sw2, sw3;
  609.  CHAR valueMsg[64];
  610.  
  611.  // cs40.sys -
  612.  // skip over filename
  613.  
  614.  0205  89 56 fc                          mov     [bp-4H],dx
  615.  0208  26 8a 27                          mov     ah,es:[bx]
  616.  020b  89 56 fe                          mov     [bp-2H],dx
  617.  020e  84 e4                             test    ah,ah
  618.  0210  74 17                             je      L43
  619.  
  620.  while (*tPtr && *tPtr != ' ') {
  621.     tPtr++;
  622.  0212  8e c1             L42             mov     es,cx
  623.  0214  26 8a 05                          mov     al,es:[di]
  624.  0217  30 e4                             xor     ah,ah
  625.  0219  3d 20 00                          cmp     ax,0020H
  626.  021c  74 0b                             je      L43
  627.  
  628.  }
  629.  
  630.  021e  8e c1                             mov     es,cx
  631.  0220  26 8a 55 01                       mov     dl,es:[di+1H]
  632.  0224  47                                inc     di
  633.  0225  84 d2                             test    dl,dl
  634.  0227  75 e9                             jne     L42
  635.  0229  8e c1             L43             mov     es,cx
  636.  022b  26 80 3d 00                       cmp     byte ptr es:[di],00H
  637.  022f  0f 84 05 06                       je      L119
  638.  
  639.  while (*tPtr && (rc == 0)) {
  640.  
  641.     tPtr++;            // skip to next
  642.  
  643.  0233  83 7e fa 00                       cmp     word ptr [bp-6H],0000H
  644.  0237  0f 85 fd 05                       jne     L119
  645.  
  646.     if (*tPtr == '-') {
  647.  
  648.  023b  26 8a 45 01                       mov     al,es:[di+1H]
  649.  023f  30 e4                             xor     ah,ah
  650.  0241  47                                inc     di
  651.  0242  3d 2d 00                          cmp     ax,002dH
  652.  0245  75 e2                             jne     L43
  653.  
  654.        if (argListPtr == 0) argListPtr = tPtr;
  655.  
  656.  0247  8b 76 fe                          mov     si,[bp-2H]
  657.  024a  8b 46 fc                          mov     ax,[bp-4H]
  658.  024d  85 f6                             test    si,si
  659.  024f  75 0a                             jne     L44
  660.  0251  85 c0                             test    ax,ax
  661.  0253  75 06                             jne     L44
  662.  0255  89 7e fc                          mov     [bp-4H],di
  663.  0258  89 4e fe                          mov     [bp-2H],cx
  664.  
  665.        tPtr++;          // after - switch
  666.  025b  47                L44             inc     di
  667.  
  668.        sw0 = *(tPtr+0); // first (eg, d)
  669.        sw1 = *(tPtr+1); // next char, eg, ':'
  670.  025c  8e c1                             mov     es,cx
  671.  025e  26 8a 25                          mov     ah,es:[di]
  672.  
  673.  0261  26 8a 75 02                       mov     dh,es:[di+2H]
  674.  
  675.        sw2 = *(tPtr+2); // ...
  676.  0265  26 8a 45 01                       mov     al,es:[di+1H]
  677.  
  678.        sw3 = *(tPtr+3); // ... (if used can only be :)
  679.  
  680.  0269  26 8a 55 03                       mov     dl,es:[di+3H]
  681.  
  682.        switch(sw0) {
  683.        case 'i':
  684.  026d  88 e3                             mov     bl,ah
  685.  026f  80 fc 69                          cmp     ah,69H
  686.  0272  72 2a                             jb      L46
  687.  0274  76 4a                             jbe     L48
  688.  0276  80 fc 76                          cmp     ah,76H
  689.  0279  72 19                             jb      L45
  690.  027b  0f 86 f6 04                       jbe     L108
  691.  027f  80 fc 78                          cmp     ah,78H
  692.  0282  0f 82 aa 05                       jb      L118
  693.  0286  0f 86 31 01                       jbe     L60
  694.  028a  80 fc 7a                          cmp     ah,7aH
  695.  028d  0f 84 0b 05                       je      L110
  696.  0291  e9 9c 05                          jmp     L118
  697.  0294  80 fc 74          L45             cmp     ah,74H
  698.  0297  0f 84 6d 05                       je      L116
  699.  029b  e9 92 05                          jmp     L118
  700.  029e  80 fc 62          L46             cmp     ah,62H
  701.  02a1  72 13                             jb      L47
  702.  02a3  76 68                             jbe     L52
  703.  02a5  80 fc 63                          cmp     ah,63H
  704.  02a8  0f 86 b9 00                       jbe     L56
  705.  02ac  80 fc 64                          cmp     ah,64H
  706.  02af  0f 84 28 01                       je      L61
  707.  02b3  e9 7a 05                          jmp     L118
  708.  02b6  80 fc 51          L47             cmp     ah,51H
  709.  02b9  0f 84 24 05                       je      L114
  710.  02bd  e9 70 05                          jmp     L118
  711.  
  712.           rc = 1;
  713.  02c0  ba 01 00          L48             mov     dx,0001H
  714.  
  715.           if (sw1 == ':') {
  716.  02c3  30 e4                             xor     ah,ah
  717.  02c5  89 56 fa                          mov     [bp-6H],dx
  718.  02c8  3d 3a 00                          cmp     ax,003aH
  719.  02cb  0f 85 5a ff                       jne     L43
  720.  02cf  52                                push    dx
  721.  02d0  6a 0a                             push    000aH
  722.  02d2  16                                push    ss
  723.  02d3  8d 56 f4                          lea     dx,[bp-0cH]
  724.  02d6  52                                push    dx
  725.  02d7  51                                push    cx
  726.  
  727.              tVal = strtoul((tPtr+2),&ePtr,10);
  728.  02d8  83 c7 02                          add     di,0002H
  729.  02db  57                                push    di
  730.  02dc  e8 00 00                          call    _strtoxl
  731.  02df  89 c7                             mov     di,ax
  732.  02e1  83 c4 0c                          add     sp,000cH
  733.  
  734.              switch(tVal) {
  735.              case 3:
  736.              case 5:
  737.              case 7:
  738.              case 9:
  739.              case 10:
  740.              case 11:
  741.              case 12: // i12 not for OPL3SA3 though
  742.                 gIRQ = tVal;
  743.  02e4  83 ef 03                          sub     di,0003H
  744.  02e7  83 da 00                          sbb     dx,0000H
  745.  02ea  85 d2                             test    dx,dx
  746.  02ec  72 07                             jb      L49
  747.  02ee  75 14                             jne     L51
  748.  02f0  83 ff 09                          cmp     di,0009H
  749.  02f3  77 0f                             ja      L51
  750.  02f5  01 ff             L49             add     di,di
  751.  02f7  2e ff a5 d4 01                    jmp     word ptr cs:[di+L41]
  752.  
  753.  02fc  31 db             L50             xor     bx,bx
  754.  
  755.                 rc = 0;
  756.                 break;
  757.              }
  758.  02fe  a3 00 00                          mov     _gIRQ,ax
  759.  0301  89 5e fa                          mov     [bp-6H],bx
  760.  
  761.              tPtr = ePtr;
  762.  0304  8b 7e f4          L51             mov     di,[bp-0cH]
  763.  0307  8b 4e f6                          mov     cx,[bp-0aH]
  764.  
  765.           }
  766.           break;
  767.  
  768.        case 'b':
  769.  030a  e9 1c ff                          jmp     L43
  770.  
  771.           rc = 2;
  772.  030d  bb 02 00          L52             mov     bx,0002H
  773.  
  774.           if (sw1 == 'p' && sw2 == ':') {
  775.  0310  30 e4                             xor     ah,ah
  776.  0312  89 5e fa                          mov     [bp-6H],bx
  777.  0315  3d 70 00                          cmp     ax,0070H
  778.  0318  0f 85 0d ff                       jne     L43
  779.  031c  88 f0                             mov     al,dh
  780.  031e  3d 3a 00                          cmp     ax,003aH
  781.  0321  0f 85 04 ff                       jne     L43
  782.  
  783. int3();
  784.  0325  cc                                int     3
  785.  0326  6a 01                             push    0001H
  786.  0328  b8 10 00                          mov     ax,0010H
  787.  032b  50                                push    ax
  788.  032c  16                                push    ss
  789.  032d  8d 76 f4                          lea     si,[bp-0cH]
  790.  0330  56                                push    si
  791.  0331  51                                push    cx
  792.  
  793.              tVal = strtoul((tPtr+3),&ePtr,16);
  794.  0332  83 c7 03                          add     di,0003H
  795.  0335  57                                push    di
  796.  0336  e8 00 00                          call    _strtoxl
  797.  0339  83 c4 0c                          add     sp,000cH
  798.  033c  89 d7                             mov     di,dx
  799.  
  800.              if (tVal >= 0x100 && tVal <= 0xFFF) {
  801.                 gBasePort = tVal;
  802.  033e  85 d2                             test    dx,dx
  803.  0340  77 07                             ja      L53
  804.  0342  75 18                             jne     L55
  805.  0344  3d 00 01                          cmp     ax,0100H
  806.  0347  72 13                             jb      L55
  807.  0349  85 d2             L53             test    dx,dx
  808.  034b  72 07                             jb      L54
  809.  034d  75 0d                             jne     L55
  810.  034f  3d ff 0f                          cmp     ax,0fffH
  811.  0352  77 08                             ja      L55
  812.  
  813.  0354  31 c9             L54             xor     cx,cx
  814.  
  815.                 rc = 0;
  816.              }
  817.  0356  a3 00 00                          mov     _gBasePort,ax
  818.  0359  89 4e fa                          mov     [bp-6H],cx
  819.  
  820.              tPtr = ePtr;
  821.  035c  8b 7e f4          L55             mov     di,[bp-0cH]
  822.  035f  8b 4e f6                          mov     cx,[bp-0aH]
  823.  
  824.           }
  825.           break;
  826.  
  827.        case 'c':
  828.  0362  e9 c4 fe                          jmp     L43
  829.  
  830.           rc = 3;
  831.  0365  be 03 00          L56             mov     si,0003H
  832.  
  833.           if (sw1 == 'p' && sw2 == ':') {
  834.  0368  30 e4                             xor     ah,ah
  835.  036a  89 76 fa                          mov     [bp-6H],si
  836.  036d  3d 70 00                          cmp     ax,0070H
  837.  0370  0f 85 b5 fe                       jne     L43
  838.  0374  88 f0                             mov     al,dh
  839.  0376  3d 3a 00                          cmp     ax,003aH
  840.  0379  0f 85 ac fe                       jne     L43
  841.  037d  6a 01                             push    0001H
  842.  037f  b8 10 00                          mov     ax,0010H
  843.  0382  50                                push    ax
  844.  0383  16                                push    ss
  845.  0384  8d 5e f4                          lea     bx,[bp-0cH]
  846.  0387  53                                push    bx
  847.  0388  51                                push    cx
  848.  
  849.              tVal = strtoul((tPtr+3),&ePtr,16);
  850.  0389  01 f7                             add     di,si
  851.  038b  57                                push    di
  852.  038c  e8 00 00                          call    _strtoxl
  853.  038f  83 c4 0c                          add     sp,000cH
  854.  0392  89 d7                             mov     di,dx
  855.  
  856.              if (tVal >= 0x100 && tVal <= 0xFFF) {
  857.                 gCtrlPort = tVal;
  858.  0394  85 d2                             test    dx,dx
  859.  0396  77 07                             ja      L57
  860.  0398  75 18                             jne     L59
  861.  039a  3d 00 01                          cmp     ax,0100H
  862.  039d  72 13                             jb      L59
  863.  039f  85 d2             L57             test    dx,dx
  864.  03a1  72 07                             jb      L58
  865.  03a3  75 0d                             jne     L59
  866.  03a5  3d ff 0f                          cmp     ax,0fffH
  867.  03a8  77 08                             ja      L59
  868.  
  869.  03aa  31 d7             L58             xor     di,dx
  870.  
  871.                 rc = 0;
  872.              }
  873.  03ac  a3 00 00                          mov     _gCtrlPort,ax
  874.  03af  89 7e fa                          mov     [bp-6H],di
  875.  
  876.              tPtr = ePtr;
  877.  03b2  8b 7e f4          L59             mov     di,[bp-0cH]
  878.  03b5  8b 4e f6                          mov     cx,[bp-0aH]
  879.  
  880.           }
  881.           break;
  882.  
  883.        case 'x':
  884.  03b8  e9 6e fe                          jmp     L43
  885.  
  886.           rc = 4;
  887.  03bb  bb 04 00          L60             mov     bx,0004H
  888.  
  889.           if (sw1 == 'm' && sw2 == ':') {
  890.              // only know mode2
  891.  03be  30 e4                             xor     ah,ah
  892.  03c0  89 5e fa                          mov     [bp-6H],bx
  893.  03c3  3d 6d 00                          cmp     ax,006dH
  894.  03c6  0f 85 5f fe                       jne     L43
  895.  03ca  88 f0                             mov     al,dh
  896.  03cc  3d 3a 00                          cmp     ax,003aH
  897.  03cf  0f 85 56 fe                       jne     L43
  898.  
  899.              rc = 0;
  900.  03d3  31 f6                             xor     si,si
  901.  03d5  89 76 fa                          mov     [bp-6H],si
  902.  
  903.           }
  904.           break;
  905.  
  906.        case 'd':
  907.  03d8  e9 4e fe                          jmp     L43
  908.  
  909.           rc = 5;
  910.  03db  be 05 00          L61             mov     si,0005H
  911.  
  912.           switch(sw1) {
  913.           case 'e':                                    // dev:
  914.  03de  88 c4                             mov     ah,al
  915.  03e0  89 76 fa                          mov     [bp-6H],si
  916.  03e3  3c 70                             cmp     al,70H
  917.  03e5  72 0b                             jb      L62
  918.  03e7  76 5d                             jbe     L66
  919.  03e9  3c 72                             cmp     al,72H
  920.  03eb  0f 84 f2 01                       je      L87
  921.  03ef  e9 37 fe                          jmp     L43
  922.  03f2  3c 65             L62             cmp     al,65H
  923.  03f4  0f 85 31 fe                       jne     L43
  924.  
  925.              if (sw2 == 'v' && sw3 == ':') {
  926.  03f8  88 f0                             mov     al,dh
  927.  03fa  30 e4                             xor     ah,ah
  928.  03fc  3d 76 00                          cmp     ax,0076H
  929.  03ff  0f 85 26 fe                       jne     L43
  930.  0403  88 d0                             mov     al,dl
  931.  0405  3d 3a 00                          cmp     ax,003aH
  932.  0408  0f 85 1d fe                       jne     L43
  933.  040c  6a 01                             push    0001H
  934.  040e  ba 0a 00                          mov     dx,000aH
  935.  0411  52                                push    dx
  936.  0412  16                                push    ss
  937.  0413  8d 5e f4                          lea     bx,[bp-0cH]
  938.  0416  53                                push    bx
  939.  0417  51                                push    cx
  940.  
  941.                 tVal = strtoul((tPtr+4),&ePtr,10);
  942.  0418  83 c7 04                          add     di,0004H
  943.  041b  57                                push    di
  944.  041c  e8 00 00                          call    _strtoxl
  945.  041f  83 c4 0c                          add     sp,000cH
  946.  0422  89 d7                             mov     di,dx
  947.  
  948.                 if (tVal == 0 || tVal == 3) {
  949.                    gDevice = tVal;
  950.  0424  85 d2                             test    dx,dx
  951.  0426  75 04                             jne     L63
  952.  0428  85 c0                             test    ax,ax
  953.  042a  74 09                             je      L64
  954.  042c  85 d2             L63             test    dx,dx
  955.  042e  75 0d                             jne     L65
  956.  0430  3d 03 00                          cmp     ax,0003H
  957.  0433  75 08                             jne     L65
  958.  
  959.  0435  31 c9             L64             xor     cx,cx
  960.  
  961.                    rc = 0;
  962.                 }
  963.  0437  a3 00 00                          mov     _gDevice,ax
  964.  043a  89 4e fa                          mov     [bp-6H],cx
  965.  
  966.                 tPtr = ePtr;
  967.  043d  8b 7e f4          L65             mov     di,[bp-0cH]
  968.  0440  8b 4e f6                          mov     cx,[bp-0aH]
  969.  
  970.              }
  971.              break;
  972.  
  973.           case 'p':                                    // dp*:
  974.  0443  e9 e3 fd                          jmp     L43
  975.  
  976.              rc = 6;
  977.  0446  be 06 00          L66             mov     si,0006H
  978.  
  979.              switch(sw2) {
  980.              case ':':                                 // dp:
  981.  0449  88 f0                             mov     al,dh
  982.  044b  89 76 fa                          mov     [bp-6H],si
  983.  044e  80 fe 69                          cmp     dh,69H
  984.  0451  72 17                             jb      L67
  985.  0453  0f 86 a9 00                       jbe     L73
  986.  0457  80 fe 6d                          cmp     dh,6dH
  987.  045a  0f 82 cb fd                       jb      L43
  988.  045e  0f 86 34 01                       jbe     L83
  989.  0462  80 fe 73                          cmp     dh,73H
  990.  0465  74 53                             je      L71
  991.  0467  e9 bf fd                          jmp     L43
  992.  046a  80 fe 3a          L67             cmp     dh,3aH
  993.  046d  0f 85 b8 fd                       jne     L43
  994.  
  995.                 tVal = strtoul((tPtr+3),&ePtr,10);
  996.  0471  8d 45 03                          lea     ax,[di+3H]
  997.  0474  6a 01                             push    0001H
  998.  0476  bf 0a 00                          mov     di,000aH
  999.  0479  57                                push    di
  1000.  047a  16                                push    ss
  1001.  047b  8d 76 f4                          lea     si,[bp-0cH]
  1002.  047e  56                                push    si
  1003.  047f  51                                push    cx
  1004.  0480  50                                push    ax
  1005.  0481  e8 00 00                          call    _strtoxl
  1006.  0484  89 d7                             mov     di,dx
  1007.  
  1008.                 switch(tVal) {
  1009.                 case 0:
  1010.                 case 1:
  1011.                 case 3:
  1012.                    gDMAplay = tVal;
  1013.  0486  89 c2                             mov     dx,ax
  1014.  0488  83 c4 0c                          add     sp,000cH
  1015.  048b  83 c2 00                          add     dx,0000H
  1016.  048e  83 d7 00                          adc     di,0000H
  1017.  0491  85 ff                             test    di,di
  1018.  0493  72 1c                             jb      L70
  1019.  0495  85 ff                             test    di,di
  1020.  0497  72 10                             jb      L69
  1021.  0499  75 05                             jne     L68
  1022.  049b  83 fa 01                          cmp     dx,0001H
  1023.  049e  76 09                             jbe     L69
  1024.  04a0  85 ff             L68             test    di,di
  1025.  04a2  75 0d                             jne     L70
  1026.  04a4  83 fa 03                          cmp     dx,0003H
  1027.  04a7  75 08                             jne     L70
  1028.  
  1029.  04a9  31 db             L69             xor     bx,bx
  1030.  
  1031.                    rc = 0;
  1032.                 }
  1033.  04ab  a3 00 00                          mov     _gDMAplay,ax
  1034.  04ae  89 5e fa                          mov     [bp-6H],bx
  1035.  
  1036.                 tPtr = ePtr;
  1037.  04b1  8b 7e f4          L70             mov     di,[bp-0cH]
  1038.  04b4  8b 4e f6                          mov     cx,[bp-0aH]
  1039.  
  1040.                 break; // case dp:
  1041.  
  1042.              case 's':
  1043.  04b7  e9 6f fd                          jmp     L43
  1044.  
  1045.                 rc = 7;
  1046.  04ba  c7 46 fa 07 00    L71             mov     word ptr [bp-6H],0007H
  1047.  
  1048.                 if (sw3 == ':') {
  1049.  04bf  88 d0                             mov     al,dl
  1050.  04c1  30 e4                             xor     ah,ah
  1051.  04c3  3d 3a 00                          cmp     ax,003aH
  1052.  04c6  0f 85 5f fd                       jne     L43
  1053.  04ca  8d 56 f4                          lea     dx,[bp-0cH]
  1054.  04cd  bb 10 00                          mov     bx,0010H
  1055.  04d0  6a 01                             push    0001H
  1056.  
  1057.                    tVal = strtoul((tPtr+4),&ePtr,16);
  1058.  04d2  8d 75 04                          lea     si,[di+4H]
  1059.  04d5  89 56 f8                          mov     [bp-8H],dx
  1060.  04d8  53                                push    bx
  1061.  04d9  89 f2                             mov     dx,si
  1062.  04db  16                                push    ss
  1063.  04dc  8b 76 f8                          mov     si,[bp-8H]
  1064.  04df  56                                push    si
  1065.  04e0  51                                push    cx
  1066.  04e1  52                                push    dx
  1067.  04e2  e8 00 00                          call    _strtoxl
  1068.  04e5  89 d7                             mov     di,dx
  1069.  04e7  83 c4 0c                          add     sp,000cH
  1070.  
  1071.                    if ((tVal & 0xFFF) == 0) {  // align 4K
  1072.                       gDMAplaySize = tVal;
  1073.  04ea  a9 ff 0f                          test    ax,0fffH
  1074.  04ed  75 08                             jne     L72
  1075.  
  1076.  04ef  31 d2                             xor     dx,dx
  1077.  
  1078.                       rc = 0;
  1079.                    }
  1080.  04f1  a3 00 00                          mov     _gDMAplaySize,ax
  1081.  04f4  89 56 fa                          mov     [bp-6H],dx
  1082.  
  1083.                    tPtr = ePtr;
  1084.  04f7  8b 7e f4          L72             mov     di,[bp-0cH]
  1085.  04fa  8b 4e f6                          mov     cx,[bp-0aH]
  1086.  
  1087.                 }
  1088.                 break; // case dps
  1089.  
  1090.              case 'i':
  1091.                 rc = 8;
  1092.  04fd  e9 29 fd                          jmp     L43
  1093.  
  1094.  0500  88 d0             L73             mov     al,dl
  1095.  
  1096.                 if (sw3 == ':') {
  1097.  0502  be 08 00                          mov     si,0008H
  1098.  0505  30 e4                             xor     ah,ah
  1099.  0507  89 76 fa                          mov     [bp-6H],si
  1100.  050a  3d 3a 00                          cmp     ax,003aH
  1101.  050d  0f 85 18 fd                       jne     L43
  1102.  0511  6a 01                             push    0001H
  1103.  0513  b8 0a 00                          mov     ax,000aH
  1104.  0516  50                                push    ax
  1105.  0517  16                                push    ss
  1106.  0518  8d 4e f4                          lea     cx,[bp-0cH]
  1107.  051b  51                                push    cx
  1108.  051c  06                                push    es
  1109.  
  1110.                    tVal = strtoul((tPtr+4),&ePtr,10);
  1111.  051d  8d 55 04                          lea     dx,[di+4H]
  1112.  0520  52                                push    dx
  1113.  0521  e8 00 00                          call    _strtoxl
  1114.  0524  89 d7                             mov     di,dx
  1115.  
  1116.                    switch(tVal) {
  1117.                    case 2:
  1118.                    case 4:
  1119.                    case 8:
  1120.                    case 16:
  1121.                    case 32:
  1122.                       gDMAplayIPB = tVal;
  1123.  0526  89 c2                             mov     dx,ax
  1124.  0528  83 c4 0c                          add     sp,000cH
  1125.  052b  83 c2 00                          add     dx,0000H
  1126.  052e  83 d7 00                          adc     di,0000H
  1127.  0531  85 ff                             test    di,di
  1128.  0533  72 31                             jb      L78
  1129.  0535  75 04                             jne     L74
  1130.  0537  39 f2                             cmp     dx,si
  1131.  0539  72 2b                             jb      L78
  1132.  053b  85 ff             L74             test    di,di
  1133.  053d  72 46                             jb      L81
  1134.  053f  75 04                             jne     L75
  1135.  0541  39 f2                             cmp     dx,si
  1136.  0543  76 40                             jbe     L81
  1137.  0545  85 ff             L75             test    di,di
  1138.  0547  72 44                             jb      L82
  1139.  0549  75 05                             jne     L76
  1140.  054b  83 fa 10                          cmp     dx,0010H
  1141.  054e  72 3d                             jb      L82
  1142.  0550  85 ff             L76             test    di,di
  1143.  0552  72 31                             jb      L81
  1144.  0554  75 05                             jne     L77
  1145.  0556  83 fa 10                          cmp     dx,0010H
  1146.  0559  76 2a                             jbe     L81
  1147.  055b  85 ff             L77             test    di,di
  1148.  055d  75 2e                             jne     L82
  1149.  055f  83 fa 20                          cmp     dx,0020H
  1150.  0562  74 21                             je      L81
  1151.  0564  eb 27                             jmp     L82
  1152.  0566  85 ff             L78             test    di,di
  1153.  0568  72 23                             jb      L82
  1154.  056a  75 05                             jne     L79
  1155.  056c  83 fa 02                          cmp     dx,0002H
  1156.  056f  72 1c                             jb      L82
  1157.  0571  85 ff             L79             test    di,di
  1158.  0573  72 10                             jb      L81
  1159.  0575  75 05                             jne     L80
  1160.  0577  83 fa 02                          cmp     dx,0002H
  1161.  057a  76 09                             jbe     L81
  1162.  057c  85 ff             L80             test    di,di
  1163.  057e  75 0d                             jne     L82
  1164.  0580  83 fa 04                          cmp     dx,0004H
  1165.  0583  75 08                             jne     L82
  1166.  
  1167.  0585  31 d2             L81             xor     dx,dx
  1168.  
  1169.                       rc = 0;
  1170.                    }
  1171.  0587  a3 00 00                          mov     _gDMAplayIPB,ax
  1172.  058a  89 56 fa                          mov     [bp-6H],dx
  1173.  
  1174.                    tPtr = ePtr;
  1175.  058d  8b 7e f4          L82             mov     di,[bp-0cH]
  1176.  0590  8b 4e f6                          mov     cx,[bp-0aH]
  1177.  
  1178.                 }
  1179.                 break; // case dpi
  1180.  
  1181.              case 'm':
  1182.                 rc = 9;
  1183.  0593  e9 93 fc                          jmp     L43
  1184.  
  1185.  0596  88 d0             L83             mov     al,dl
  1186.  
  1187.                 if (sw3 == ':') {
  1188.  0598  bb 09 00                          mov     bx,0009H
  1189.  059b  30 e4                             xor     ah,ah
  1190.  059d  89 5e fa                          mov     [bp-6H],bx
  1191.  05a0  3d 3a 00                          cmp     ax,003aH
  1192.  05a3  0f 85 82 fc                       jne     L43
  1193.  05a7  6a 01                             push    0001H
  1194.  05a9  b9 0a 00                          mov     cx,000aH
  1195.  05ac  51                                push    cx
  1196.  05ad  16                                push    ss
  1197.  05ae  8d 5e f4                          lea     bx,[bp-0cH]
  1198.  05b1  53                                push    bx
  1199.  05b2  06                                push    es
  1200.  
  1201.                    tVal = strtoul((tPtr+4),&ePtr,10);
  1202.  05b3  83 c7 04                          add     di,0004H
  1203.  05b6  57                                push    di
  1204.  05b7  e8 00 00                          call    _strtoxl
  1205.  05ba  83 c4 0c                          add     sp,000cH
  1206.  05bd  89 d7                             mov     di,dx
  1207.  
  1208.                    if (tVal == 0 || tVal == 1) {
  1209.                       gDMAplayMode = tVal;
  1210.  05bf  85 d2                             test    dx,dx
  1211.  05c1  75 04                             jne     L84
  1212.  05c3  85 c0                             test    ax,ax
  1213.  05c5  74 09                             je      L85
  1214.  05c7  85 d2             L84             test    dx,dx
  1215.  05c9  75 0d                             jne     L86
  1216.  05cb  3d 01 00                          cmp     ax,0001H
  1217.  05ce  75 08                             jne     L86
  1218.  
  1219.  05d0  31 c9             L85             xor     cx,cx
  1220.  
  1221.                       rc = 0;
  1222.                    }
  1223.  05d2  a3 00 00                          mov     _gDMAplayMode,ax
  1224.  05d5  89 4e fa                          mov     [bp-6H],cx
  1225.  
  1226.                    tPtr = ePtr;
  1227.  05d8  8b 7e f4          L86             mov     di,[bp-0cH]
  1228.  05db  8b 4e f6                          mov     cx,[bp-0aH]
  1229.  
  1230.                 }
  1231.                 break;  // case dpm
  1232.              }
  1233.              break;  // case dp
  1234.  
  1235.           case 'r':                                    // dr*:
  1236.  05de  e9 48 fc                          jmp     L43
  1237.  
  1238.              rc = 10;
  1239.  05e1  c7 46 fa 0a 00    L87             mov     word ptr [bp-6H],000aH
  1240.  
  1241.              switch(sw2) {
  1242.  05e6  88 f0                             mov     al,dh
  1243.  05e8  80 fe 69                          cmp     dh,69H
  1244.  05eb  72 17                             jb      L88
  1245.  05ed  0f 86 a2 00                       jbe     L94
  1246.  05f1  80 fe 6d                          cmp     dh,6dH
  1247.  05f4  0f 82 31 fc                       jb      L43
  1248.  05f8  0f 86 2e 01                       jbe     L104
  1249.  05fc  80 fe 73                          cmp     dh,73H
  1250.  05ff  74 53                             je      L92
  1251.  0601  e9 25 fc                          jmp     L43
  1252.  0604  80 fe 3a          L88             cmp     dh,3aH
  1253.  0607  0f 85 1e fc                       jne     L43
  1254.  
  1255.              case ':':                                 // dp:
  1256.  060b  6a 01                             push    0001H
  1257.  060d  b8 0a 00                          mov     ax,000aH
  1258.  0610  50                                push    ax
  1259.  0611  16                                push    ss
  1260.  0612  8d 5e f4                          lea     bx,[bp-0cH]
  1261.  0615  53                                push    bx
  1262.  0616  51                                push    cx
  1263.  
  1264.                 tVal = strtoul((tPtr+3),&ePtr,10);
  1265.  0617  83 c7 03                          add     di,0003H
  1266.  061a  57                                push    di
  1267.  061b  e8 00 00                          call    _strtoxl
  1268.  061e  89 d7                             mov     di,dx
  1269.  
  1270.                 switch(tVal) {
  1271.                 case 0:
  1272.                 case 1:
  1273.                 case 3:
  1274.                    gDMArec = tVal;
  1275.  0620  89 c2                             mov     dx,ax
  1276.  0622  83 c4 0c                          add     sp,000cH
  1277.  0625  83 c2 00                          add     dx,0000H
  1278.  0628  83 d7 00                          adc     di,0000H
  1279.  062b  85 ff                             test    di,di
  1280.  062d  72 1c                             jb      L91
  1281.  062f  85 ff                             test    di,di
  1282.  0631  72 10                             jb      L90
  1283.  0633  75 05                             jne     L89
  1284.  0635  83 fa 01                          cmp     dx,0001H
  1285.  0638  76 09                             jbe     L90
  1286.  063a  85 ff             L89             test    di,di
  1287.  063c  75 0d                             jne     L91
  1288.  063e  83 fa 03                          cmp     dx,0003H
  1289.  0641  75 08                             jne     L91
  1290.  
  1291.  0643  31 db             L90             xor     bx,bx
  1292.  
  1293.                    rc = 0;
  1294.                 }
  1295.  0645  a3 00 00                          mov     _gDMArec,ax
  1296.  0648  89 5e fa                          mov     [bp-6H],bx
  1297.  
  1298.                 tPtr = ePtr;
  1299.  064b  8b 7e f4          L91             mov     di,[bp-0cH]
  1300.  064e  8b 4e f6                          mov     cx,[bp-0aH]
  1301.  
  1302.                 break; // case dr:
  1303.  
  1304.              case 's':
  1305.                 rc = 11;
  1306.  0651  e9 d5 fb                          jmp     L43
  1307.  
  1308.  0654  88 d0             L92             mov     al,dl
  1309.  
  1310.                 if (sw3 == ':') {
  1311.  0656  bb 0b 00                          mov     bx,000bH
  1312.  0659  30 e4                             xor     ah,ah
  1313.  065b  89 5e fa                          mov     [bp-6H],bx
  1314.  065e  3d 3a 00                          cmp     ax,003aH
  1315.  0661  0f 85 c4 fb                       jne     L43
  1316.  0665  6a 01                             push    0001H
  1317.  0667  b9 10 00                          mov     cx,0010H
  1318.  066a  51                                push    cx
  1319.  066b  16                                push    ss
  1320.  066c  8d 56 f4                          lea     dx,[bp-0cH]
  1321.  066f  52                                push    dx
  1322.  0670  06                                push    es
  1323.  
  1324.                    tVal = strtoul((tPtr+4),&ePtr,16);
  1325.  0671  83 c7 04                          add     di,0004H
  1326.  0674  57                                push    di
  1327.  0675  e8 00 00                          call    _strtoxl
  1328.  0678  89 d7                             mov     di,dx
  1329.  067a  83 c4 0c                          add     sp,000cH
  1330.  
  1331.                    if ((tVal & 0xFFF) == 0) {  // align 4K
  1332.                       gDMArecSize = tVal;
  1333.  067d  a9 ff 0f                          test    ax,0fffH
  1334.  0680  75 08                             jne     L93
  1335.  
  1336.  0682  31 c9                             xor     cx,cx
  1337.  
  1338.                       rc = 0;
  1339.                    }
  1340.  0684  a3 00 00                          mov     _gDMArecSize,ax
  1341.  0687  89 4e fa                          mov     [bp-6H],cx
  1342.  
  1343.                    tPtr = ePtr;
  1344.  068a  8b 7e f4          L93             mov     di,[bp-0cH]
  1345.  068d  8b 4e f6                          mov     cx,[bp-0aH]
  1346.  
  1347.                 }
  1348.                 break; // case drs
  1349.  
  1350.              case 'i':
  1351.  0690  e9 96 fb                          jmp     L43
  1352.  
  1353.                 rc = 12;
  1354.  0693  c7 46 fa 0c 00    L94             mov     word ptr [bp-6H],000cH
  1355.  
  1356.                 if (sw3 == ':') {
  1357.  0698  88 d0                             mov     al,dl
  1358.  069a  30 e4                             xor     ah,ah
  1359.  069c  3d 3a 00                          cmp     ax,003aH
  1360.  069f  0f 85 86 fb                       jne     L43
  1361.  06a3  6a 01                             push    0001H
  1362.  06a5  b9 0a 00                          mov     cx,000aH
  1363.  06a8  51                                push    cx
  1364.  06a9  16                                push    ss
  1365.  06aa  8d 56 f4                          lea     dx,[bp-0cH]
  1366.  06ad  52                                push    dx
  1367.  06ae  06                                push    es
  1368.  
  1369.                    tVal = strtoul((tPtr+4),&ePtr,10);
  1370.  06af  83 c7 04                          add     di,0004H
  1371.  06b2  57                                push    di
  1372.  06b3  e8 00 00                          call    _strtoxl
  1373.  06b6  89 d7                             mov     di,dx
  1374.  
  1375.                    switch(tVal) {
  1376.                    case 2:
  1377.                    case 4:
  1378.                    case 8:
  1379.                    case 16:
  1380.                    case 32:
  1381.                       gDMArecIPB = tVal;
  1382.  06b8  89 c2                             mov     dx,ax
  1383.  06ba  83 c4 0c                          add     sp,000cH
  1384.  06bd  83 c2 00                          add     dx,0000H
  1385.  06c0  83 d7 00                          adc     di,0000H
  1386.  06c3  85 ff                             test    di,di
  1387.  06c5  72 33                             jb      L99
  1388.  06c7  75 05                             jne     L95
  1389.  06c9  83 fa 08                          cmp     dx,0008H
  1390.  06cc  72 2c                             jb      L99
  1391.  06ce  85 ff             L95             test    di,di
  1392.  06d0  72 47                             jb      L102
  1393.  06d2  75 05                             jne     L96
  1394.  06d4  83 fa 08                          cmp     dx,0008H
  1395.  06d7  76 40                             jbe     L102
  1396.  06d9  85 ff             L96             test    di,di
  1397.  06db  72 44                             jb      L103
  1398.  06dd  75 05                             jne     L97
  1399.  06df  83 fa 10                          cmp     dx,0010H
  1400.  06e2  72 3d                             jb      L103
  1401.  06e4  85 ff             L97             test    di,di
  1402.  06e6  72 31                             jb      L102
  1403.  06e8  75 05                             jne     L98
  1404.  06ea  83 fa 10                          cmp     dx,0010H
  1405.  06ed  76 2a                             jbe     L102
  1406.  06ef  85 ff             L98             test    di,di
  1407.  06f1  75 2e                             jne     L103
  1408.  06f3  83 fa 20                          cmp     dx,0020H
  1409.  06f6  74 21                             je      L102
  1410.  06f8  eb 27                             jmp     L103
  1411.  06fa  85 ff             L99             test    di,di
  1412.  06fc  72 23                             jb      L103
  1413.  06fe  75 05                             jne     L100
  1414.  0700  83 fa 02                          cmp     dx,0002H
  1415.  0703  72 1c                             jb      L103
  1416.  0705  85 ff             L100            test    di,di
  1417.  0707  72 10                             jb      L102
  1418.  0709  75 05                             jne     L101
  1419.  070b  83 fa 02                          cmp     dx,0002H
  1420.  070e  76 09                             jbe     L102
  1421.  0710  85 ff             L101            test    di,di
  1422.  0712  75 0d                             jne     L103
  1423.  0714  83 fa 04                          cmp     dx,0004H
  1424.  0717  75 08                             jne     L103
  1425.  
  1426.  0719  31 d2             L102            xor     dx,dx
  1427.  
  1428.                       rc = 0;
  1429.                    }
  1430.  071b  a3 00 00                          mov     _gDMArecIPB,ax
  1431.  071e  89 56 fa                          mov     [bp-6H],dx
  1432.  
  1433.                    tPtr = ePtr;
  1434.  0721  8b 7e f4          L103            mov     di,[bp-0cH]
  1435.  0724  8b 4e f6                          mov     cx,[bp-0aH]
  1436.  
  1437.                 }
  1438.                 break; // case dri
  1439.  
  1440.              case 'm':
  1441.                 rc = 13;
  1442.  0727  e9 ff fa                          jmp     L43
  1443.  
  1444.  072a  88 d0             L104            mov     al,dl
  1445.  
  1446.                 if (sw3 == ':') {
  1447.  072c  be 0d 00                          mov     si,000dH
  1448.  072f  30 e4                             xor     ah,ah
  1449.  0731  89 76 fa                          mov     [bp-6H],si
  1450.  0734  3d 3a 00                          cmp     ax,003aH
  1451.  0737  0f 85 ee fa                       jne     L43
  1452.  073b  6a 01                             push    0001H
  1453.  073d  b8 0a 00                          mov     ax,000aH
  1454.  0740  50                                push    ax
  1455.  0741  16                                push    ss
  1456.  0742  8d 4e f4                          lea     cx,[bp-0cH]
  1457.  0745  51                                push    cx
  1458.  0746  06                                push    es
  1459.  
  1460.                    tVal = strtoul((tPtr+4),&ePtr,10);
  1461.  0747  83 c7 04                          add     di,0004H
  1462.  074a  57                                push    di
  1463.  074b  e8 00 00                          call    _strtoxl
  1464.  074e  83 c4 0c                          add     sp,000cH
  1465.  0751  89 d7                             mov     di,dx
  1466.  
  1467.                    if (tVal == 0 || tVal == 1) {
  1468.                       gDMArecMode = tVal;
  1469.  0753  85 d2                             test    dx,dx
  1470.  0755  75 04                             jne     L105
  1471.  0757  85 c0                             test    ax,ax
  1472.  0759  74 09                             je      L106
  1473.  075b  85 d2             L105            test    dx,dx
  1474.  075d  75 0d                             jne     L107
  1475.  075f  3d 01 00                          cmp     ax,0001H
  1476.  0762  75 08                             jne     L107
  1477.  
  1478.  0764  31 ff             L106            xor     di,di
  1479.  
  1480.                       rc = 0;
  1481.                    }
  1482.  0766  a3 00 00                          mov     _gDMArecMode,ax
  1483.  0769  89 7e fa                          mov     [bp-6H],di
  1484.  
  1485.                    tPtr = ePtr;
  1486.  076c  8b 7e f4          L107            mov     di,[bp-0cH]
  1487.  076f  8b 4e f6                          mov     cx,[bp-0aH]
  1488.  
  1489.                 }
  1490.                 break; // case drm
  1491.                 //
  1492.              }
  1493.              break; // case 'dr'
  1494.           }
  1495.           break;  // case 'd'
  1496.  
  1497.        case 'v':
  1498.  0772  e9 b4 fa                          jmp     L43
  1499.  
  1500.           rc = 30;
  1501.  0775  c7 46 fa 1e 00    L108            mov     word ptr [bp-6H],001eH
  1502.  
  1503.           if (sw1 == ' ' || sw1 == 0) {
  1504.  077a  88 c2                             mov     dl,al
  1505.  077c  30 f6                             xor     dh,dh
  1506.  077e  83 fa 20                          cmp     dx,0020H
  1507.  0781  74 06                             je      L109
  1508.  0783  84 c0                             test    al,al
  1509.  0785  0f 85 a0 fa                       jne     L43
  1510.  
  1511.              gCLflags = gCLflags | FLAGS_CL_VERBOSE;
  1512.  0789  8a 26 00 00       L109            mov     ah,_gCLflags
  1513.  
  1514.              rc = 0;
  1515.  078d  31 db                             xor     bx,bx
  1516.  078f  80 cc 01                          or      ah,01H
  1517.  0792  89 5e fa                          mov     [bp-6H],bx
  1518.  0795  88 26 00 00                       mov     _gCLflags,ah
  1519.  
  1520.           }
  1521.           break;
  1522.  
  1523.        case 'z':
  1524.  0799  e9 8d fa                          jmp     L43
  1525.  
  1526.           rc = 30;
  1527.  079c  c7 46 fa 1e 00    L110            mov     word ptr [bp-6H],001eH
  1528.  
  1529.           switch(sw1) {
  1530.           case '1':
  1531.  07a1  3c 32                             cmp     al,32H
  1532.  07a3  72 09                             jb      L111
  1533.  07a5  76 1a                             jbe     L112
  1534.  07a7  3c 65                             cmp     al,65H
  1535.  07a9  74 29                             je      L113
  1536.  07ab  e9 7b fa                          jmp     L43
  1537.  07ae  3c 31             L111            cmp     al,31H
  1538.  07b0  0f 85 75 fa                       jne     L43
  1539.  
  1540.              gCLflags = gCLflags | FLAGS_CL_SETDTM;
  1541.  07b4  80 0e 00 00 02                    or      byte ptr _gCLflags,02H
  1542.  
  1543.              rc = 0;
  1544.  07b9  31 c0                             xor     ax,ax
  1545.  07bb  89 46 fa                          mov     [bp-6H],ax
  1546.  
  1547.              break;
  1548.           case '2':
  1549.  07be  e9 68 fa                          jmp     L43
  1550.  
  1551.              gCLflags = gCLflags | FLAGS_CL_SETACAL;
  1552.  07c1  8a 3e 00 00       L112            mov     bh,_gCLflags
  1553.  
  1554.              rc = 0;
  1555.  07c5  31 f6                             xor     si,si
  1556.  07c7  80 cf 04                          or      bh,04H
  1557.  07ca  89 76 fa                          mov     [bp-6H],si
  1558.  07cd  88 3e 00 00                       mov     _gCLflags,bh
  1559.  
  1560.              break;
  1561.  
  1562.           case 'e':
  1563.  07d1  e9 55 fa                          jmp     L43
  1564.  
  1565.              gCLflags = gCLflags | FLAGS_CL_DDPRINT;
  1566.  07d4  80 0e 01 00 40    L113            or      byte ptr _gCLflags+1H,40H
  1567.  
  1568.              rc = 0;
  1569.  07d9  31 db                             xor     bx,bx
  1570.  07db  89 5e fa                          mov     [bp-6H],bx
  1571.  
  1572.              break;
  1573.           }
  1574.           break;
  1575.  
  1576.        case 'Q':
  1577.  07de  e9 48 fa                          jmp     L43
  1578.  
  1579.           rc = 30;
  1580.  07e1  c7 46 fa 1e 00    L114            mov     word ptr [bp-6H],001eH
  1581.  
  1582.           if (sw1 == ' ' || sw1 == 0) {
  1583.  07e6  88 c2                             mov     dl,al
  1584.  07e8  30 f6                             xor     dh,dh
  1585.  07ea  83 fa 20                          cmp     dx,0020H
  1586.  07ed  74 06                             je      L115
  1587.  07ef  84 c0                             test    al,al
  1588.  07f1  0f 85 34 fa                       jne     L43
  1589.  
  1590.              gCLflags = gCLflags | FLAGS_CL_QUIET;
  1591.  07f5  8a 36 00 00       L115            mov     dh,_gCLflags
  1592.  
  1593.              rc = 0;
  1594.  07f9  31 db                             xor     bx,bx
  1595.  07fb  80 ce 80                          or      dh,80H
  1596.  07fe  89 5e fa                          mov     [bp-6H],bx
  1597.  0801  88 36 00 00                       mov     _gCLflags,dh
  1598.  
  1599.           }
  1600.           break;
  1601.  
  1602.        case 't':
  1603.           rc = 30;
  1604.  0805  e9 21 fa                          jmp     L43
  1605.  
  1606.  0808  88 c2             L116            mov     dl,al
  1607.  
  1608.           if (sw1 == ' ' || sw1 == 0) {
  1609.  080a  be 1e 00                          mov     si,001eH
  1610.  080d  30 f6                             xor     dh,dh
  1611.  080f  89 76 fa                          mov     [bp-6H],si
  1612.  0812  83 fa 20                          cmp     dx,0020H
  1613.  0815  74 06                             je      L117
  1614.  0817  84 c0                             test    al,al
  1615.  0819  0f 85 0c fa                       jne     L43
  1616.  
  1617.              gCLflags = gCLflags | FLAGS_CL_TESTONLY;
  1618.  081d  8a 16 01 00       L117            mov     dl,_gCLflags+1H
  1619.  
  1620.              rc = 0;
  1621.  0821  31 c0                             xor     ax,ax
  1622.  0823  80 ca 80                          or      dl,80H
  1623.  0826  89 46 fa                          mov     [bp-6H],ax
  1624.  0829  88 16 01 00                       mov     _gCLflags+1H,dl
  1625.  
  1626.           }
  1627.           break;
  1628.  
  1629.        default:
  1630.  082d  e9 f9 f9                          jmp     L43
  1631.  
  1632.           rc = 31;
  1633.  0830  c7 46 fa 1f 00    L118            mov     word ptr [bp-6H],001fH
  1634.  
  1635.        }
  1636.  
  1637.     } // if *tPtr = '-'
  1638.  }    // while (*tPtr && (rc == 0)) {
  1639.  
  1640.  0835  e9 f1 f9                          jmp     L43
  1641.  
  1642.  if ((gCLflags & FLAGS_CL_QUIET) == 0) {
  1643.  0838  f6 06 00 00 80    L119            test    byte ptr _gCLflags,80H
  1644.  083d  75 1d                             jne     L120
  1645.  
  1646.     DosPutMessage(STDOUT,_fstrlen(signOnMsg),signOnMsg);
  1647.  }
  1648.  
  1649.  083f  6a 01                             push    0001H
  1650.  0841  8c d8                             mov     ax,ds
  1651.  0843  bf 00 00                          mov     di,offset _signOnMsg
  1652.  0846  8e c0                             mov     es,ax
  1653.  0848  b9 ff ff                          mov     cx,0ffffH
  1654.  084b  31 c0                             xor     ax,ax
  1655.  084d  f2 ae                             repne   scasb    
  1656.  084f  f7 d1                             not     cx
  1657.  0851  49                                dec     cx
  1658.  0852  51                                push    cx
  1659.  0853  1e                                push    ds
  1660.  0854  68 00 00                          push    offset _signOnMsg
  1661.  0857  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  1662.  
  1663.  if (gCLflags & FLAGS_CL_VERBOSE) {
  1664.  
  1665.  085c  f6 06 00 00 01    L120            test    byte ptr _gCLflags,01H
  1666.  0861  0f 84 38 09                       je      L182
  1667.  
  1668.     if (argListPtr) {
  1669.  0865  8b 56 fe                          mov     dx,[bp-2H]
  1670.  0868  8b 5e fc                          mov     bx,[bp-4H]
  1671.  086b  85 d2                             test    dx,dx
  1672.  086d  75 06                             jne     L121
  1673.  086f  85 db                             test    bx,bx
  1674.  0871  0f 84 ab 00                       je      L126
  1675.  
  1676.        _fstrcpy(valueMsg,"device=cs40.sys ");
  1677.  0875  b8 f6 01          L121            mov     ax,offset L25
  1678.  0878  8d 7e b4                          lea     di,[bp-4cH]
  1679.  087b  8c d2                             mov     dx,ss
  1680.  087d  8c de                             mov     si,ds
  1681.  087f  8e c2                             mov     es,dx
  1682.  0881  1e                                push    ds
  1683.  0882  57                                push    di
  1684.  0883  96                                xchg    ax,si
  1685.  0884  8e d8                             mov     ds,ax
  1686.  0886  8a 04             L122            mov     al,[si]
  1687.  0888  26 88 05                          mov     es:[di],al
  1688.  088b  3c 00                             cmp     al,00H
  1689.  088d  74 11                             je      L123
  1690.  088f  8a 44 01                          mov     al,[si+1H]
  1691.  0892  83 c6 02                          add     si,0002H
  1692.  0895  26 88 45 01                       mov     es:[di+1H],al
  1693.  0899  83 c7 02                          add     di,0002H
  1694.  089c  3c 00                             cmp     al,00H
  1695.  089e  75 e6                             jne     L122
  1696.  08a0  5f                L123            pop     di
  1697.  08a1  1f                                pop     ds
  1698.  
  1699.        DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  1700.  08a2  6a 01                             push    0001H
  1701.  08a4  8d 7e b4                          lea     di,[bp-4cH]
  1702.  08a7  b9 ff ff                          mov     cx,0ffffH
  1703.  08aa  31 c0                             xor     ax,ax
  1704.  08ac  f2 ae                             repne   scasb    
  1705.  08ae  f7 d1                             not     cx
  1706.  08b0  49                                dec     cx
  1707.  08b1  51                                push    cx
  1708.  08b2  16                                push    ss
  1709.  08b3  8d 56 b4                          lea     dx,[bp-4cH]
  1710.  08b6  52                                push    dx
  1711.  08b7  8b 7e fc                          mov     di,[bp-4H]
  1712.  08ba  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  1713.  
  1714.        DosPutMessage(STDOUT,_fstrlen(argListPtr),argListPtr);
  1715.  08bf  6a 01                             push    0001H
  1716.  08c1  8e 46 fe                          mov     es,[bp-2H]
  1717.  08c4  b9 ff ff                          mov     cx,0ffffH
  1718.  08c7  31 c0                             xor     ax,ax
  1719.  08c9  f2 ae                             repne   scasb    
  1720.  08cb  f7 d1                             not     cx
  1721.  08cd  49                                dec     cx
  1722.  08ce  51                                push    cx
  1723.  08cf  06                                push    es
  1724.  08d0  8b 76 fc                          mov     si,[bp-4H]
  1725.  08d3  56                                push    si
  1726.  08d4  8d 7e b4                          lea     di,[bp-4cH]
  1727.  08d7  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  1728.  
  1729.        _fstrcpy(valueMsg,"\r\n");
  1730.  08dc  b8 f2 01                          mov     ax,offset L24
  1731.  08df  8c d2                             mov     dx,ss
  1732.  08e1  8c de                             mov     si,ds
  1733.  08e3  8e c2                             mov     es,dx
  1734.  08e5  1e                                push    ds
  1735.  08e6  57                                push    di
  1736.  08e7  96                                xchg    ax,si
  1737.  08e8  8e d8                             mov     ds,ax
  1738.  08ea  8a 04             L124            mov     al,[si]
  1739.  08ec  26 88 05                          mov     es:[di],al
  1740.  08ef  3c 00                             cmp     al,00H
  1741.  08f1  74 11                             je      L125
  1742.  08f3  8a 44 01                          mov     al,[si+1H]
  1743.  08f6  83 c6 02                          add     si,0002H
  1744.  08f9  26 88 45 01                       mov     es:[di+1H],al
  1745.  08fd  83 c7 02                          add     di,0002H
  1746.  0900  3c 00                             cmp     al,00H
  1747.  0902  75 e6                             jne     L124
  1748.  0904  5f                L125            pop     di
  1749.  0905  1f                                pop     ds
  1750.  
  1751.        DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  1752.     }
  1753.  
  1754.  0906  6a 01                             push    0001H
  1755.  0908  8d 7e b4                          lea     di,[bp-4cH]
  1756.  090b  b9 ff ff                          mov     cx,0ffffH
  1757.  090e  31 c0                             xor     ax,ax
  1758.  0910  f2 ae                             repne   scasb    
  1759.  0912  f7 d1                             not     cx
  1760.  0914  49                                dec     cx
  1761.  0915  51                                push    cx
  1762.  0916  16                                push    ss
  1763.  0917  8d 56 b4                          lea     dx,[bp-4cH]
  1764.  091a  52                                push    dx
  1765.  091b  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  1766.  
  1767.     DosPutMessage(STDOUT,_fstrlen(irqMsg),irqMsg);
  1768.  0920  6a 01             L126            push    0001H
  1769.  0922  8c d8                             mov     ax,ds
  1770.  0924  bf 00 00                          mov     di,offset _irqMsg
  1771.  0927  8e c0                             mov     es,ax
  1772.  0929  b9 ff ff                          mov     cx,0ffffH
  1773.  092c  31 c0                             xor     ax,ax
  1774.  092e  f2 ae                             repne   scasb    
  1775.  0930  f7 d1                             not     cx
  1776.  0932  49                                dec     cx
  1777.  0933  51                                push    cx
  1778.  0934  1e                                push    ds
  1779.  0935  68 00 00                          push    offset _irqMsg
  1780.  0938  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  1781.  
  1782.     if (gIRQ == 99) {
  1783.  093d  8b 3e 00 00                       mov     di,_gIRQ
  1784.  0941  83 ff 63                          cmp     di,0063H
  1785.  0944  75 2f                             jne     L129
  1786.  
  1787.        _fstrcpy(valueMsg," *not set*\r\n");
  1788.     }
  1789.  0946  b8 08 02                          mov     ax,offset L26
  1790.  0949  8d 7e b4                          lea     di,[bp-4cH]
  1791.  094c  8c d2                             mov     dx,ss
  1792.  094e  8c de                             mov     si,ds
  1793.  0950  8e c2                             mov     es,dx
  1794.  0952  1e                                push    ds
  1795.  0953  57                                push    di
  1796.  0954  96                                xchg    ax,si
  1797.  0955  8e d8                             mov     ds,ax
  1798.  0957  8a 04             L127            mov     al,[si]
  1799.  0959  26 88 05                          mov     es:[di],al
  1800.  095c  3c 00                             cmp     al,00H
  1801.  095e  74 11                             je      L128
  1802.  0960  8a 44 01                          mov     al,[si+1H]
  1803.  0963  83 c6 02                          add     si,0002H
  1804.  0966  26 88 45 01                       mov     es:[di+1H],al
  1805.  096a  83 c7 02                          add     di,0002H
  1806.  096d  3c 00                             cmp     al,00H
  1807.  096f  75 e6                             jne     L127
  1808.  0971  5f                L128            pop     di
  1809.  0972  1f                                pop     ds
  1810.  
  1811.     else {
  1812.        valueMsg[0] = 0;
  1813.  0973  eb 44                             jmp     L132
  1814.  
  1815.  0975  6a 00             L129            push    0000H
  1816.  0977  6a 0a                             push    000aH
  1817.  0979  16                                push    ss
  1818.  097a  8d 5e b4                          lea     bx,[bp-4cH]
  1819.  097d  53                                push    bx
  1820.  097e  8c de                             mov     si,ds
  1821.  0980  6a 00                             push    0000H
  1822.  
  1823.        _ultoa(gIRQ,valueMsg,10);
  1824.  0982  30 c9                             xor     cl,cl
  1825.  0984  57                                push    di
  1826.  0985  88 4e b4                          mov     [bp-4cH],cl
  1827.  0988  e8 00 00                          call    _xtoa
  1828.  
  1829.        _fstrcat(valueMsg,"\r\n");
  1830.     }
  1831.  098b  b8 f2 01                          mov     ax,offset L24
  1832.  098e  8d 7e b4                          lea     di,[bp-4cH]
  1833.  0991  8c d2                             mov     dx,ss
  1834.  0993  83 c4 0c                          add     sp,000cH
  1835.  0996  8e c2                             mov     es,dx
  1836.  0998  1e                                push    ds
  1837.  0999  57                                push    di
  1838.  099a  96                                xchg    ax,si
  1839.  099b  8e d8                             mov     ds,ax
  1840.  099d  b9 ff ff                          mov     cx,0ffffH
  1841.  09a0  b0 00                             mov     al,00H
  1842.  09a2  f2 ae                             repne   scasb    
  1843.  09a4  4f                                dec     di
  1844.  09a5  8a 04             L130            mov     al,[si]
  1845.  09a7  aa                                stosb   
  1846.  09a8  3c 00                             cmp     al,00H
  1847.  09aa  74 0b                             je      L131
  1848.  09ac  8a 44 01                          mov     al,[si+1H]
  1849.  09af  83 c6 02                          add     si,0002H
  1850.  09b2  aa                                stosb   
  1851.  09b3  3c 00                             cmp     al,00H
  1852.  09b5  75 ee                             jne     L130
  1853.  09b7  5f                L131            pop     di
  1854.  09b8  1f                                pop     ds
  1855.  
  1856.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  1857.  
  1858.  09b9  6a 01             L132            push    0001H
  1859.  09bb  8c d0                             mov     ax,ss
  1860.  09bd  8d 7e b4                          lea     di,[bp-4cH]
  1861.  09c0  8e c0                             mov     es,ax
  1862.  09c2  b9 ff ff                          mov     cx,0ffffH
  1863.  09c5  31 c0                             xor     ax,ax
  1864.  09c7  f2 ae                             repne   scasb    
  1865.  09c9  f7 d1                             not     cx
  1866.  09cb  49                                dec     cx
  1867.  09cc  51                                push    cx
  1868.  09cd  16                                push    ss
  1869.  09ce  8d 56 b4                          lea     dx,[bp-4cH]
  1870.  09d1  52                                push    dx
  1871.  09d2  bf 00 00                          mov     di,offset _basePortMsg
  1872.  09d5  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  1873.  09da  8c d8                             mov     ax,ds
  1874.  
  1875.     DosPutMessage(STDOUT,_fstrlen(basePortMsg),basePortMsg);
  1876.  09dc  6a 01                             push    0001H
  1877.  09de  8e c0                             mov     es,ax
  1878.  09e0  b9 ff ff                          mov     cx,0ffffH
  1879.  09e3  31 c0                             xor     ax,ax
  1880.  09e5  f2 ae                             repne   scasb    
  1881.  09e7  f7 d1                             not     cx
  1882.  09e9  49                                dec     cx
  1883.  09ea  51                                push    cx
  1884.  09eb  1e                                push    ds
  1885.  09ec  68 00 00                          push    offset _basePortMsg
  1886.  09ef  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  1887.  
  1888.     if (gBasePort == 99) {
  1889.  09f4  a1 00 00                          mov     ax,_gBasePort
  1890.  09f7  3d 63 00                          cmp     ax,0063H
  1891.  09fa  75 2f                             jne     L135
  1892.  
  1893.        _fstrcpy(valueMsg," *not set*\r\n");
  1894.     }
  1895.  09fc  b8 08 02                          mov     ax,offset L26
  1896.  09ff  8d 7e b4                          lea     di,[bp-4cH]
  1897.  0a02  8c d2                             mov     dx,ss
  1898.  0a04  8c de                             mov     si,ds
  1899.  0a06  8e c2                             mov     es,dx
  1900.  0a08  1e                                push    ds
  1901.  0a09  57                                push    di
  1902.  0a0a  96                                xchg    ax,si
  1903.  0a0b  8e d8                             mov     ds,ax
  1904.  0a0d  8a 04             L133            mov     al,[si]
  1905.  0a0f  26 88 05                          mov     es:[di],al
  1906.  0a12  3c 00                             cmp     al,00H
  1907.  0a14  74 11                             je      L134
  1908.  0a16  8a 44 01                          mov     al,[si+1H]
  1909.  0a19  83 c6 02                          add     si,0002H
  1910.  0a1c  26 88 45 01                       mov     es:[di+1H],al
  1911.  0a20  83 c7 02                          add     di,0002H
  1912.  0a23  3c 00                             cmp     al,00H
  1913.  0a25  75 e6                             jne     L133
  1914.  0a27  5f                L134            pop     di
  1915.  0a28  1f                                pop     ds
  1916.  
  1917.     else {
  1918.        valueMsg[0] = 0;
  1919.  0a29  eb 44                             jmp     L138
  1920.  
  1921.  0a2b  6a 00             L135            push    0000H
  1922.  0a2d  6a 10                             push    0010H
  1923.  0a2f  8d 56 b4                          lea     dx,[bp-4cH]
  1924.  0a32  16                                push    ss
  1925.  0a33  8d 7e b4                          lea     di,[bp-4cH]
  1926.  0a36  52                                push    dx
  1927.  0a37  8c de                             mov     si,ds
  1928.  0a39  6a 00                             push    0000H
  1929.  
  1930.        _ultoa(gBasePort,valueMsg,16);
  1931.  0a3b  30 ed                             xor     ch,ch
  1932.  0a3d  50                                push    ax
  1933.  0a3e  88 6e b4                          mov     [bp-4cH],ch
  1934.  0a41  e8 00 00                          call    _xtoa
  1935.  
  1936.        _fstrcat(valueMsg,"\r\n");
  1937.     }
  1938.  0a44  b8 f2 01                          mov     ax,offset L24
  1939.  0a47  8c d2                             mov     dx,ss
  1940.  0a49  83 c4 0c                          add     sp,000cH
  1941.  0a4c  8e c2                             mov     es,dx
  1942.  0a4e  1e                                push    ds
  1943.  0a4f  57                                push    di
  1944.  0a50  96                                xchg    ax,si
  1945.  0a51  8e d8                             mov     ds,ax
  1946.  0a53  b9 ff ff                          mov     cx,0ffffH
  1947.  0a56  b0 00                             mov     al,00H
  1948.  0a58  f2 ae                             repne   scasb    
  1949.  0a5a  4f                                dec     di
  1950.  0a5b  8a 04             L136            mov     al,[si]
  1951.  0a5d  aa                                stosb   
  1952.  0a5e  3c 00                             cmp     al,00H
  1953.  0a60  74 0b                             je      L137
  1954.  0a62  8a 44 01                          mov     al,[si+1H]
  1955.  0a65  83 c6 02                          add     si,0002H
  1956.  0a68  aa                                stosb   
  1957.  0a69  3c 00                             cmp     al,00H
  1958.  0a6b  75 ee                             jne     L136
  1959.  0a6d  5f                L137            pop     di
  1960.  0a6e  1f                                pop     ds
  1961.  
  1962.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  1963.  
  1964.  0a6f  6a 01             L138            push    0001H
  1965.  0a71  8c d0                             mov     ax,ss
  1966.  0a73  8d 7e b4                          lea     di,[bp-4cH]
  1967.  0a76  8e c0                             mov     es,ax
  1968.  0a78  b9 ff ff                          mov     cx,0ffffH
  1969.  0a7b  31 c0                             xor     ax,ax
  1970.  0a7d  f2 ae                             repne   scasb    
  1971.  0a7f  f7 d1                             not     cx
  1972.  0a81  49                                dec     cx
  1973.  0a82  51                                push    cx
  1974.  0a83  16                                push    ss
  1975.  0a84  8d 56 b4                          lea     dx,[bp-4cH]
  1976.  0a87  52                                push    dx
  1977.  0a88  bf 00 00                          mov     di,offset _ctrlPortMsg
  1978.  0a8b  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  1979.  0a90  8c d8                             mov     ax,ds
  1980.  
  1981.     DosPutMessage(STDOUT,_fstrlen(ctrlPortMsg),ctrlPortMsg);
  1982.  0a92  6a 01                             push    0001H
  1983.  0a94  8e c0                             mov     es,ax
  1984.  0a96  b9 ff ff                          mov     cx,0ffffH
  1985.  0a99  31 c0                             xor     ax,ax
  1986.  0a9b  f2 ae                             repne   scasb    
  1987.  0a9d  f7 d1                             not     cx
  1988.  0a9f  49                                dec     cx
  1989.  0aa0  51                                push    cx
  1990.  0aa1  1e                                push    ds
  1991.  0aa2  68 00 00                          push    offset _ctrlPortMsg
  1992.  0aa5  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  1993.  
  1994.     if (gCtrlPort == 99) {
  1995.  0aaa  8b 16 00 00                       mov     dx,_gCtrlPort
  1996.  0aae  83 fa 63                          cmp     dx,0063H
  1997.  0ab1  75 2f                             jne     L141
  1998.  
  1999.        _fstrcpy(valueMsg," *not set*\r\n");
  2000.     }
  2001.  0ab3  b8 08 02                          mov     ax,offset L26
  2002.  0ab6  8d 7e b4                          lea     di,[bp-4cH]
  2003.  0ab9  8c d2                             mov     dx,ss
  2004.  0abb  8c de                             mov     si,ds
  2005.  0abd  8e c2                             mov     es,dx
  2006.  0abf  1e                                push    ds
  2007.  0ac0  57                                push    di
  2008.  0ac1  96                                xchg    ax,si
  2009.  0ac2  8e d8                             mov     ds,ax
  2010.  0ac4  8a 04             L139            mov     al,[si]
  2011.  0ac6  26 88 05                          mov     es:[di],al
  2012.  0ac9  3c 00                             cmp     al,00H
  2013.  0acb  74 11                             je      L140
  2014.  0acd  8a 44 01                          mov     al,[si+1H]
  2015.  0ad0  83 c6 02                          add     si,0002H
  2016.  0ad3  26 88 45 01                       mov     es:[di+1H],al
  2017.  0ad7  83 c7 02                          add     di,0002H
  2018.  0ada  3c 00                             cmp     al,00H
  2019.  0adc  75 e6                             jne     L139
  2020.  0ade  5f                L140            pop     di
  2021.  0adf  1f                                pop     ds
  2022.  
  2023.     else {
  2024.        valueMsg[0] = 0;
  2025.  0ae0  eb 44                             jmp     L144
  2026.  
  2027.  0ae2  6a 00             L141            push    0000H
  2028.  0ae4  6a 10                             push    0010H
  2029.  0ae6  8d 5e b4                          lea     bx,[bp-4cH]
  2030.  0ae9  16                                push    ss
  2031.  0aea  8d 7e b4                          lea     di,[bp-4cH]
  2032.  0aed  53                                push    bx
  2033.  0aee  8c de                             mov     si,ds
  2034.  0af0  6a 00                             push    0000H
  2035.  
  2036.        _ultoa(gCtrlPort,valueMsg,16);
  2037.  0af2  30 c0                             xor     al,al
  2038.  0af4  52                                push    dx
  2039.  0af5  88 46 b4                          mov     [bp-4cH],al
  2040.  0af8  e8 00 00                          call    _xtoa
  2041.  
  2042.        _fstrcat(valueMsg,"\r\n");
  2043.     }
  2044.  0afb  b8 f2 01                          mov     ax,offset L24
  2045.  0afe  8c d2                             mov     dx,ss
  2046.  0b00  83 c4 0c                          add     sp,000cH
  2047.  0b03  8e c2                             mov     es,dx
  2048.  0b05  1e                                push    ds
  2049.  0b06  57                                push    di
  2050.  0b07  96                                xchg    ax,si
  2051.  0b08  8e d8                             mov     ds,ax
  2052.  0b0a  b9 ff ff                          mov     cx,0ffffH
  2053.  0b0d  b0 00                             mov     al,00H
  2054.  0b0f  f2 ae                             repne   scasb    
  2055.  0b11  4f                                dec     di
  2056.  0b12  8a 04             L142            mov     al,[si]
  2057.  0b14  aa                                stosb   
  2058.  0b15  3c 00                             cmp     al,00H
  2059.  0b17  74 0b                             je      L143
  2060.  0b19  8a 44 01                          mov     al,[si+1H]
  2061.  0b1c  83 c6 02                          add     si,0002H
  2062.  0b1f  aa                                stosb   
  2063.  0b20  3c 00                             cmp     al,00H
  2064.  0b22  75 ee                             jne     L142
  2065.  0b24  5f                L143            pop     di
  2066.  0b25  1f                                pop     ds
  2067.  
  2068.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2069.  
  2070.  0b26  6a 01             L144            push    0001H
  2071.  0b28  8c d0                             mov     ax,ss
  2072.  0b2a  8d 7e b4                          lea     di,[bp-4cH]
  2073.  0b2d  8e c0                             mov     es,ax
  2074.  0b2f  b9 ff ff                          mov     cx,0ffffH
  2075.  0b32  31 c0                             xor     ax,ax
  2076.  0b34  f2 ae                             repne   scasb    
  2077.  0b36  f7 d1                             not     cx
  2078.  0b38  49                                dec     cx
  2079.  0b39  51                                push    cx
  2080.  0b3a  16                                push    ss
  2081.  0b3b  8d 56 b4                          lea     dx,[bp-4cH]
  2082.  0b3e  52                                push    dx
  2083.  0b3f  bf 00 00                          mov     di,offset _modeMsg
  2084.  0b42  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2085.  0b47  8c d8                             mov     ax,ds
  2086.  
  2087.     DosPutMessage(STDOUT,_fstrlen(modeMsg),modeMsg);
  2088.     valueMsg[0] = 0;
  2089.  0b49  6a 01                             push    0001H
  2090.  0b4b  8e c0                             mov     es,ax
  2091.  0b4d  b9 ff ff                          mov     cx,0ffffH
  2092.  0b50  31 c0                             xor     ax,ax
  2093.  0b52  f2 ae                             repne   scasb    
  2094.  0b54  f7 d1                             not     cx
  2095.  0b56  49                                dec     cx
  2096.  0b57  51                                push    cx
  2097.  0b58  1e                                push    ds
  2098.  0b59  68 00 00                          push    offset _modeMsg
  2099.  0b5c  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2100.  0b61  6a 00                             push    0000H
  2101.  0b63  8c de                             mov     si,ds
  2102.  0b65  6a 0a                             push    000aH
  2103.  0b67  8d 56 b4                          lea     dx,[bp-4cH]
  2104.  0b6a  16                                push    ss
  2105.  0b6b  8d 7e b4                          lea     di,[bp-4cH]
  2106.  0b6e  52                                push    dx
  2107.  
  2108.  0b6f  8b 1e 00 00                       mov     bx,_gMode
  2109.  0b73  6a 00                             push    0000H
  2110.  
  2111.     _ultoa(gMode,valueMsg,10);
  2112.  0b75  30 e4                             xor     ah,ah
  2113.  0b77  53                                push    bx
  2114.  0b78  88 66 b4                          mov     [bp-4cH],ah
  2115.  0b7b  e8 00 00                          call    _xtoa
  2116.  
  2117.     _fstrcat(valueMsg,"\r\n");
  2118.  0b7e  b8 f2 01                          mov     ax,offset L24
  2119.  0b81  8c d2                             mov     dx,ss
  2120.  0b83  83 c4 0c                          add     sp,000cH
  2121.  0b86  8e c2                             mov     es,dx
  2122.  0b88  1e                                push    ds
  2123.  0b89  57                                push    di
  2124.  0b8a  96                                xchg    ax,si
  2125.  0b8b  8e d8                             mov     ds,ax
  2126.  0b8d  b9 ff ff                          mov     cx,0ffffH
  2127.  0b90  b0 00                             mov     al,00H
  2128.  0b92  f2 ae                             repne   scasb    
  2129.  0b94  4f                                dec     di
  2130.  0b95  8a 04             L145            mov     al,[si]
  2131.  0b97  aa                                stosb   
  2132.  0b98  3c 00                             cmp     al,00H
  2133.  0b9a  74 0b                             je      L146
  2134.  0b9c  8a 44 01                          mov     al,[si+1H]
  2135.  0b9f  83 c6 02                          add     si,0002H
  2136.  0ba2  aa                                stosb   
  2137.  0ba3  3c 00                             cmp     al,00H
  2138.  0ba5  75 ee                             jne     L145
  2139.  0ba7  5f                L146            pop     di
  2140.  0ba8  1f                                pop     ds
  2141.  
  2142.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2143.  
  2144.  0ba9  6a 01                             push    0001H
  2145.  0bab  8d 7e b4                          lea     di,[bp-4cH]
  2146.  0bae  b9 ff ff                          mov     cx,0ffffH
  2147.  0bb1  31 c0                             xor     ax,ax
  2148.  0bb3  f2 ae                             repne   scasb    
  2149.  0bb5  f7 d1                             not     cx
  2150.  0bb7  49                                dec     cx
  2151.  0bb8  51                                push    cx
  2152.  0bb9  16                                push    ss
  2153.  0bba  8d 56 b4                          lea     dx,[bp-4cH]
  2154.  0bbd  52                                push    dx
  2155.  0bbe  bf 00 00                          mov     di,offset _deviceMsg
  2156.  0bc1  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2157.  0bc6  8c d8                             mov     ax,ds
  2158.  
  2159.     DosPutMessage(STDOUT,_fstrlen(deviceMsg),deviceMsg);
  2160.  0bc8  6a 01                             push    0001H
  2161.  0bca  8e c0                             mov     es,ax
  2162.  0bcc  b9 ff ff                          mov     cx,0ffffH
  2163.  0bcf  31 c0                             xor     ax,ax
  2164.  0bd1  f2 ae                             repne   scasb    
  2165.  0bd3  f7 d1                             not     cx
  2166.  0bd5  49                                dec     cx
  2167.  0bd6  51                                push    cx
  2168.  0bd7  1e                                push    ds
  2169.  0bd8  68 00 00                          push    offset _deviceMsg
  2170.  0bdb  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2171.  
  2172.     if (gDevice > 3) gDevice = 99;
  2173.  0be0  83 3e 00 00 03                    cmp     word ptr _gDevice,0003H
  2174.  0be5  76 06                             jbe     L147
  2175.  0be7  c7 06 00 00 63 00                 mov     word ptr _gDevice,0063H
  2176.  
  2177.     if (gDevice == 99) {
  2178.  0bed  8b 36 00 00       L147            mov     si,_gDevice
  2179.  0bf1  83 fe 63                          cmp     si,0063H
  2180.  0bf4  75 2f                             jne     L150
  2181.  
  2182.        _fstrcpy(valueMsg," *not set*\r\n");
  2183.     }
  2184.  0bf6  b8 08 02                          mov     ax,offset L26
  2185.  0bf9  8d 7e b4                          lea     di,[bp-4cH]
  2186.  0bfc  8c d2                             mov     dx,ss
  2187.  0bfe  8c de                             mov     si,ds
  2188.  0c00  8e c2                             mov     es,dx
  2189.  0c02  1e                                push    ds
  2190.  0c03  57                                push    di
  2191.  0c04  96                                xchg    ax,si
  2192.  0c05  8e d8                             mov     ds,ax
  2193.  0c07  8a 04             L148            mov     al,[si]
  2194.  0c09  26 88 05                          mov     es:[di],al
  2195.  0c0c  3c 00                             cmp     al,00H
  2196.  0c0e  74 11                             je      L149
  2197.  0c10  8a 44 01                          mov     al,[si+1H]
  2198.  0c13  83 c6 02                          add     si,0002H
  2199.  0c16  26 88 45 01                       mov     es:[di+1H],al
  2200.  0c1a  83 c7 02                          add     di,0002H
  2201.  0c1d  3c 00                             cmp     al,00H
  2202.  0c1f  75 e6                             jne     L148
  2203.  0c21  5f                L149            pop     di
  2204.  0c22  1f                                pop     ds
  2205.  
  2206.     else {
  2207.        valueMsg[0] = 0;
  2208.  0c23  eb 74                             jmp     L155
  2209.  
  2210.  0c25  6a 00             L150            push    0000H
  2211.  
  2212.        _ultoa(gDevice,valueMsg,10);
  2213.  0c27  30 d2                             xor     dl,dl
  2214.  0c29  6a 0a                             push    000aH
  2215.  0c2b  88 56 b4                          mov     [bp-4cH],dl
  2216.  0c2e  16                                push    ss
  2217.  0c2f  8d 56 b4                          lea     dx,[bp-4cH]
  2218.  0c32  52                                push    dx
  2219.  0c33  6a 00                             push    0000H
  2220.  0c35  56                                push    si
  2221.  0c36  8d 7e b4                          lea     di,[bp-4cH]
  2222.  0c39  e8 00 00                          call    _xtoa
  2223.  
  2224.        _fstrcat(valueMsg,deviceStr[gDevice]);
  2225.  0c3c  8b 1e 00 00                       mov     bx,_gDevice
  2226.  0c40  83 c4 0c                          add     sp,000cH
  2227.  0c43  8c de                             mov     si,ds
  2228.  0c45  01 db                             add     bx,bx
  2229.  0c47  8c d2                             mov     dx,ss
  2230.  0c49  8b 87 00 00                       mov     ax,[bx+_deviceStr]
  2231.  0c4d  8e c2                             mov     es,dx
  2232.  0c4f  1e                                push    ds
  2233.  0c50  57                                push    di
  2234.  0c51  96                                xchg    ax,si
  2235.  0c52  8e d8                             mov     ds,ax
  2236.  0c54  b9 ff ff                          mov     cx,0ffffH
  2237.  0c57  b0 00                             mov     al,00H
  2238.  0c59  f2 ae                             repne   scasb    
  2239.  0c5b  4f                                dec     di
  2240.  0c5c  8a 04             L151            mov     al,[si]
  2241.  0c5e  aa                                stosb   
  2242.  0c5f  3c 00                             cmp     al,00H
  2243.  0c61  74 0b                             je      L152
  2244.  0c63  8a 44 01                          mov     al,[si+1H]
  2245.  0c66  83 c6 02                          add     si,0002H
  2246.  0c69  aa                                stosb   
  2247.  0c6a  3c 00                             cmp     al,00H
  2248.  0c6c  75 ee                             jne     L151
  2249.  0c6e  5f                L152            pop     di
  2250.  0c6f  1f                                pop     ds
  2251.  
  2252.        _fstrcat(valueMsg,"\r\n");
  2253.     }
  2254.  0c70  b8 f2 01                          mov     ax,offset L24
  2255.  0c73  8d 7e b4                          lea     di,[bp-4cH]
  2256.  0c76  8c de                             mov     si,ds
  2257.  0c78  1e                                push    ds
  2258.  0c79  57                                push    di
  2259.  0c7a  96                                xchg    ax,si
  2260.  0c7b  8e d8                             mov     ds,ax
  2261.  0c7d  b9 ff ff                          mov     cx,0ffffH
  2262.  0c80  b0 00                             mov     al,00H
  2263.  0c82  f2 ae                             repne   scasb    
  2264.  0c84  4f                                dec     di
  2265.  0c85  8a 04             L153            mov     al,[si]
  2266.  0c87  aa                                stosb   
  2267.  0c88  3c 00                             cmp     al,00H
  2268.  0c8a  74 0b                             je      L154
  2269.  0c8c  8a 44 01                          mov     al,[si+1H]
  2270.  0c8f  83 c6 02                          add     si,0002H
  2271.  0c92  aa                                stosb   
  2272.  0c93  3c 00                             cmp     al,00H
  2273.  0c95  75 ee                             jne     L153
  2274.  0c97  5f                L154            pop     di
  2275.  0c98  1f                                pop     ds
  2276.  
  2277.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2278.  
  2279.  0c99  6a 01             L155            push    0001H
  2280.  0c9b  8c d0                             mov     ax,ss
  2281.  0c9d  8d 7e b4                          lea     di,[bp-4cH]
  2282.  0ca0  8e c0                             mov     es,ax
  2283.  0ca2  b9 ff ff                          mov     cx,0ffffH
  2284.  0ca5  31 c0                             xor     ax,ax
  2285.  0ca7  f2 ae                             repne   scasb    
  2286.  0ca9  f7 d1                             not     cx
  2287.  0cab  49                                dec     cx
  2288.  0cac  51                                push    cx
  2289.  0cad  16                                push    ss
  2290.  0cae  8d 56 b4                          lea     dx,[bp-4cH]
  2291.  0cb1  52                                push    dx
  2292.  0cb2  bf 00 00                          mov     di,offset _playDMAMsg
  2293.  0cb5  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2294.  0cba  8c d8                             mov     ax,ds
  2295.  
  2296.     DosPutMessage(STDOUT,_fstrlen(playDMAMsg),playDMAMsg);
  2297.  0cbc  6a 01                             push    0001H
  2298.  0cbe  8e c0                             mov     es,ax
  2299.  0cc0  b9 ff ff                          mov     cx,0ffffH
  2300.  0cc3  31 c0                             xor     ax,ax
  2301.  0cc5  f2 ae                             repne   scasb    
  2302.  0cc7  f7 d1                             not     cx
  2303.  0cc9  49                                dec     cx
  2304.  0cca  51                                push    cx
  2305.  0ccb  1e                                push    ds
  2306.  0ccc  68 00 00                          push    offset _playDMAMsg
  2307.  0ccf  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2308.  
  2309.     if (gDMAplay == 99) {
  2310.  0cd4  8b 3e 00 00                       mov     di,_gDMAplay
  2311.  0cd8  83 ff 63                          cmp     di,0063H
  2312.  0cdb  75 2f                             jne     L158
  2313.  
  2314.        _fstrcpy(valueMsg," *not set*\r\n");
  2315.     }
  2316.  0cdd  b8 08 02                          mov     ax,offset L26
  2317.  0ce0  8d 7e b4                          lea     di,[bp-4cH]
  2318.  0ce3  8c d2                             mov     dx,ss
  2319.  0ce5  8c de                             mov     si,ds
  2320.  0ce7  8e c2                             mov     es,dx
  2321.  0ce9  1e                                push    ds
  2322.  0cea  57                                push    di
  2323.  0ceb  96                                xchg    ax,si
  2324.  0cec  8e d8                             mov     ds,ax
  2325.  0cee  8a 04             L156            mov     al,[si]
  2326.  0cf0  26 88 05                          mov     es:[di],al
  2327.  0cf3  3c 00                             cmp     al,00H
  2328.  0cf5  74 11                             je      L157
  2329.  0cf7  8a 44 01                          mov     al,[si+1H]
  2330.  0cfa  83 c6 02                          add     si,0002H
  2331.  0cfd  26 88 45 01                       mov     es:[di+1H],al
  2332.  0d01  83 c7 02                          add     di,0002H
  2333.  0d04  3c 00                             cmp     al,00H
  2334.  0d06  75 e6                             jne     L156
  2335.  0d08  5f                L157            pop     di
  2336.  0d09  1f                                pop     ds
  2337.  
  2338.     else {
  2339.        valueMsg[0] = 0;
  2340.  0d0a  eb 44                             jmp     L161
  2341.  
  2342.  0d0c  6a 00             L158            push    0000H
  2343.  0d0e  6a 0a                             push    000aH
  2344.  0d10  16                                push    ss
  2345.  0d11  8d 5e b4                          lea     bx,[bp-4cH]
  2346.  0d14  53                                push    bx
  2347.  0d15  8c de                             mov     si,ds
  2348.  0d17  6a 00                             push    0000H
  2349.  
  2350.        _ultoa(gDMAplay,valueMsg,10);
  2351.  0d19  30 f6                             xor     dh,dh
  2352.  0d1b  57                                push    di
  2353.  0d1c  88 76 b4                          mov     [bp-4cH],dh
  2354.  0d1f  e8 00 00                          call    _xtoa
  2355.  
  2356.        _fstrcat(valueMsg,"\r\n");
  2357.     }
  2358.  0d22  b8 f2 01                          mov     ax,offset L24
  2359.  0d25  8d 7e b4                          lea     di,[bp-4cH]
  2360.  0d28  8c d2                             mov     dx,ss
  2361.  0d2a  83 c4 0c                          add     sp,000cH
  2362.  0d2d  8e c2                             mov     es,dx
  2363.  0d2f  1e                                push    ds
  2364.  0d30  57                                push    di
  2365.  0d31  96                                xchg    ax,si
  2366.  0d32  8e d8                             mov     ds,ax
  2367.  0d34  b9 ff ff                          mov     cx,0ffffH
  2368.  0d37  b0 00                             mov     al,00H
  2369.  0d39  f2 ae                             repne   scasb    
  2370.  0d3b  4f                                dec     di
  2371.  0d3c  8a 04             L159            mov     al,[si]
  2372.  0d3e  aa                                stosb   
  2373.  0d3f  3c 00                             cmp     al,00H
  2374.  0d41  74 0b                             je      L160
  2375.  0d43  8a 44 01                          mov     al,[si+1H]
  2376.  0d46  83 c6 02                          add     si,0002H
  2377.  0d49  aa                                stosb   
  2378.  0d4a  3c 00                             cmp     al,00H
  2379.  0d4c  75 ee                             jne     L159
  2380.  0d4e  5f                L160            pop     di
  2381.  0d4f  1f                                pop     ds
  2382.  
  2383.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2384.  
  2385.  0d50  6a 01             L161            push    0001H
  2386.  0d52  8c d0                             mov     ax,ss
  2387.  0d54  8d 7e b4                          lea     di,[bp-4cH]
  2388.  0d57  8e c0                             mov     es,ax
  2389.  0d59  b9 ff ff                          mov     cx,0ffffH
  2390.  0d5c  31 c0                             xor     ax,ax
  2391.  0d5e  f2 ae                             repne   scasb    
  2392.  0d60  f7 d1                             not     cx
  2393.  0d62  49                                dec     cx
  2394.  0d63  51                                push    cx
  2395.  0d64  16                                push    ss
  2396.  0d65  8d 56 b4                          lea     dx,[bp-4cH]
  2397.  0d68  52                                push    dx
  2398.  0d69  bf 00 00                          mov     di,offset _playSizeMsg
  2399.  0d6c  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2400.  0d71  8c d8                             mov     ax,ds
  2401.  
  2402.     DosPutMessage(STDOUT,_fstrlen(playSizeMsg),playSizeMsg);
  2403.  0d73  6a 01                             push    0001H
  2404.  0d75  8e c0                             mov     es,ax
  2405.  0d77  b9 ff ff                          mov     cx,0ffffH
  2406.  0d7a  31 c0                             xor     ax,ax
  2407.  0d7c  f2 ae                             repne   scasb    
  2408.  0d7e  f7 d1                             not     cx
  2409.  0d80  49                                dec     cx
  2410.  0d81  51                                push    cx
  2411.  0d82  1e                                push    ds
  2412.  0d83  68 00 00                          push    offset _playSizeMsg
  2413.  0d86  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2414.  0d8b  6a 00                             push    0000H
  2415.  0d8d  8d 56 b4                          lea     dx,[bp-4cH]
  2416.  0d90  6a 10                             push    0010H
  2417.  
  2418.     valueMsg[0] = 0;
  2419.  0d92  30 db                             xor     bl,bl
  2420.  0d94  16                                push    ss
  2421.  0d95  88 5e b4                          mov     [bp-4cH],bl
  2422.  0d98  52                                push    dx
  2423.  
  2424.     _ultoa(gDMAplaySize,valueMsg,16);
  2425.  0d99  8b 1e 00 00                       mov     bx,_gDMAplaySize
  2426.  0d9d  6a 00                             push    0000H
  2427.  0d9f  8c de                             mov     si,ds
  2428.  0da1  53                                push    bx
  2429.  0da2  8d 7e b4                          lea     di,[bp-4cH]
  2430.  0da5  e8 00 00                          call    _xtoa
  2431.  
  2432.     _fstrcat(valueMsg,"\r\n");
  2433.  0da8  b8 f2 01                          mov     ax,offset L24
  2434.  0dab  8c d2                             mov     dx,ss
  2435.  0dad  83 c4 0c                          add     sp,000cH
  2436.  0db0  8e c2                             mov     es,dx
  2437.  0db2  1e                                push    ds
  2438.  0db3  57                                push    di
  2439.  0db4  96                                xchg    ax,si
  2440.  0db5  8e d8                             mov     ds,ax
  2441.  0db7  b9 ff ff                          mov     cx,0ffffH
  2442.  0dba  b0 00                             mov     al,00H
  2443.  0dbc  f2 ae                             repne   scasb    
  2444.  0dbe  4f                                dec     di
  2445.  0dbf  8a 04             L162            mov     al,[si]
  2446.  0dc1  aa                                stosb   
  2447.  0dc2  3c 00                             cmp     al,00H
  2448.  0dc4  74 0b                             je      L163
  2449.  0dc6  8a 44 01                          mov     al,[si+1H]
  2450.  0dc9  83 c6 02                          add     si,0002H
  2451.  0dcc  aa                                stosb   
  2452.  0dcd  3c 00                             cmp     al,00H
  2453.  0dcf  75 ee                             jne     L162
  2454.  0dd1  5f                L163            pop     di
  2455.  0dd2  1f                                pop     ds
  2456.  
  2457.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2458.  
  2459.  0dd3  6a 01                             push    0001H
  2460.  0dd5  8d 7e b4                          lea     di,[bp-4cH]
  2461.  0dd8  b9 ff ff                          mov     cx,0ffffH
  2462.  0ddb  31 c0                             xor     ax,ax
  2463.  0ddd  f2 ae                             repne   scasb    
  2464.  0ddf  f7 d1                             not     cx
  2465.  0de1  49                                dec     cx
  2466.  0de2  51                                push    cx
  2467.  0de3  16                                push    ss
  2468.  0de4  8d 56 b4                          lea     dx,[bp-4cH]
  2469.  0de7  52                                push    dx
  2470.  0de8  bf 00 00                          mov     di,offset _playIPBMsg
  2471.  0deb  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2472.  0df0  8c d8                             mov     ax,ds
  2473.  
  2474.     DosPutMessage(STDOUT,_fstrlen(playIPBMsg),playIPBMsg);
  2475.  0df2  6a 01                             push    0001H
  2476.  0df4  8e c0                             mov     es,ax
  2477.  0df6  b9 ff ff                          mov     cx,0ffffH
  2478.  0df9  31 c0                             xor     ax,ax
  2479.  0dfb  f2 ae                             repne   scasb    
  2480.  0dfd  f7 d1                             not     cx
  2481.  0dff  49                                dec     cx
  2482.  0e00  51                                push    cx
  2483.  0e01  1e                                push    ds
  2484.  0e02  68 00 00                          push    offset _playIPBMsg
  2485.  0e05  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2486.  0e0a  6a 00                             push    0000H
  2487.  0e0c  6a 0a                             push    000aH
  2488.  0e0e  8d 56 b4                          lea     dx,[bp-4cH]
  2489.  0e11  16                                push    ss
  2490.  
  2491.     valueMsg[0] = 0;
  2492.  0e12  30 ff                             xor     bh,bh
  2493.  0e14  52                                push    dx
  2494.  0e15  88 7e b4                          mov     [bp-4cH],bh
  2495.  0e18  6a 00                             push    0000H
  2496.  
  2497.     _ultoa(gDMAplayIPB,valueMsg,10);
  2498.  0e1a  8b 1e 00 00                       mov     bx,_gDMAplayIPB
  2499.  0e1e  53                                push    bx
  2500.  0e1f  e8 00 00                          call    _xtoa
  2501.  0e22  83 c4 0c                          add     sp,000cH
  2502.  
  2503.     _fstrcat(valueMsg,"\r\n");
  2504.  0e25  b8 f2 01                          mov     ax,offset L24
  2505.  0e28  8d 7e b4                          lea     di,[bp-4cH]
  2506.  0e2b  8c d2                             mov     dx,ss
  2507.  0e2d  8c de                             mov     si,ds
  2508.  0e2f  8e c2                             mov     es,dx
  2509.  0e31  1e                                push    ds
  2510.  0e32  57                                push    di
  2511.  0e33  96                                xchg    ax,si
  2512.  0e34  8e d8                             mov     ds,ax
  2513.  0e36  b9 ff ff                          mov     cx,0ffffH
  2514.  0e39  b0 00                             mov     al,00H
  2515.  0e3b  f2 ae                             repne   scasb    
  2516.  0e3d  4f                                dec     di
  2517.  0e3e  8a 04             L164            mov     al,[si]
  2518.  0e40  aa                                stosb   
  2519.  0e41  3c 00                             cmp     al,00H
  2520.  0e43  74 0b                             je      L165
  2521.  0e45  8a 44 01                          mov     al,[si+1H]
  2522.  0e48  83 c6 02                          add     si,0002H
  2523.  0e4b  aa                                stosb   
  2524.  0e4c  3c 00                             cmp     al,00H
  2525.  0e4e  75 ee                             jne     L164
  2526.  0e50  5f                L165            pop     di
  2527.  0e51  1f                                pop     ds
  2528.  
  2529.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2530.  
  2531.  0e52  6a 01                             push    0001H
  2532.  0e54  8d 7e b4                          lea     di,[bp-4cH]
  2533.  0e57  b9 ff ff                          mov     cx,0ffffH
  2534.  0e5a  31 c0                             xor     ax,ax
  2535.  0e5c  f2 ae                             repne   scasb    
  2536.  0e5e  f7 d1                             not     cx
  2537.  0e60  49                                dec     cx
  2538.  0e61  51                                push    cx
  2539.  0e62  16                                push    ss
  2540.  0e63  8d 56 b4                          lea     dx,[bp-4cH]
  2541.  0e66  52                                push    dx
  2542.  0e67  bf 00 00                          mov     di,offset _playModeMsg
  2543.  0e6a  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2544.  0e6f  8c d8                             mov     ax,ds
  2545.  
  2546.     DosPutMessage(STDOUT,_fstrlen(playModeMsg),playModeMsg);
  2547.     valueMsg[0] = 0;
  2548.  0e71  6a 01                             push    0001H
  2549.  0e73  8e c0                             mov     es,ax
  2550.  0e75  b9 ff ff                          mov     cx,0ffffH
  2551.  0e78  31 c0                             xor     ax,ax
  2552.  0e7a  f2 ae                             repne   scasb    
  2553.  0e7c  f7 d1                             not     cx
  2554.  0e7e  49                                dec     cx
  2555.  0e7f  51                                push    cx
  2556.  0e80  1e                                push    ds
  2557.  0e81  68 00 00                          push    offset _playModeMsg
  2558.  0e84  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2559.  0e89  6a 00                             push    0000H
  2560.  0e8b  8c de                             mov     si,ds
  2561.  0e8d  6a 0a                             push    000aH
  2562.  0e8f  8d 56 b4                          lea     dx,[bp-4cH]
  2563.  0e92  16                                push    ss
  2564.  0e93  8d 7e b4                          lea     di,[bp-4cH]
  2565.  0e96  52                                push    dx
  2566.  
  2567.  0e97  8b 1e 00 00                       mov     bx,_gDMAplayMode
  2568.  0e9b  6a 00                             push    0000H
  2569.  
  2570.     _ultoa(gDMAplayMode,valueMsg,10);
  2571.  0e9d  30 c9                             xor     cl,cl
  2572.  0e9f  53                                push    bx
  2573.  0ea0  88 4e b4                          mov     [bp-4cH],cl
  2574.  0ea3  e8 00 00                          call    _xtoa
  2575.  
  2576.     _fstrcat(valueMsg,"\r\n");
  2577.  0ea6  b8 f2 01                          mov     ax,offset L24
  2578.  0ea9  8c d2                             mov     dx,ss
  2579.  0eab  83 c4 0c                          add     sp,000cH
  2580.  0eae  8e c2                             mov     es,dx
  2581.  0eb0  1e                                push    ds
  2582.  0eb1  57                                push    di
  2583.  0eb2  96                                xchg    ax,si
  2584.  0eb3  8e d8                             mov     ds,ax
  2585.  0eb5  b9 ff ff                          mov     cx,0ffffH
  2586.  0eb8  b0 00                             mov     al,00H
  2587.  0eba  f2 ae                             repne   scasb    
  2588.  0ebc  4f                                dec     di
  2589.  0ebd  8a 04             L166            mov     al,[si]
  2590.  0ebf  aa                                stosb   
  2591.  0ec0  3c 00                             cmp     al,00H
  2592.  0ec2  74 0b                             je      L167
  2593.  0ec4  8a 44 01                          mov     al,[si+1H]
  2594.  0ec7  83 c6 02                          add     si,0002H
  2595.  0eca  aa                                stosb   
  2596.  0ecb  3c 00                             cmp     al,00H
  2597.  0ecd  75 ee                             jne     L166
  2598.  0ecf  5f                L167            pop     di
  2599.  0ed0  1f                                pop     ds
  2600.  
  2601.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2602.  
  2603.  0ed1  6a 01                             push    0001H
  2604.  0ed3  8d 7e b4                          lea     di,[bp-4cH]
  2605.  0ed6  b9 ff ff                          mov     cx,0ffffH
  2606.  0ed9  31 c0                             xor     ax,ax
  2607.  0edb  f2 ae                             repne   scasb    
  2608.  0edd  f7 d1                             not     cx
  2609.  0edf  49                                dec     cx
  2610.  0ee0  51                                push    cx
  2611.  0ee1  16                                push    ss
  2612.  0ee2  8d 56 b4                          lea     dx,[bp-4cH]
  2613.  0ee5  52                                push    dx
  2614.  0ee6  bf 00 00                          mov     di,offset _recDMAMsg
  2615.  0ee9  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2616.  0eee  8c d8                             mov     ax,ds
  2617.  
  2618.     DosPutMessage(STDOUT,_fstrlen(recDMAMsg),recDMAMsg);
  2619.  0ef0  6a 01                             push    0001H
  2620.  0ef2  8e c0                             mov     es,ax
  2621.  0ef4  b9 ff ff                          mov     cx,0ffffH
  2622.  0ef7  31 c0                             xor     ax,ax
  2623.  0ef9  f2 ae                             repne   scasb    
  2624.  0efb  f7 d1                             not     cx
  2625.  0efd  49                                dec     cx
  2626.  0efe  51                                push    cx
  2627.  0eff  1e                                push    ds
  2628.  0f00  68 00 00                          push    offset _recDMAMsg
  2629.  0f03  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2630.  
  2631.     if (gDMArec == 99) {
  2632.  0f08  a1 00 00                          mov     ax,_gDMArec
  2633.  0f0b  3d 63 00                          cmp     ax,0063H
  2634.  0f0e  75 2f                             jne     L170
  2635.  
  2636.        _fstrcpy(valueMsg," *not set*\r\n");
  2637.     }
  2638.  0f10  b8 08 02                          mov     ax,offset L26
  2639.  0f13  8d 7e b4                          lea     di,[bp-4cH]
  2640.  0f16  8c d2                             mov     dx,ss
  2641.  0f18  8c de                             mov     si,ds
  2642.  0f1a  8e c2                             mov     es,dx
  2643.  0f1c  1e                                push    ds
  2644.  0f1d  57                                push    di
  2645.  0f1e  96                                xchg    ax,si
  2646.  0f1f  8e d8                             mov     ds,ax
  2647.  0f21  8a 04             L168            mov     al,[si]
  2648.  0f23  26 88 05                          mov     es:[di],al
  2649.  0f26  3c 00                             cmp     al,00H
  2650.  0f28  74 11                             je      L169
  2651.  0f2a  8a 44 01                          mov     al,[si+1H]
  2652.  0f2d  83 c6 02                          add     si,0002H
  2653.  0f30  26 88 45 01                       mov     es:[di+1H],al
  2654.  0f34  83 c7 02                          add     di,0002H
  2655.  0f37  3c 00                             cmp     al,00H
  2656.  0f39  75 e6                             jne     L168
  2657.  0f3b  5f                L169            pop     di
  2658.  0f3c  1f                                pop     ds
  2659.  
  2660.     else {
  2661.        valueMsg[0] = 0;
  2662.  0f3d  eb 44                             jmp     L173
  2663.  
  2664.  0f3f  6a 00             L170            push    0000H
  2665.  0f41  6a 0a                             push    000aH
  2666.  0f43  8d 5e b4                          lea     bx,[bp-4cH]
  2667.  0f46  16                                push    ss
  2668.  0f47  8d 7e b4                          lea     di,[bp-4cH]
  2669.  0f4a  53                                push    bx
  2670.  0f4b  8c de                             mov     si,ds
  2671.  0f4d  6a 00                             push    0000H
  2672.  
  2673.        _ultoa(gDMArec,valueMsg,10);
  2674.  0f4f  30 ed                             xor     ch,ch
  2675.  0f51  50                                push    ax
  2676.  0f52  88 6e b4                          mov     [bp-4cH],ch
  2677.  0f55  e8 00 00                          call    _xtoa
  2678.  
  2679.        _fstrcat(valueMsg,"\r\n");
  2680.     }
  2681.  0f58  b8 f2 01                          mov     ax,offset L24
  2682.  0f5b  8c d2                             mov     dx,ss
  2683.  0f5d  83 c4 0c                          add     sp,000cH
  2684.  0f60  8e c2                             mov     es,dx
  2685.  0f62  1e                                push    ds
  2686.  0f63  57                                push    di
  2687.  0f64  96                                xchg    ax,si
  2688.  0f65  8e d8                             mov     ds,ax
  2689.  0f67  b9 ff ff                          mov     cx,0ffffH
  2690.  0f6a  b0 00                             mov     al,00H
  2691.  0f6c  f2 ae                             repne   scasb    
  2692.  0f6e  4f                                dec     di
  2693.  0f6f  8a 04             L171            mov     al,[si]
  2694.  0f71  aa                                stosb   
  2695.  0f72  3c 00                             cmp     al,00H
  2696.  0f74  74 0b                             je      L172
  2697.  0f76  8a 44 01                          mov     al,[si+1H]
  2698.  0f79  83 c6 02                          add     si,0002H
  2699.  0f7c  aa                                stosb   
  2700.  0f7d  3c 00                             cmp     al,00H
  2701.  0f7f  75 ee                             jne     L171
  2702.  0f81  5f                L172            pop     di
  2703.  0f82  1f                                pop     ds
  2704.  
  2705.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2706.  
  2707.  0f83  6a 01             L173            push    0001H
  2708.  0f85  8c d0                             mov     ax,ss
  2709.  0f87  8d 7e b4                          lea     di,[bp-4cH]
  2710.  0f8a  8e c0                             mov     es,ax
  2711.  0f8c  b9 ff ff                          mov     cx,0ffffH
  2712.  0f8f  31 c0                             xor     ax,ax
  2713.  0f91  f2 ae                             repne   scasb    
  2714.  0f93  f7 d1                             not     cx
  2715.  0f95  49                                dec     cx
  2716.  0f96  51                                push    cx
  2717.  0f97  16                                push    ss
  2718.  0f98  8d 56 b4                          lea     dx,[bp-4cH]
  2719.  0f9b  52                                push    dx
  2720.  0f9c  bf 00 00                          mov     di,offset _recSizeMsg
  2721.  0f9f  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2722.  0fa4  8c d8                             mov     ax,ds
  2723.  
  2724.     DosPutMessage(STDOUT,_fstrlen(recSizeMsg),recSizeMsg);
  2725.     valueMsg[0] = 0;
  2726.  0fa6  6a 01                             push    0001H
  2727.  0fa8  8e c0                             mov     es,ax
  2728.  0faa  b9 ff ff                          mov     cx,0ffffH
  2729.  0fad  31 c0                             xor     ax,ax
  2730.  0faf  f2 ae                             repne   scasb    
  2731.  0fb1  f7 d1                             not     cx
  2732.  0fb3  49                                dec     cx
  2733.  0fb4  51                                push    cx
  2734.  0fb5  1e                                push    ds
  2735.  0fb6  68 00 00                          push    offset _recSizeMsg
  2736.  0fb9  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2737.  0fbe  6a 00                             push    0000H
  2738.  0fc0  8c de                             mov     si,ds
  2739.  0fc2  6a 10                             push    0010H
  2740.  0fc4  8d 56 b4                          lea     dx,[bp-4cH]
  2741.  0fc7  16                                push    ss
  2742.  0fc8  8d 7e b4                          lea     di,[bp-4cH]
  2743.  0fcb  52                                push    dx
  2744.  
  2745.  0fcc  8b 1e 00 00                       mov     bx,_gDMArecSize
  2746.  0fd0  6a 00                             push    0000H
  2747.  
  2748.     _ultoa(gDMArecSize,valueMsg,16);
  2749.  0fd2  30 c0                             xor     al,al
  2750.  0fd4  53                                push    bx
  2751.  0fd5  88 46 b4                          mov     [bp-4cH],al
  2752.  0fd8  e8 00 00                          call    _xtoa
  2753.  
  2754.     _fstrcat(valueMsg,"\r\n");
  2755.  0fdb  b8 f2 01                          mov     ax,offset L24
  2756.  0fde  8c d2                             mov     dx,ss
  2757.  0fe0  83 c4 0c                          add     sp,000cH
  2758.  0fe3  8e c2                             mov     es,dx
  2759.  0fe5  1e                                push    ds
  2760.  0fe6  57                                push    di
  2761.  0fe7  96                                xchg    ax,si
  2762.  0fe8  8e d8                             mov     ds,ax
  2763.  0fea  b9 ff ff                          mov     cx,0ffffH
  2764.  0fed  b0 00                             mov     al,00H
  2765.  0fef  f2 ae                             repne   scasb    
  2766.  0ff1  4f                                dec     di
  2767.  0ff2  8a 04             L174            mov     al,[si]
  2768.  0ff4  aa                                stosb   
  2769.  0ff5  3c 00                             cmp     al,00H
  2770.  0ff7  74 0b                             je      L175
  2771.  0ff9  8a 44 01                          mov     al,[si+1H]
  2772.  0ffc  83 c6 02                          add     si,0002H
  2773.  0fff  aa                                stosb   
  2774.  1000  3c 00                             cmp     al,00H
  2775.  1002  75 ee                             jne     L174
  2776.  1004  5f                L175            pop     di
  2777.  1005  1f                                pop     ds
  2778.  
  2779.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2780.  
  2781.  1006  6a 01                             push    0001H
  2782.  1008  8d 7e b4                          lea     di,[bp-4cH]
  2783.  100b  b9 ff ff                          mov     cx,0ffffH
  2784.  100e  31 c0                             xor     ax,ax
  2785.  1010  f2 ae                             repne   scasb    
  2786.  1012  f7 d1                             not     cx
  2787.  1014  49                                dec     cx
  2788.  1015  51                                push    cx
  2789.  1016  16                                push    ss
  2790.  1017  8d 56 b4                          lea     dx,[bp-4cH]
  2791.  101a  52                                push    dx
  2792.  101b  bf 00 00                          mov     di,offset _recIPBMsg
  2793.  101e  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2794.  1023  8c d8                             mov     ax,ds
  2795.  
  2796.     DosPutMessage(STDOUT,_fstrlen(recIPBMsg),recIPBMsg);
  2797.     valueMsg[0] = 0;
  2798.  1025  6a 01                             push    0001H
  2799.  1027  8e c0                             mov     es,ax
  2800.  1029  b9 ff ff                          mov     cx,0ffffH
  2801.  102c  31 c0                             xor     ax,ax
  2802.  102e  f2 ae                             repne   scasb    
  2803.  1030  f7 d1                             not     cx
  2804.  1032  49                                dec     cx
  2805.  1033  51                                push    cx
  2806.  1034  1e                                push    ds
  2807.  1035  68 00 00                          push    offset _recIPBMsg
  2808.  1038  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2809.  103d  6a 00                             push    0000H
  2810.  103f  6a 0a                             push    000aH
  2811.  1041  16                                push    ss
  2812.  1042  8d 56 b4                          lea     dx,[bp-4cH]
  2813.  1045  52                                push    dx
  2814.  
  2815.  1046  8b 1e 00 00                       mov     bx,_gDMArecIPB
  2816.  104a  6a 00                             push    0000H
  2817.  
  2818.     _ultoa(gDMArecIPB,valueMsg,10);
  2819.  104c  30 e4                             xor     ah,ah
  2820.  104e  53                                push    bx
  2821.  104f  88 66 b4                          mov     [bp-4cH],ah
  2822.  1052  e8 00 00                          call    _xtoa
  2823.  1055  83 c4 0c                          add     sp,000cH
  2824.  
  2825.     _fstrcat(valueMsg,"\r\n");
  2826.  1058  b8 f2 01                          mov     ax,offset L24
  2827.  105b  8d 7e b4                          lea     di,[bp-4cH]
  2828.  105e  8c d2                             mov     dx,ss
  2829.  1060  8c de                             mov     si,ds
  2830.  1062  8e c2                             mov     es,dx
  2831.  1064  1e                                push    ds
  2832.  1065  57                                push    di
  2833.  1066  96                                xchg    ax,si
  2834.  1067  8e d8                             mov     ds,ax
  2835.  1069  b9 ff ff                          mov     cx,0ffffH
  2836.  106c  b0 00                             mov     al,00H
  2837.  106e  f2 ae                             repne   scasb    
  2838.  1070  4f                                dec     di
  2839.  1071  8a 04             L176            mov     al,[si]
  2840.  1073  aa                                stosb   
  2841.  1074  3c 00                             cmp     al,00H
  2842.  1076  74 0b                             je      L177
  2843.  1078  8a 44 01                          mov     al,[si+1H]
  2844.  107b  83 c6 02                          add     si,0002H
  2845.  107e  aa                                stosb   
  2846.  107f  3c 00                             cmp     al,00H
  2847.  1081  75 ee                             jne     L176
  2848.  1083  5f                L177            pop     di
  2849.  1084  1f                                pop     ds
  2850.  
  2851.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2852.  
  2853.  1085  6a 01                             push    0001H
  2854.  1087  8d 7e b4                          lea     di,[bp-4cH]
  2855.  108a  b9 ff ff                          mov     cx,0ffffH
  2856.  108d  31 c0                             xor     ax,ax
  2857.  108f  f2 ae                             repne   scasb    
  2858.  1091  f7 d1                             not     cx
  2859.  1093  49                                dec     cx
  2860.  1094  51                                push    cx
  2861.  1095  16                                push    ss
  2862.  1096  8d 56 b4                          lea     dx,[bp-4cH]
  2863.  1099  52                                push    dx
  2864.  109a  bf 00 00                          mov     di,offset _recModeMsg
  2865.  109d  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2866.  10a2  8c d8                             mov     ax,ds
  2867.  
  2868.     DosPutMessage(STDOUT,_fstrlen(recModeMsg),recModeMsg);
  2869.  10a4  6a 01                             push    0001H
  2870.  10a6  8e c0                             mov     es,ax
  2871.  10a8  b9 ff ff                          mov     cx,0ffffH
  2872.  10ab  31 c0                             xor     ax,ax
  2873.  10ad  f2 ae                             repne   scasb    
  2874.  10af  f7 d1                             not     cx
  2875.  10b1  49                                dec     cx
  2876.  10b2  51                                push    cx
  2877.  10b3  1e                                push    ds
  2878.  10b4  68 00 00                          push    offset _recModeMsg
  2879.  10b7  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2880.  10bc  6a 00                             push    0000H
  2881.  
  2882.     valueMsg[0] = 0;
  2883.  10be  30 d2                             xor     dl,dl
  2884.  10c0  6a 0a                             push    000aH
  2885.  10c2  88 56 b4                          mov     [bp-4cH],dl
  2886.  10c5  16                                push    ss
  2887.  10c6  8d 56 b4                          lea     dx,[bp-4cH]
  2888.  10c9  52                                push    dx
  2889.  
  2890.     _ultoa(gDMArecMode,valueMsg,10);
  2891.  10ca  8b 1e 00 00                       mov     bx,_gDMArecMode
  2892.  10ce  6a 00                             push    0000H
  2893.  10d0  8c de                             mov     si,ds
  2894.  10d2  53                                push    bx
  2895.  10d3  8d 7e b4                          lea     di,[bp-4cH]
  2896.  10d6  e8 00 00                          call    _xtoa
  2897.  
  2898.     _fstrcat(valueMsg,"\r\n");
  2899.  10d9  b8 f2 01                          mov     ax,offset L24
  2900.  10dc  8c d2                             mov     dx,ss
  2901.  10de  83 c4 0c                          add     sp,000cH
  2902.  10e1  8e c2                             mov     es,dx
  2903.  10e3  1e                                push    ds
  2904.  10e4  57                                push    di
  2905.  10e5  96                                xchg    ax,si
  2906.  10e6  8e d8                             mov     ds,ax
  2907.  10e8  b9 ff ff                          mov     cx,0ffffH
  2908.  10eb  b0 00                             mov     al,00H
  2909.  10ed  f2 ae                             repne   scasb    
  2910.  10ef  4f                                dec     di
  2911.  10f0  8a 04             L178            mov     al,[si]
  2912.  10f2  aa                                stosb   
  2913.  10f3  3c 00                             cmp     al,00H
  2914.  10f5  74 0b                             je      L179
  2915.  10f7  8a 44 01                          mov     al,[si+1H]
  2916.  10fa  83 c6 02                          add     si,0002H
  2917.  10fd  aa                                stosb   
  2918.  10fe  3c 00                             cmp     al,00H
  2919.  1100  75 ee                             jne     L178
  2920.  1102  5f                L179            pop     di
  2921.  1103  1f                                pop     ds
  2922.  
  2923.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2924.  
  2925.  1104  6a 01                             push    0001H
  2926.  1106  8d 7e b4                          lea     di,[bp-4cH]
  2927.  1109  b9 ff ff                          mov     cx,0ffffH
  2928.  110c  31 c0                             xor     ax,ax
  2929.  110e  f2 ae                             repne   scasb    
  2930.  1110  f7 d1                             not     cx
  2931.  1112  49                                dec     cx
  2932.  1113  51                                push    cx
  2933.  1114  16                                push    ss
  2934.  1115  8d 56 b4                          lea     dx,[bp-4cH]
  2935.  1118  52                                push    dx
  2936.  1119  bf 00 00                          mov     di,offset _clFlagsMsg
  2937.  111c  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2938.  1121  8c d8                             mov     ax,ds
  2939.  
  2940.     DosPutMessage(STDOUT,_fstrlen(clFlagsMsg),clFlagsMsg);
  2941.  1123  6a 01                             push    0001H
  2942.  1125  8e c0                             mov     es,ax
  2943.  1127  b9 ff ff                          mov     cx,0ffffH
  2944.  112a  31 c0                             xor     ax,ax
  2945.  112c  f2 ae                             repne   scasb    
  2946.  112e  f7 d1                             not     cx
  2947.  1130  49                                dec     cx
  2948.  1131  51                                push    cx
  2949.  1132  1e                                push    ds
  2950.  1133  68 00 00                          push    offset _clFlagsMsg
  2951.  1136  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  2952.  113b  6a 00                             push    0000H
  2953.  
  2954.     valueMsg[0] = 0;
  2955.  113d  30 f6                             xor     dh,dh
  2956.  113f  6a 10                             push    0010H
  2957.  1141  88 76 b4                          mov     [bp-4cH],dh
  2958.  1144  16                                push    ss
  2959.  1145  8d 56 b4                          lea     dx,[bp-4cH]
  2960.  1148  52                                push    dx
  2961.  
  2962.     _ultoa(gCLflags,valueMsg,16);
  2963.  1149  8b 1e 00 00                       mov     bx,_gCLflags
  2964.  114d  6a 00                             push    0000H
  2965.  114f  8c de                             mov     si,ds
  2966.  1151  53                                push    bx
  2967.  1152  8d 7e b4                          lea     di,[bp-4cH]
  2968.  1155  e8 00 00                          call    _xtoa
  2969.  
  2970.     _fstrcat(valueMsg,"\r\n");
  2971.  1158  b8 f2 01                          mov     ax,offset L24
  2972.  115b  8c d2                             mov     dx,ss
  2973.  115d  83 c4 0c                          add     sp,000cH
  2974.  1160  8e c2                             mov     es,dx
  2975.  1162  1e                                push    ds
  2976.  1163  57                                push    di
  2977.  1164  96                                xchg    ax,si
  2978.  1165  8e d8                             mov     ds,ax
  2979.  1167  b9 ff ff                          mov     cx,0ffffH
  2980.  116a  b0 00                             mov     al,00H
  2981.  116c  f2 ae                             repne   scasb    
  2982.  116e  4f                                dec     di
  2983.  116f  8a 04             L180            mov     al,[si]
  2984.  1171  aa                                stosb   
  2985.  1172  3c 00                             cmp     al,00H
  2986.  1174  74 0b                             je      L181
  2987.  1176  8a 44 01                          mov     al,[si+1H]
  2988.  1179  83 c6 02                          add     si,0002H
  2989.  117c  aa                                stosb   
  2990.  117d  3c 00                             cmp     al,00H
  2991.  117f  75 ee                             jne     L180
  2992.  1181  5f                L181            pop     di
  2993.  1182  1f                                pop     ds
  2994.  
  2995.     DosPutMessage(STDOUT,_fstrlen(valueMsg),valueMsg);
  2996.  
  2997.  }
  2998.  
  2999.  1183  6a 01                             push    0001H
  3000.  1185  8d 7e b4                          lea     di,[bp-4cH]
  3001.  1188  b9 ff ff                          mov     cx,0ffffH
  3002.  118b  31 c0                             xor     ax,ax
  3003.  118d  f2 ae                             repne   scasb    
  3004.  118f  f7 d1                             not     cx
  3005.  1191  49                                dec     cx
  3006.  1192  51                                push    cx
  3007.  1193  16                                push    ss
  3008.  1194  8d 56 b4                          lea     dx,[bp-4cH]
  3009.  1197  52                                push    dx
  3010.  1198  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  3011.  
  3012.  if (gIRQ == 99)           rc = 1;
  3013.  119d  83 3e 00 00 63    L182            cmp     word ptr _gIRQ,0063H
  3014.  11a2  75 07                             jne     L183
  3015.  11a4  c7 46 fa 01 00                    mov     word ptr [bp-6H],0001H
  3016.  
  3017.  else if (gBasePort == 99) rc = 2;
  3018.  11a9  eb 44                             jmp     L188
  3019.  11ab  83 3e 00 00 63    L183            cmp     word ptr _gBasePort,0063H
  3020.  11b0  75 07                             jne     L184
  3021.  11b2  c7 46 fa 02 00                    mov     word ptr [bp-6H],0002H
  3022.  
  3023.  else if (gCtrlPort == 99) rc = 3;
  3024.  11b7  eb 36                             jmp     L188
  3025.  11b9  83 3e 00 00 63    L184            cmp     word ptr _gCtrlPort,0063H
  3026.  11be  75 07                             jne     L185
  3027.  11c0  c7 46 fa 03 00                    mov     word ptr [bp-6H],0003H
  3028.  
  3029.  else if (gDevice == 99)   rc = 5;
  3030.  11c5  eb 28                             jmp     L188
  3031.  11c7  83 3e 00 00 63    L185            cmp     word ptr _gDevice,0063H
  3032.  11cc  75 07                             jne     L186
  3033.  11ce  c7 46 fa 05 00                    mov     word ptr [bp-6H],0005H
  3034.  
  3035.  else if (gDMAplay == 99)  rc = 6;
  3036.  11d3  eb 1a                             jmp     L188
  3037.  11d5  83 3e 00 00 63    L186            cmp     word ptr _gDMAplay,0063H
  3038.  11da  75 07                             jne     L187
  3039.  11dc  c7 46 fa 06 00                    mov     word ptr [bp-6H],0006H
  3040.  
  3041.  else if (gDMArec == 99)   rc = 10;
  3042.  // rest are optional
  3043.  
  3044.  11e1  eb 0c                             jmp     L188
  3045.  11e3  83 3e 00 00 63    L187            cmp     word ptr _gDMArec,0063H
  3046.  11e8  75 05                             jne     L188
  3047.  11ea  c7 46 fa 0a 00                    mov     word ptr [bp-6H],000aH
  3048.  
  3049.  if (rc) {
  3050.  11ef  8b 56 fa          L188            mov     dx,[bp-6H]
  3051.  11f2  85 d2                             test    dx,dx
  3052.  11f4  74 4b                             je      L190
  3053.  
  3054.     USHORT trc = rc;
  3055.  11f6  89 d6                             mov     si,dx
  3056.  
  3057.     if (trc > 14) trc = 15;
  3058.  11f8  83 fa 0e                          cmp     dx,000eH
  3059.  11fb  76 03                             jbe     L189
  3060.  11fd  be 0f 00                          mov     si,000fH
  3061.  
  3062.     DosPutMessage(STDOUT,_fstrlen(errorPrepMsg),errorPrepMsg);
  3063.  1200  6a 01             L189            push    0001H
  3064.  1202  8c d8                             mov     ax,ds
  3065.  1204  bf 00 00                          mov     di,offset _errorPrepMsg
  3066.  1207  8e c0                             mov     es,ax
  3067.  1209  b9 ff ff                          mov     cx,0ffffH
  3068.  120c  31 c0                             xor     ax,ax
  3069.  120e  f2 ae                             repne   scasb    
  3070.  1210  f7 d1                             not     cx
  3071.  1212  49                                dec     cx
  3072.  1213  51                                push    cx
  3073.  1214  1e                                push    ds
  3074.  1215  68 00 00                          push    offset _errorPrepMsg
  3075.  1218  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  3076.  121d  89 f3                             mov     bx,si
  3077.  
  3078.     DosPutMessage(STDOUT,_fstrlen(errorMsg[trc]),errorMsg[trc]);
  3079.  }
  3080.  
  3081.  return rc;
  3082.  
  3083.  121f  6a 01                             push    0001H
  3084.  1221  01 f3                             add     bx,si
  3085.  1223  8c d8                             mov     ax,ds
  3086.  1225  8b bf 00 00                       mov     di,[bx+_errorMsg]
  3087.  1229  8e c0                             mov     es,ax
  3088.  122b  b9 ff ff                          mov     cx,0ffffH
  3089.  122e  31 c0                             xor     ax,ax
  3090.  1230  f2 ae                             repne   scasb    
  3091.  1232  f7 d1                             not     cx
  3092.  1234  49                                dec     cx
  3093.  1235  51                                push    cx
  3094.  1236  1e                                push    ds
  3095.  1237  8b 97 00 00                       mov     dx,[bx+_errorMsg]
  3096.  123b  52                                push    dx
  3097.  123c  9a 00 00 00 00                    call    far DOS16PUTMESSAGE
  3098.  
  3099. }
  3100.  
  3101. //*******************************************************************************
  3102. //*strtol, strtoul(nptr,endptr,ibase) - Convert ascii string to long un/signed int
  3103. //
  3104. //*       Convert an ascii string to a long 32-bit value.  The base
  3105. //*       used for the caculations is supplied by the caller.  The base
  3106. //*       must be in the range 0, 2-36.  If a base of 0 is supplied, the
  3107. //*       ascii string must be examined to determine the base of the
  3108. //*       number:
  3109. //*               (a) First char = '0', second char = 'x' or 'X', use base 16
  3110. //*               (b) First char = '0', use base 8
  3111. //*               (c) First char in range '1' - '9', use base 10
  3112. //*
  3113. //*       If the 'endptr' value is non-NULL, then strtol/strtoul places
  3114. //*       a pointer to the terminating character in this value
  3115. //*
  3116. //*Entry:
  3117. //*       nptr == NEAR/FAR pointer to the start of string.
  3118. //*       endptr == NEAR/FAR pointer to the end of the string.
  3119. //*       ibase == integer base to use for the calculations.
  3120. //*
  3121. //*       string format: [whitespace] [sign] [0] [x] [digits/letters]
  3122. //*
  3123. //*Exit:
  3124. //*       Good return:
  3125. //*               result
  3126. //*
  3127. //*       Overflow return:
  3128. //*               strtol -- LONG_MAX or LONG_MIN
  3129. //*               strtoul -- ULONG_MAX
  3130. //*               strtol/strtoul -- errno == ERANGE
  3131. //*
  3132. //*       No digits or bad base return:
  3133. //*               0
  3134. //*               endptr = nptr*
  3135. //*******************************************************************************
  3136.  
  3137. /* flag values */
  3138. #define FL_UNSIGNED   1       /* strtoul called */
  3139. #define FL_NEG        2       /* negative sign found */
  3140. #define FL_OVERFLOW   4       /* overflow occured */
  3141. #define FL_READDIGIT  8       /* we've read at least one correct digit */
  3142.  
  3143. #define ULONG_MAX 0xFFFFFFFF
  3144. #define LONG_MAX  0x7FFFFFFF
  3145. #define LONG_MIN  0x80000000
  3146.  
  3147.  1241  8b 46 fa          L190            mov     ax,[bp-6H]
  3148.  1244  89 ec                             mov     sp,bp
  3149.  1246  5d                                pop     bp
  3150.  1247  5f                                pop     di
  3151.  1248  5e                                pop     si
  3152.  1249  59                                pop     cx
  3153.  124a  5b                                pop     bx
  3154.  124b  c3                                ret     
  3155.  
  3156. static unsigned long __cdecl strtoxl (const char __far *nptr,const char __far * __far *endptr,int ibase,int flags) {
  3157.  
  3158.  const char __far *p;
  3159.  char c;
  3160.  unsigned long number;
  3161.  unsigned digval;
  3162.  unsigned long maxval;
  3163.  
  3164.  p = nptr;                       /* p is our scanning pointer */
  3165.  number = 0;                     /* start with zero */
  3166.  
  3167.  124c  56                _strtoxl        push    si
  3168.  124d  57                                push    di
  3169.  124e  55                                push    bp
  3170.  124f  89 e5                             mov     bp,sp
  3171.  1251  83 ec 0c                          sub     sp,000cH
  3172.  
  3173.  c = *p++;                       /* read char */
  3174.  1254  c4 5e 08                          les     bx,dword ptr [bp+8H]
  3175.  1257  31 d2                             xor     dx,dx
  3176.  1259  31 ff                             xor     di,di
  3177.  125b  89 56 fa                          mov     [bp-6H],dx
  3178.  125e  8c 46 f6                          mov     [bp-0aH],es
  3179.  1261  8d 77 01                          lea     si,[bx+1H]
  3180.  1264  26 8a 07                          mov     al,es:[bx]
  3181.  1267  8e 46 f6                          mov     es,[bp-0aH]
  3182.  126a  88 46 fe          L191            mov     [bp-2H],al
  3183.  
  3184.  while ((unsigned char)c == ' ')
  3185.          c = *p++;               /* skip whitespace */
  3186.  
  3187.  126d  8a 46 fe                          mov     al,[bp-2H]
  3188.  1270  30 e4                             xor     ah,ah
  3189.  1272  3d 20 00                          cmp     ax,0020H
  3190.  1275  75 06                             jne     L192
  3191.  1277  26 8a 04                          mov     al,es:[si]
  3192.  127a  46                                inc     si
  3193.  127b  eb ed                             jmp     L191
  3194.  
  3195.  if (c == '-') {
  3196.  127d  98                L192            cbw     
  3197.  127e  8d 54 01                          lea     dx,[si+1H]
  3198.  1281  3d 2d 00                          cmp     ax,002dH
  3199.  1284  75 0e                             jne     L193
  3200.  
  3201.          flags |= FL_NEG;        /* remember minus sign */
  3202.  1286  8a 66 12                          mov     ah,[bp+12H]
  3203.  1289  80 cc 02                          or      ah,02H
  3204.  
  3205.          c = *p++;
  3206.  }
  3207.  128c  8e 46 f6                          mov     es,[bp-0aH]
  3208.  128f  88 66 12                          mov     [bp+12H],ah
  3209.  
  3210.  else if (c == '+')
  3211.  1292  eb 08                             jmp     L194
  3212.  1294  3d 2b 00          L193            cmp     ax,002bH
  3213.  1297  75 0b                             jne     L195
  3214.  
  3215.          c = *p++;               /* skip sign */
  3216.  
  3217.  1299  8e 46 f6                          mov     es,[bp-0aH]
  3218.  129c  26 8a 04          L194            mov     al,es:[si]
  3219.  129f  88 46 fe                          mov     [bp-2H],al
  3220.  12a2  89 d6                             mov     si,dx
  3221.  
  3222.  if (ibase < 0 || ibase == 1 || ibase > 36) {
  3223.          /* bad base! */
  3224.  12a4  8b 5e 10          L195            mov     bx,[bp+10H]
  3225.  12a7  85 db                             test    bx,bx
  3226.  12a9  7c 0a                             jl      L196
  3227.  12ab  83 fb 01                          cmp     bx,0001H
  3228.  12ae  74 05                             je      L196
  3229.  12b0  83 fb 24                          cmp     bx,0024H
  3230.  12b3  7e 27                             jle     L199
  3231.  
  3232.          if (endptr)
  3233.                  /* store beginning of string in endptr */
  3234.  12b5  8b 5e 0e          L196            mov     bx,[bp+0eH]
  3235.  12b8  8b 4e 0c                          mov     cx,[bp+0cH]
  3236.  12bb  85 db                             test    bx,bx
  3237.  12bd  75 04                             jne     L197
  3238.  12bf  85 c9                             test    cx,cx
  3239.  12c1  74 12                             je      L198
  3240.  12c3  8b 76 08          L197            mov     si,[bp+8H]
  3241.  
  3242.                  *endptr = nptr;
  3243.  12c6  8e c3                             mov     es,bx
  3244.  12c8  8b 5e 0c                          mov     bx,[bp+0cH]
  3245.  12cb  8b 46 0a                          mov     ax,[bp+0aH]
  3246.  12ce  26 89 37                          mov     es:[bx],si
  3247.  12d1  26 89 47 02                       mov     es:[bx+2H],ax
  3248.  
  3249.          return 0L;              /* return 0 */
  3250.  }
  3251.  12d5  31 c0             L198            xor     ax,ax
  3252.  12d7  31 ff                             xor     di,di
  3253.  12d9  e9 db 01                          jmp     L227
  3254.  
  3255.  else if (ibase == 0) {
  3256.          /* determine base free-lance, based on first two chars of
  3257.             string */
  3258.  12dc  85 db             L199            test    bx,bx
  3259.  12de  75 2d                             jne     L203
  3260.  
  3261.          if (c != '0')
  3262.  12e0  8a 46 fe                          mov     al,[bp-2H]
  3263.  12e3  98                                cbw     
  3264.  12e4  3d 30 00                          cmp     ax,0030H
  3265.  12e7  74 07                             je      L200
  3266.  
  3267.                  ibase = 10;
  3268.  12e9  c7 46 10 0a 00                    mov     word ptr [bp+10H],000aH
  3269.  
  3270.          else if (*p == 'x' || *p == 'X')
  3271.  12ee  eb 1d                             jmp     L203
  3272.  12f0  8e 46 f6          L200            mov     es,[bp-0aH]
  3273.  12f3  26 8a 04                          mov     al,es:[si]
  3274.  12f6  98                                cbw     
  3275.  12f7  3d 78 00                          cmp     ax,0078H
  3276.  12fa  74 05                             je      L201
  3277.  12fc  3d 58 00                          cmp     ax,0058H
  3278.  12ff  75 07                             jne     L202
  3279.  
  3280.                  ibase = 16;
  3281.  1301  c7 46 10 10 00    L201            mov     word ptr [bp+10H],0010H
  3282.  
  3283.          else
  3284.  1306  eb 05                             jmp     L203
  3285.  
  3286.                  ibase = 8;
  3287.  }
  3288.  
  3289.  1308  c7 46 10 08 00    L202            mov     word ptr [bp+10H],0008H
  3290.  
  3291.  if (ibase == 16) {
  3292.          /* we might have 0x in front of number; remove if there */
  3293.  130d  83 7e 10 10       L203            cmp     word ptr [bp+10H],0010H
  3294.  1311  75 25                             jne     L205
  3295.  
  3296.          if (c == '0' && (*p == 'x' || *p == 'X')) {
  3297.                  ++p;
  3298.  1313  8a 46 fe                          mov     al,[bp-2H]
  3299.  1316  98                                cbw     
  3300.  1317  3d 30 00                          cmp     ax,0030H
  3301.  131a  75 1c                             jne     L205
  3302.  131c  8e 46 f6                          mov     es,[bp-0aH]
  3303.  131f  26 8a 04                          mov     al,es:[si]
  3304.  1322  98                                cbw     
  3305.  1323  3d 78 00                          cmp     ax,0078H
  3306.  1326  74 05                             je      L204
  3307.  1328  3d 58 00                          cmp     ax,0058H
  3308.  132b  75 0b                             jne     L205
  3309.  
  3310.  132d  8e 46 f6          L204            mov     es,[bp-0aH]
  3311.  
  3312.                  c = *p++;       /* advance past prefix */
  3313.          }
  3314.  }
  3315.  
  3316.  /* if our number exceeds this, we will overflow on multiply */
  3317.  1330  46                                inc     si
  3318.  1331  26 8a 04                          mov     al,es:[si]
  3319.  1334  46                                inc     si
  3320.  1335  88 46 fe                          mov     [bp-2H],al
  3321.  
  3322.  maxval = ULONG_MAX / ibase;
  3323.  
  3324.  
  3325.  1338  8b 46 10          L205            mov     ax,[bp+10H]
  3326.  133b  99                                cwd     
  3327.  133c  89 c3                             mov     bx,ax
  3328.  133e  b8 ff ff                          mov     ax,0ffffH
  3329.  1341  89 d1                             mov     cx,dx
  3330.  1343  89 c2                             mov     dx,ax
  3331.  1345  e8 00 00                          call    __U4D
  3332.  1348  8e 46 f6                          mov     es,[bp-0aH]
  3333.  134b  89 46 f4                          mov     [bp-0cH],ax
  3334.  134e  89 56 f8                          mov     [bp-8H],dx
  3335.  
  3336.  for (;;) {      /* exit in middle of loop */
  3337.          /* convert c to value */
  3338.          //if ( isdigit((int)(unsigned char)c) )
  3339.          //        digval = c - '0';
  3340.          //else if ( isalpha((int)(unsigned char)c) )
  3341.          //        digval = toupper(c) - 'A' + 10;
  3342.          //else
  3343.          //        break;
  3344.  
  3345.          if (c >= '0' && c <= '9') {
  3346.  1351  8a 46 fe          L206            mov     al,[bp-2H]
  3347.  1354  98                                cbw     
  3348.  1355  3d 30 00                          cmp     ax,0030H
  3349.  1358  7c 0a                             jl      L207
  3350.  135a  3d 39 00                          cmp     ax,0039H
  3351.  135d  7f 05                             jg      L207
  3352.  
  3353.             digval = c - '0';
  3354.          }
  3355.  135f  2d 30 00                          sub     ax,0030H
  3356.  
  3357.          else if (c >= 'a' && c <= 'z') {
  3358.  1362  eb 28                             jmp     L209
  3359.  1364  8a 46 fe          L207            mov     al,[bp-2H]
  3360.  1367  98                                cbw     
  3361.  1368  3d 61 00                          cmp     ax,0061H
  3362.  136b  7c 0a                             jl      L208
  3363.  136d  3d 7a 00                          cmp     ax,007aH
  3364.  1370  7f 05                             jg      L208
  3365.  
  3366.             digval = c - 'a' + 10;
  3367.          }
  3368.  1372  2d 57 00                          sub     ax,0057H
  3369.  
  3370.          else if (c >= 'A' && c <= 'Z') {
  3371.             digval = c - 'A' + 10;
  3372.          }
  3373.          else {
  3374.             break;
  3375.  1375  eb 15                             jmp     L209
  3376.  1377  8a 46 fe          L208            mov     al,[bp-2H]
  3377.  137a  98                                cbw     
  3378.  137b  3d 41 00                          cmp     ax,0041H
  3379.  137e  0f 8c 88 00                       jl      L214
  3380.  1382  3d 5a 00                          cmp     ax,005aH
  3381.  1385  0f 8f 81 00                       jg      L214
  3382.  
  3383.          }
  3384.  
  3385.  1389  2d 37 00                          sub     ax,0037H
  3386.  138c  89 46 fc          L209            mov     [bp-4H],ax
  3387.  
  3388.          if (digval >= (unsigned)ibase) break;          /* exit loop if bad digit found */
  3389.  
  3390.          /* record the fact we have read one digit */
  3391.  138f  8b 46 fc                          mov     ax,[bp-4H]
  3392.  1392  3b 46 10                          cmp     ax,[bp+10H]
  3393.  1395  0f 83 71 00                       jae     L214
  3394.  
  3395.          flags |= FL_READDIGIT;
  3396.  
  3397.          /* we now need to compute number = number * base + digval,
  3398.             but we need to know if overflow occured.  This requires
  3399.             a tricky pre-check. */
  3400.  
  3401.  1399  8a 56 12                          mov     dl,[bp+12H]
  3402.  
  3403.          if (number < maxval || (number == maxval &&
  3404.          (unsigned long)digval <= ULONG_MAX % ibase)) {
  3405.                  /* we won't overflow, go ahead and multiply */
  3406.  139c  8b 5e f8                          mov     bx,[bp-8H]
  3407.  139f  8b 46 fa                          mov     ax,[bp-6H]
  3408.  13a2  80 ca 08                          or      dl,08H
  3409.  13a5  8b 4e f4                          mov     cx,[bp-0cH]
  3410.  13a8  88 56 12                          mov     [bp+12H],dl
  3411.  13ab  39 df                             cmp     di,bx
  3412.  13ad  72 2f                             jb      L211
  3413.  13af  75 04                             jne     L210
  3414.  13b1  39 c8                             cmp     ax,cx
  3415.  13b3  72 29                             jb      L211
  3416.  13b5  8b 46 fa          L210            mov     ax,[bp-6H]
  3417.  13b8  8b 56 f4                          mov     dx,[bp-0cH]
  3418.  13bb  39 df                             cmp     di,bx
  3419.  13bd  75 3d                             jne     L212
  3420.  13bf  39 d0                             cmp     ax,dx
  3421.  13c1  75 39                             jne     L212
  3422.  13c3  8b 46 10                          mov     ax,[bp+10H]
  3423.  13c6  99                                cwd     
  3424.  13c7  89 c3                             mov     bx,ax
  3425.  13c9  b8 ff ff                          mov     ax,0ffffH
  3426.  13cc  89 d1                             mov     cx,dx
  3427.  13ce  89 c2                             mov     dx,ax
  3428.  13d0  e8 00 00                          call    __U4D
  3429.  13d3  85 c9                             test    cx,cx
  3430.  13d5  77 07                             ja      L211
  3431.  13d7  75 23                             jne     L212
  3432.  13d9  3b 5e fc                          cmp     bx,[bp-4H]
  3433.  13dc  72 1e                             jb      L212
  3434.  
  3435.                  number = number * ibase + digval;
  3436.          }
  3437.  13de  8b 46 10          L211            mov     ax,[bp+10H]
  3438.  13e1  99                                cwd     
  3439.  13e2  89 c3                             mov     bx,ax
  3440.  13e4  89 d1                             mov     cx,dx
  3441.  13e6  8b 46 fa                          mov     ax,[bp-6H]
  3442.  13e9  89 fa                             mov     dx,di
  3443.  13eb  e8 00 00                          call    __U4M
  3444.  13ee  8b 5e fc                          mov     bx,[bp-4H]
  3445.  13f1  31 ff                             xor     di,di
  3446.  13f3  01 c3                             add     bx,ax
  3447.  13f5  89 5e fa                          mov     [bp-6H],bx
  3448.  13f8  11 d7                             adc     di,dx
  3449.  
  3450.          else {
  3451.                  /* we would have overflowed -- set the overflow flag */
  3452.  13fa  eb 04                             jmp     L213
  3453.  
  3454.                  flags |= FL_OVERFLOW;
  3455.  13fc  80 4e 12 04       L212            or      byte ptr [bp+12H],04H
  3456.  
  3457.          }
  3458.  
  3459.          c = *p++;               /* read next digit */
  3460.  1400  26 8a 04          L213            mov     al,es:[si]
  3461.  1403  46                                inc     si
  3462.  1404  88 46 fe                          mov     [bp-2H],al
  3463.  
  3464.  }
  3465.  
  3466.  --p;                            /* point to place that stopped scan */
  3467.  
  3468.  1407  e9 47 ff                          jmp     L206
  3469.  
  3470.  if (!(flags & FL_READDIGIT)) {
  3471.          /* no number there; return 0 and point to beginning of string */
  3472.  140a  8a 5e 12          L214            mov     bl,[bp+12H]
  3473.  140d  4e                                dec     si
  3474.  140e  f6 c3 08                          test    bl,08H
  3475.  1411  75 1d                             jne     L217
  3476.  
  3477.          if (endptr)
  3478.                  /* store beginning of string in endptr later on */
  3479.  1413  8b 7e 0e                          mov     di,[bp+0eH]
  3480.  1416  8b 46 0c                          mov     ax,[bp+0cH]
  3481.  1419  85 ff                             test    di,di
  3482.  141b  75 04                             jne     L215
  3483.  141d  85 c0                             test    ax,ax
  3484.  141f  74 09                             je      L216
  3485.  1421  8b 46 0a          L215            mov     ax,[bp+0aH]
  3486.  
  3487.                  p = nptr;
  3488.  1424  8b 76 08                          mov     si,[bp+8H]
  3489.  1427  89 46 f6                          mov     [bp-0aH],ax
  3490.  
  3491.          number = 0L;            /* return 0 */
  3492.  }
  3493.  142a  31 d2             L216            xor     dx,dx
  3494.  142c  31 ff                             xor     di,di
  3495.  
  3496.  else if ( (flags & FL_OVERFLOW) ||
  3497.            ( !(flags & FL_UNSIGNED) &&
  3498.              ( ( (flags & FL_NEG) && (number > -LONG_MIN) ) ||
  3499.                ( !(flags & FL_NEG) && (number > LONG_MAX) ) ) ) )
  3500.  {
  3501.          /* overflow or signed overflow occurred */
  3502.          //chh removederrno = ERANGE;
  3503.  142e  eb 51                             jmp     L222
  3504.  1430  f6 c3 04          L217            test    bl,04H
  3505.  1433  75 25                             jne     L219
  3506.  1435  f6 c3 01                          test    bl,01H
  3507.  1438  75 4a                             jne     L223
  3508.  143a  f6 c3 02                          test    bl,02H
  3509.  143d  74 0f                             je      L218
  3510.  143f  8b 46 fa                          mov     ax,[bp-6H]
  3511.  1442  81 ff 00 80                       cmp     di,8000H
  3512.  1446  77 12                             ja      L219
  3513.  1448  75 04                             jne     L218
  3514.  144a  85 c0                             test    ax,ax
  3515.  144c  77 0c                             ja      L219
  3516.  144e  f6 46 12 02       L218            test    byte ptr [bp+12H],02H
  3517.  1452  75 30                             jne     L223
  3518.  1454  81 ff ff 7f                       cmp     di,7fffH
  3519.  1458  76 2a                             jbe     L223
  3520.  
  3521.          if ( flags & FL_UNSIGNED )
  3522.  145a  8a 66 12          L219            mov     ah,[bp+12H]
  3523.  145d  f6 c4 01                          test    ah,01H
  3524.  1460  74 0a                             je      L220
  3525.  
  3526.                  number = ULONG_MAX;
  3527.  1462  b9 ff ff                          mov     cx,0ffffH
  3528.  1465  89 4e fa                          mov     [bp-6H],cx
  3529.  1468  89 cf                             mov     di,cx
  3530.  
  3531.          else if ( flags & FL_NEG )
  3532.  146a  eb 18                             jmp     L223
  3533.  146c  f6 c4 02          L220            test    ah,02H
  3534.  146f  74 0a                             je      L221
  3535.  
  3536.                  number = (unsigned long)(-LONG_MIN);
  3537.  1471  31 db                             xor     bx,bx
  3538.  1473  bf 00 80                          mov     di,8000H
  3539.  1476  89 5e fa                          mov     [bp-6H],bx
  3540.  
  3541.          else
  3542.  1479  eb 09                             jmp     L223
  3543.  
  3544.                  number = LONG_MAX;
  3545.  }
  3546.  
  3547.  147b  ba ff ff          L221            mov     dx,0ffffH
  3548.  147e  bf ff 7f                          mov     di,7fffH
  3549.  1481  89 56 fa          L222            mov     [bp-6H],dx
  3550.  
  3551.  if (endptr != NULL) *endptr = p;
  3552.  1484  8b 5e 0e          L223            mov     bx,[bp+0eH]
  3553.  1487  8b 4e 0c                          mov     cx,[bp+0cH]
  3554.  148a  85 db                             test    bx,bx
  3555.  148c  75 04                             jne     L224
  3556.  148e  85 c9                             test    cx,cx
  3557.  1490  74 0f                             je      L225
  3558.  1492  8e c3             L224            mov     es,bx
  3559.  1494  8b 5e 0c                          mov     bx,[bp+0cH]
  3560.  1497  8b 46 f6                          mov     ax,[bp-0aH]
  3561.  149a  26 89 37                          mov     es:[bx],si
  3562.  149d  26 89 47 02                       mov     es:[bx+2H],ax
  3563.  
  3564.  if (flags & FL_NEG) number = (unsigned long)(-(long)number);
  3565.  
  3566.  14a1  f6 46 12 02       L225            test    byte ptr [bp+12H],02H
  3567.  14a5  74 0d                             je      L226
  3568.  14a7  8b 76 fa                          mov     si,[bp-6H]
  3569.  14aa  f7 df                             neg     di
  3570.  14ac  f7 de                             neg     si
  3571.  14ae  89 76 fa                          mov     [bp-6H],si
  3572.  14b1  83 df 00                          sbb     di,0000H
  3573.  
  3574.  return number;     
  3575.  14b4  8b 46 fa          L226            mov     ax,[bp-6H]
  3576.  
  3577. }
  3578.  
  3579.  14b7  89 fa             L227            mov     dx,di
  3580.  14b9  89 ec                             mov     sp,bp
  3581.  14bb  5d                                pop     bp
  3582.  14bc  5f                                pop     di
  3583.  14bd  5e                                pop     si
  3584.  14be  c3                                ret     
  3585.  14bf  fc                                cld     
  3586.  
  3587. long __cdecl strtol (const char __far *nptr,char __far * __far *endptr,int ibase) {
  3588.  14c0  56                _strtol         push    si
  3589.  14c1  57                                push    di
  3590.  14c2  55                                push    bp
  3591.  14c3  89 e5                             mov     bp,sp
  3592.  
  3593.  return (long) strtoxl(nptr, endptr, ibase, 0);
  3594.  14c5  6a 00                             push    0000H
  3595.  14c7  8b 56 10                          mov     dx,[bp+10H]
  3596.  14ca  52                                push    dx
  3597.  14cb  8b 5e 0e                          mov     bx,[bp+0eH]
  3598.  14ce  53                                push    bx
  3599.  14cf  8b 4e 0c                          mov     cx,[bp+0cH]
  3600.  14d2  51                                push    cx
  3601.  14d3  8b 76 0a                          mov     si,[bp+0aH]
  3602.  14d6  56                                push    si
  3603.  14d7  8b 7e 08                          mov     di,[bp+8H]
  3604.  14da  57                                push    di
  3605.  14db  e8 00 00                          call    _strtoxl
  3606.  14de  83 c4 0c                          add     sp,000cH
  3607.  
  3608. }
  3609.  
  3610.  14e1  5d                                pop     bp
  3611.  14e2  5f                                pop     di
  3612.  14e3  5e                                pop     si
  3613.  14e4  c3                                ret     
  3614.  14e5  89 c0                             mov     ax,ax
  3615.  14e7  fc                                cld     
  3616.  
  3617. unsigned long __cdecl strtoul (const char __far *nptr,char __far * __far *endptr,int ibase) {
  3618.  14e8  56                _strtoul        push    si
  3619.  14e9  57                                push    di
  3620.  14ea  55                                push    bp
  3621.  14eb  89 e5                             mov     bp,sp
  3622.  
  3623.  return strtoxl(nptr, endptr, ibase, FL_UNSIGNED);
  3624.  14ed  6a 01                             push    0001H
  3625.  14ef  8b 56 10                          mov     dx,[bp+10H]
  3626.  14f2  52                                push    dx
  3627.  14f3  8b 5e 0e                          mov     bx,[bp+0eH]
  3628.  14f6  53                                push    bx
  3629.  14f7  8b 4e 0c                          mov     cx,[bp+0cH]
  3630.  14fa  51                                push    cx
  3631.  14fb  8b 76 0a                          mov     si,[bp+0aH]
  3632.  14fe  56                                push    si
  3633.  14ff  8b 7e 08                          mov     di,[bp+8H]
  3634.  1502  57                                push    di
  3635.  1503  e8 00 00                          call    _strtoxl
  3636.  1506  83 c4 0c                          add     sp,000cH
  3637.  
  3638. }
  3639.  
  3640.  
  3641. //*******************************************************************************
  3642. //*char *_itoa, *_ltoa, *_ultoa(val, buf, radix) - convert int to ASCII string
  3643. //*Entry:
  3644. //*       val - number to be converted (int, long or unsigned long)
  3645. //*       int radix - base to convert into
  3646. //*       char *buf - ptr to buffer to place result
  3647. //*Exit:
  3648. //*       fills in space pointed to by buf with string result
  3649. //*       returns a pointer to this buffer
  3650. //*******************************************************************************
  3651.  
  3652. /* helper routine that does the main job. */
  3653.  
  3654.  1509  5d                                pop     bp
  3655.  150a  5f                                pop     di
  3656.  150b  5e                                pop     si
  3657.  150c  c3                                ret     
  3658.  150d  89 c0                             mov     ax,ax
  3659.  150f  fc                                cld     
  3660.  
  3661. static void __cdecl xtoa (unsigned long val,char __far *buf,unsigned radix,int is_neg) {
  3662.  
  3663.  char __far *p;                /* pointer to traverse string */
  3664.  char __far *firstdig;         /* pointer to first digit */
  3665.  char temp;              /* temp char */
  3666.  unsigned digval;        /* value of digit */
  3667.  
  3668.  p = buf;
  3669.  
  3670.  1510  56                _xtoa           push    si
  3671.  1511  57                                push    di
  3672.  1512  55                                push    bp
  3673.  1513  89 e5                             mov     bp,sp
  3674.  1515  83 ec 0a                          sub     sp,000aH
  3675.  1518  8b 7e 0a                          mov     di,[bp+0aH]
  3676.  151b  c4 5e 0c                          les     bx,dword ptr [bp+0cH]
  3677.  
  3678.  if (is_neg) {
  3679.      /* negative, so output '-' and negate */
  3680.      *p++ = '-';
  3681.  151e  8b 56 12                          mov     dx,[bp+12H]
  3682.  1521  89 de                             mov     si,bx
  3683.  1523  8c 46 fe                          mov     [bp-2H],es
  3684.  1526  85 d2                             test    dx,dx
  3685.  1528  74 14                             je      L228
  3686.  152a  8b 4e 08                          mov     cx,[bp+8H]
  3687.  
  3688.  152d  f7 df                             neg     di
  3689.  152f  8d 77 01                          lea     si,[bx+1H]
  3690.  
  3691.      val = (unsigned long)(-(long)val);
  3692.  1532  26 c6 07 2d                       mov     byte ptr es:[bx],2dH
  3693.  1536  f7 d9                             neg     cx
  3694.  1538  89 4e 08                          mov     [bp+8H],cx
  3695.  153b  83 df 00                          sbb     di,0000H
  3696.  
  3697.  }
  3698.  
  3699.  153e  8b 46 fe          L228            mov     ax,[bp-2H]
  3700.  
  3701.  firstdig = p;           /* save pointer to first digit */
  3702.  
  3703.  1541  89 76 f8                          mov     [bp-8H],si
  3704.  1544  89 46 fc                          mov     [bp-4H],ax
  3705.  
  3706.  do {
  3707.      digval = (unsigned) (val % radix);
  3708.  1547  8b 46 08          L229            mov     ax,[bp+8H]
  3709.  154a  8b 5e 10                          mov     bx,[bp+10H]
  3710.  154d  89 fa                             mov     dx,di
  3711.  154f  31 c9                             xor     cx,cx
  3712.  1551  e8 00 00                          call    __U4D
  3713.  
  3714.      val /= radix;       /* get next digit */
  3715.  
  3716.      /* convert to ascii and store */
  3717.  1554  8b 46 08                          mov     ax,[bp+8H]
  3718.  1557  89 5e f6                          mov     [bp-0aH],bx
  3719.  155a  89 5e fa                          mov     [bp-6H],bx
  3720.  155d  89 fa                             mov     dx,di
  3721.  155f  31 c9                             xor     cx,cx
  3722.  1561  8b 5e 10                          mov     bx,[bp+10H]
  3723.  1564  e8 00 00                          call    __U4D
  3724.  1567  89 46 08                          mov     [bp+8H],ax
  3725.  
  3726.      if (digval > 9)
  3727.  156a  8b 46 f6                          mov     ax,[bp-0aH]
  3728.  156d  89 d7                             mov     di,dx
  3729.  156f  3d 09 00                          cmp     ax,0009H
  3730.  1572  76 0b                             jbe     L230
  3731.  
  3732.          *p++ = (char) (digval - 10 + 'a');  /* a letter */
  3733.  1574  8a 46 fa                          mov     al,[bp-6H]
  3734.  1577  8e 46 fe                          mov     es,[bp-2H]
  3735.  157a  46                                inc     si
  3736.  157b  04 57                             add     al,57H
  3737.  
  3738.      else
  3739.  157d  eb 09                             jmp     L231
  3740.  
  3741.          *p++ = (char) (digval + '0');       /* a digit */
  3742.  157f  8a 46 fa          L230            mov     al,[bp-6H]
  3743.  1582  8e 46 fe                          mov     es,[bp-2H]
  3744.  1585  46                                inc     si
  3745.  1586  04 30                             add     al,30H
  3746.  1588  26 88 44 ff       L231            mov     es:[si-1H],al
  3747.  158c  8b 56 08                          mov     dx,[bp+8H]
  3748.  
  3749.  } while (val > 0);
  3750.  
  3751.  /* We now have the digit of the number in the buffer, but in reverse
  3752.     order.  Thus we reverse them now. */
  3753.  
  3754.  158f  85 ff                             test    di,di
  3755.  1591  77 b4                             ja      L229
  3756.  1593  75 04                             jne     L232
  3757.  1595  85 d2                             test    dx,dx
  3758.  1597  77 ae                             ja      L229
  3759.  
  3760.  *p-- = '\0';            /* terminate string; p points to last digit */
  3761.  
  3762.  1599  8e 46 fe          L232            mov     es,[bp-2H]
  3763.  159c  26 c6 04 00                       mov     byte ptr es:[si],00H
  3764.  15a0  4e                                dec     si
  3765.  
  3766.  do {
  3767.      temp = *p;
  3768.  15a1  8e 46 fe          L233            mov     es,[bp-2H]
  3769.  15a4  8b 5e f8                          mov     bx,[bp-8H]
  3770.  15a7  26 8a 04                          mov     al,es:[si]
  3771.  
  3772.      *p = *firstdig;
  3773.      *firstdig = temp;   /* swap *p and *firstdig */
  3774.  15aa  8e 46 fc                          mov     es,[bp-4H]
  3775.  
  3776.      --p;
  3777.  15ad  83 c6 ff                          add     si,0ffffH
  3778.  15b0  26 8a 27                          mov     ah,es:[bx]
  3779.  15b3  8e 46 fe                          mov     es,[bp-2H]
  3780.  
  3781.      ++firstdig;         /* advance to next two digits */
  3782.  15b6  43                                inc     bx
  3783.  15b7  26 88 64 01                       mov     es:[si+1H],ah
  3784.  15bb  8e 46 fc                          mov     es,[bp-4H]
  3785.  15be  89 5e f8                          mov     [bp-8H],bx
  3786.  15c1  26 88 47 ff                       mov     es:[bx-1H],al
  3787.  
  3788.  } while (firstdig < p); /* repeat until halfway */
  3789.  15c5  39 de                             cmp     si,bx
  3790.  15c7  77 d8                             ja      L233
  3791.  
  3792. }
  3793.  
  3794. /* Actual functions just call conversion helper with neg flag set correctly,
  3795.    and return pointer to buffer. */
  3796.  
  3797.  15c9  89 ec                             mov     sp,bp
  3798.  15cb  5d                                pop     bp
  3799.  15cc  5f                                pop     di
  3800.  15cd  5e                                pop     si
  3801.  15ce  c3                                ret     
  3802.  15cf  fc                                cld     
  3803.  
  3804. char __far * __cdecl _itoa (int val,char __far *buf,int radix) {
  3805.  15d0  56                __itoa          push    si
  3806.  15d1  57                                push    di
  3807.  15d2  55                                push    bp
  3808.  15d3  89 e5                             mov     bp,sp
  3809.  15d5  8b 46 08                          mov     ax,[bp+8H]
  3810.  15d8  8b 7e 0a                          mov     di,[bp+0aH]
  3811.  15db  8b 76 0c                          mov     si,[bp+0cH]
  3812.  15de  8b 56 0e                          mov     dx,[bp+0eH]
  3813.  
  3814.  if (radix == 10 && val < 0)
  3815.  15e1  83 fa 0a                          cmp     dx,000aH
  3816.  15e4  75 0d                             jne     L234
  3817.  15e6  85 c0                             test    ax,ax
  3818.  15e8  7d 09                             jge     L234
  3819.  
  3820.     xtoa((unsigned long)val, buf, radix, 1);
  3821.  15ea  6a 01                             push    0001H
  3822.  15ec  52                                push    dx
  3823.  15ed  56                                push    si
  3824.  15ee  57                                push    di
  3825.  15ef  99                                cwd     
  3826.  15f0  52                                push    dx
  3827.  
  3828.  else
  3829.  15f1  eb 07                             jmp     L235
  3830.  
  3831.     xtoa((unsigned long)(unsigned int)val, buf, radix, 0);
  3832.  return buf;
  3833.  15f3  6a 00             L234            push    0000H
  3834.  15f5  52                                push    dx
  3835.  15f6  56                                push    si
  3836.  15f7  57                                push    di
  3837.  15f8  6a 00                             push    0000H
  3838.  15fa  50                L235            push    ax
  3839.  15fb  e8 00 00                          call    _xtoa
  3840.  15fe  83 c4 0c                          add     sp,000cH
  3841.  
  3842. }
  3843.  
  3844.  1601  89 f8                             mov     ax,di
  3845.  1603  89 f2                             mov     dx,si
  3846.  1605  5d                                pop     bp
  3847.  1606  5f                                pop     di
  3848.  1607  5e                                pop     si
  3849.  1608  c3                                ret     
  3850.  1609  89 c0                             mov     ax,ax
  3851.  160b  fc                                cld     
  3852.  
  3853. char __far * __cdecl _ltoa (long val,char __far *buf,int radix) {
  3854.  160c  56                __ltoa          push    si
  3855.  160d  57                                push    di
  3856.  160e  55                                push    bp
  3857.  160f  89 e5                             mov     bp,sp
  3858.  1611  8b 4e 08                          mov     cx,[bp+8H]
  3859.  1614  8b 56 0a                          mov     dx,[bp+0aH]
  3860.  1617  8b 7e 0c                          mov     di,[bp+0cH]
  3861.  161a  8b 76 0e                          mov     si,[bp+0eH]
  3862.  161d  8b 5e 10                          mov     bx,[bp+10H]
  3863.  
  3864.  xtoa((unsigned long)val, buf, radix, (radix == 10 && val < 0));
  3865.  return buf;
  3866.  1620  83 fb 0a                          cmp     bx,000aH
  3867.  1623  75 09                             jne     L236
  3868.  1625  85 d2                             test    dx,dx
  3869.  1627  7d 05                             jge     L236
  3870.  1629  b8 01 00                          mov     ax,0001H
  3871.  162c  eb 02                             jmp     L237
  3872.  162e  31 c0             L236            xor     ax,ax
  3873.  1630  50                L237            push    ax
  3874.  1631  53                                push    bx
  3875.  1632  56                                push    si
  3876.  1633  57                                push    di
  3877.  1634  52                                push    dx
  3878.  1635  51                                push    cx
  3879.  1636  e8 00 00                          call    _xtoa
  3880.  1639  83 c4 0c                          add     sp,000cH
  3881.  
  3882. }
  3883.  
  3884.  163c  89 f8                             mov     ax,di
  3885.  163e  89 f2                             mov     dx,si
  3886.  1640  5d                                pop     bp
  3887.  1641  5f                                pop     di
  3888.  1642  5e                                pop     si
  3889.  1643  c3                                ret     
  3890.  
  3891. char __far * __cdecl _ultoa (unsigned long val,char __far *buf,int radix) {
  3892.  1644  56                __ultoa         push    si
  3893.  1645  57                                push    di
  3894.  1646  55                                push    bp
  3895.  1647  89 e5                             mov     bp,sp
  3896.  1649  8b 7e 0c                          mov     di,[bp+0cH]
  3897.  164c  8b 76 0e                          mov     si,[bp+0eH]
  3898.  
  3899.  xtoa(val, buf, radix, 0);
  3900.  return buf;
  3901.  164f  6a 00                             push    0000H
  3902.  1651  8b 56 10                          mov     dx,[bp+10H]
  3903.  1654  52                                push    dx
  3904.  1655  56                                push    si
  3905.  1656  57                                push    di
  3906.  1657  8b 5e 0a                          mov     bx,[bp+0aH]
  3907.  165a  53                                push    bx
  3908.  165b  8b 4e 08                          mov     cx,[bp+8H]
  3909.  165e  51                                push    cx
  3910.  165f  e8 00 00                          call    _xtoa
  3911.  1662  83 c4 0c                          add     sp,000cH
  3912.  
  3913. }
  3914.  
  3915.  
  3916.  1665  89 f8                             mov     ax,di
  3917.  1667  89 f2                             mov     dx,si
  3918.  1669  5d                                pop     bp
  3919.  166a  5f                                pop     di
  3920.  166b  5e                                pop     si
  3921.  166c  c3                                ret     
  3922.  
  3923. No disassembly errors
  3924.  
  3925. List of external symbols
  3926.  
  3927. Symbol
  3928. ----------------
  3929. _Device_Help     0000001d 00000019
  3930. HeapInit_        00000035
  3931. ParseCL_         00000042
  3932. _gDMAplay        000011d7 00000cd6 000004ac 00000099 00000076 0000005f 0000004e
  3933. _gDMArec         000011e5 00000f09 00000646 000000c1 000000aa 0000009d 00000052
  3934. _gDMAplayMode    00000e99 000005d3 00000069
  3935. _gIRQ            0000119f 0000093f 000002ff 000000be 00000073
  3936. waveplayInit_    00000079
  3937. _gCLflags        0000114b 0000085e 0000083a 0000082b 0000081f 00000803 000007f7 000007d6 000007cf 000007c3
  3938.                  000007b6 00000797 0000078b 0000014b 0000011d 000000fd 000000f2 000000ec 000000cf 00000084
  3939. _ddprintf        0000013c 000000d9 00000090
  3940. _gDMArecMode     000010cc 00000767 000000b4
  3941. waverecInit_     000000c4
  3942. chipsetInit_     000000e1
  3943. chipsetSetDTM_   000000f9
  3944. _endCode         00000119
  3945. _endData         00000123
  3946. _initExitMsg     00000166 00000155
  3947. DOS16PUTMESSAGE  0000123d 00001219 00001199 00001137 0000111d 000010b8 0000109e 00001039 0000101f 00000fba
  3948.                  00000fa0 00000f04 00000eea 00000e85 00000e6b 00000e06 00000dec 00000d87 00000d6d 00000cd0
  3949.                  00000cb6 00000bdc 00000bc2 00000b5d 00000b43 00000aa6 00000a8c 000009f0 000009d6 00000939
  3950.                  0000091c 000008d8 000008bb 00000858 000001c5 00000169
  3951. _xtoa            00001660 00001637 000015fc 00001156 000010d7 00001053 00000fd9 00000f56 00000ea4 00000e20
  3952.                  00000da6 00000d20 00000c3a 00000b7c 00000af9 00000a42 00000989 00000182
  3953. _strtoxl         00001504 000014dc 0000074c 000006b4 00000676 0000061c 000005b8 00000522 000004e3 00000482
  3954.                  0000041d 0000038d 00000337 000002dd
  3955. _gBasePort       000011ad 000009f5 00000357
  3956. _gCtrlPort       000011bb 00000aac 000003ad
  3957. _gDevice         000011c9 00000c3e 00000bef 00000be9 00000be2 00000438
  3958. _gDMAplaySize    00000d9b 000004f2
  3959. _gDMAplayIPB     00000e1c 00000588
  3960. _gDMArecSize     00000fce 00000685
  3961. _gDMArecIPB      00001048 0000071c
  3962. _signOnMsg       00000855 00000844
  3963. _irqMsg          00000936 00000925
  3964. _basePortMsg     000009ed 000009d3
  3965. _ctrlPortMsg     00000aa3 00000a89
  3966. _modeMsg         00000b5a 00000b40
  3967. _gMode           00000b71
  3968. _deviceMsg       00000bd9 00000bbf
  3969. _deviceStr       00000c4b
  3970. _playDMAMsg      00000ccd 00000cb3
  3971. _playSizeMsg     00000d84 00000d6a
  3972. _playIPBMsg      00000e03 00000de9
  3973. _playModeMsg     00000e82 00000e68
  3974. _recDMAMsg       00000f01 00000ee7
  3975. _recSizeMsg      00000fb7 00000f9d
  3976. _recIPBMsg       00001036 0000101c
  3977. _recModeMsg      000010b5 0000109b
  3978. _clFlagsMsg      00001134 0000111a
  3979. _errorPrepMsg    00001216 00001205
  3980. _errorMsg        00001239 00001227
  3981. __U4D            00001565 00001346
  3982. __U4D            00001552 000013d1
  3983. __U4M            000013ec
  3984. ------------------------------------------------------------
  3985. List of public symbols
  3986.  
  3987. SYMBOL          GROUP           SEGMENT          ADDRESS
  3988. ---------------------------------------------------------
  3989. __itoa                          _INITTEXT        000015d0
  3990. __ltoa                          _INITTEXT        0000160c
  3991. __ultoa                         _INITTEXT        00001644
  3992. _basePortMsg    DGROUP          CONST2           0000003c
  3993. _clFlagsMsg     DGROUP          CONST2           000000cc
  3994. _ctrlPortMsg    DGROUP          CONST2           00000048
  3995. _deviceMsg      DGROUP          CONST2           00000060
  3996. _deviceStr      DGROUP          _DATA            00000020
  3997. _errorMsg       DGROUP          _DATA            00000000
  3998. _errorPrepMsg   DGROUP          CONST2           000000d8
  3999. _initExitMsg    DGROUP          CONST2           000000f7
  4000. _irqMsg         DGROUP          CONST2           00000030
  4001. _modeMsg        DGROUP          CONST2           00000054
  4002. _playDMAMsg     DGROUP          CONST2           0000006c
  4003. _playIPBMsg     DGROUP          CONST2           00000084
  4004. _playModeMsg    DGROUP          CONST2           00000090
  4005. _playSizeMsg    DGROUP          CONST2           00000078
  4006. _recDMAMsg      DGROUP          CONST2           0000009c
  4007. _recIPBMsg      DGROUP          CONST2           000000b4
  4008. _recModeMsg     DGROUP          CONST2           000000c0
  4009. _recSizeMsg     DGROUP          CONST2           000000a8
  4010. _signOnMsg      DGROUP          CONST2           00000000
  4011. _strtol                         _INITTEXT        000014c0
  4012. _strtoul                        _INITTEXT        000014e8
  4013. _strtoxl                        _INITTEXT        0000124c
  4014. _xtoa                           _INITTEXT        00001510
  4015. ParseCL_                        _INITTEXT        000001e8
  4016. stratMode2Init_                 _INITTEXT        00000000
  4017.  
  4018. ------------------------------------------------------------
  4019.  
  4020.