HOOK15


DOSSEG
.MODEL TINY
.STACK 200h
        
                
.CODE

Msg db  "HI there!"

hookit:
	pushf
	push	ax
	push	ds
	cmp	ah,4Fh
	jne	stoptst
	cmp	al,71h
	jne	stoptst
	mov	ax,40h
	mov	ds,ax	
	test	byte ptr ds:[17h],4
	jz	stoptst
	test	byte ptr ds:[17h],2
	jz	stoptst

;execute user code  
	mov     ah,9
    	mov     dx,offset Msg
    	int     21h
	
; this routine does not restore to original vector routine 
stoptst:

	end