.model tiny
.code
	org	100h
start:	jmp	ini

int10:	cmp	ah,0	; Switching video mode ?
	jne	CallInt

	cmp	al,7	; Monocrome mode ?
	je	CallInt

	cmp	al,3	; Mode above 3 ? (al > 3)
	ja	Graph	; Graphix mode set (if TRUE)

Text:	mov	ax,7	; Text mode (Monocrome display adapter)
	jmp     CallInt

Graph:	mov	ax,11h	; Graphix mode (Monocrome VGA)

CallInt:
	jmp	dword ptr cs:old10

old10	dw	?,?

ini:	mov	ax,3510h
	int	21h
	mov	old10,bx
	mov	old10+2,es
	
	mov	dx,offset int10
	mov	ax,2510h
	int	21h

	mov	dx,offset ini
	int	27h
end start