home *** CD-ROM | disk | FTP | other *** search
- ;*********************************************************
- ; INNOC, a simple diskette-immunization program to
- ; prevent infection by common Boot Sector viruses
- ; by
- ; Mike McCune (c) 1990, 1991 - All Rights Reserved.
- ; This program may be freely used and distributed.
- ; For assembly into a .COM file with A86 shareware
- ; assembler or equivalent.
- ;*********************************************************
-
- .model small
-
- assume cs:code , ds:code
-
-
- jmp opening ;Start the program
-
- db '(c) 1990, 1991 Mike McCune. All rights reserved'
-
- opening:
- xor dx,dx ;
- xor ah,ah ;Reset floppy
- int 13h ;Drive A:
- mov cx,1h ;We'll be reading
- mov bx,200h ;the Boot Sector
- mov ax,201h ;into memory
- int 13h ;do it now.
- or ah,ah ;and check for a Read error.
- jnz read_error ;If error was detected, inform operator.
- es: ;Otherwise, we'll be writing
- mov [bx],05eah ;these strings
- mov [bx+2],0c000h ;into the Boot Sector..
- mov [bx+4],1234h ;(these are the
- mov [bx+1fc],1357h ; actual immunization
- mov ax,301h ; strings).
- int 13h ;Do all that writing now.
- or ah,ah ;Now check for a write error.
- jnz write_error ;If error was detected, inform operator;
- mov ah,9h ;otherwise,
- lea dx,innoc_message ;tell operator the diskette has
- int 21h ;been immunized
- int 20h ;and terminate program.
-
- read_error: ;If Read error was earlier detected,
- mov ah,9h ;then
- lea dx,read_message ;display the Read Error message
- int 21h ;and
- int 20h ;end program.
-
- write_error: ;If Write error was earlier detected,
- mov ah,9h ;then
- lea dx,write_message ;display the Write Error message
- int 21h ;and
- int 20h ;end program.
-
- innoc_message: ;Immunization Completed message
- db 'Diskette A: innoculated$'
- read_message: ;Read Error message
- db 'Read Error!$' ;
- write_message: ;Write Error message
- db ' Write Error!$' ;
-