home *** CD-ROM | disk | FTP | other *** search
/ Shareware Overload / ShartewareOverload.cdr / utils / antivir2.zip / NOHARD.ASM < prev    next >
Assembly Source File  |  1986-01-04  |  2KB  |  69 lines

  1. ;HARD DISK IVEC REMOVER
  2. ;COPYRIGHTED AND PLACED IN THE PUBLIC DOMAIN
  3. ;BY ROB KING, SPRINGFIELD,VA
  4. ;4 JAN 86
  5.  
  6. CR    EQU    0DH
  7. LF    EQU    0AH
  8. BEL    EQU    07H
  9.  
  10.  
  11. ABSO    SEGMENT AT 0H
  12. ORG    13H*4
  13. DISK_INT    LABEL DWORD
  14. ORG    40H*4
  15. FLOP_INT    LABEL DWORD
  16. ABSO    ENDS
  17.  
  18. CSEG    SEGMENT
  19.     ASSUME CS:CSEG;DS:CSEG
  20.     ORG    0100H
  21. FIRST:
  22.     MOV DX,OFFSET MSG_SIGNON    ;say what this program does
  23.     MOV AH,9
  24.     INT 21H
  25.     PUSH DS                ;save segments because its good form
  26.     PUSH ES
  27.     XOR AX,AX            ;point ds to bottom of ram
  28.     MOV DS,AX
  29.     MOV DX,OFFSET MSG_NOT_THERE    ;make this assignment before the
  30.                     ;assume statement
  31.     ASSUME DS:ABSO
  32.     LDS SI,DISK_INT            ;get int 13h interrupt vector
  33.     MOV AX,DS
  34.     CMP AX,0C800H            ;test to see if it points to 
  35.                     ;the "usual" location for a hard
  36.                     ;disk controller rom
  37.     JNE DONE            ;skip if not
  38.     XOR AX,AX            ;cheap zero
  39.     PUSH AX                ;save a copy
  40.     MOV DS,AX            ;point ds to bottom of ram again
  41.     LDS SI,FLOP_INT            ;get floppy ivec
  42.     MOV AX,DS            ;save segment
  43.     POP DS                ;point ds to bottom of ram again
  44.     MOV DISK_INT,SI            ;save offset for floppy ivec
  45.     MOV DISK_INT+2,AX        ;save segment for floppy ivec
  46.     ASSUME DS:CSEG            ;generate proper label for next line
  47.     MOV DX,OFFSET MSG_THERE        ;point to action taken message
  48. DONE:
  49.     POP ES                ;recover segments
  50.     POP DS
  51.     MOV AH,09H            ;print msg pointed to by dx
  52.     INT 21H
  53.     XOR AX,AX            ;cheap zero
  54.     INT 21H                ;exit
  55.  
  56. MSG_SIGNON    DB    'Hard disk access remover by Rob King.'
  57.         DB    ' 6622 Holford Lane, Springfield, Va.',cr,lf
  58.         DB    'If you like this program, send me a dollar',cr,lf,'$'
  59.  
  60. MSG_NOT_THERE    DB    'Segment address for Interrupt 13H not C800..'
  61.         DB    'NO interrupt vectors changed',cr,lf,bel,'$'
  62.  
  63. MSG_THERE    DB    'Interrupt vector 13H replaced with interrupt '
  64.         DB    'vector 40H.',cr,lf
  65.         DB    'Hard disk access disabled...CTL-ALT-DEL to restore.'
  66.         DB    cr,lf,bel,'$'
  67. CSEG     ENDS
  68.     END    FIRST    ;use this so masm/link will make a proper com file
  69.