old_int_loc	equ	10h*4
old_int_seg	equ	10h*4+2
comp_flg	equ	10h
;
data_01		equ	0CA2h
data_02		equ	0CA4h
data_03		equ	0CA8h
data_04		equ	805h
;
seg_ws		segment	byte public
		assume	cs:seg_ws, ds:seg_ws
		org	100h
wsnopass	proc	far
start:		jmp	short set_int
;
dt_disp		db	"WS    nopass!",10,13,"$"
dt_len		= $ - start
;
ws_begin:	cmp	ax,comp_flg
		je	comp_001
old_int_call:
		db	0EAh
old_i_loc	dw	0
old_i_seg	dw	0
;
comp_001:	push	ds
		push	ax
		push	es
		pop	ds
		cmp	word ptr ds:data_01,1195h
		je	comp_002
comp_end:
		pop	ax
		pop	ds
		jmp	short old_int_call
comp_002:
		cmp	word ptr ds:data_02,474h
		jne	comp_end
		cmp	word ptr ds:data_03,1194h
		jne	comp_end
		mov	byte ptr ds:data_02,0EBh
		mov	byte ptr ds:data_04,0C3h
		jmp	short comp_end
;
set_int:	mov	dx,offset dt_disp
		mov	ah,9
		int	21h
		xor	ax,ax
		mov	ds,ax
		mov	ax,ds:old_int_loc
		mov	es,ds:old_int_seg
		push	cs
		pop	ds
		mov	old_i_loc,ax
		mov	old_i_seg,es
		mov	si,offset start
		mov	di,si
		mov	cx,dt_len
		repz	cmpsb
		jnz	set_new_int
		mov	ah,4ch
		int	21h
set_new_int:
		xor	ax,ax
		mov	ds,ax
		mov	ax,offset ws_begin
		mov	ds:old_int_loc,ax
		mov	ax,cs
		mov	ds:old_int_seg,ax
		push	cs
		pop	ds
		mov	dx,offset set_int
		int	27h

wsnopass	endp
seg_ws		ends
		end	start
