.MODEL TINY
.CODE
.STACK 100H

JMP INSTALL
MESS DB "WELCOME TO 511 LAB $"


MYINT PROC



mov AX,0600h   ;clear screen
MOV BH, 71h
MOV CX, 0000h
MOV DX, 184Fh
INT 10h

	MOV BX,OFFSET MESS
	MOV DL,20  ;column 20


L1: 	
	MOV AL ,CS:[BX]
	CMP al , '$'
	JZ L2

	PUSH BX
		
	MOV BH,0 ;page number 0
	MOV AH,2   ;set the curser postion 
	MOV DH,20 ;row 0
	INC DL
	INT 10H   ;to access  video memory

	MOV AH,9H ;Write character and attribute at cursor position

	MOV BH,0 ;page number 0
	MOV BL,84H ;attribute of the character
	MOV CX,1 ;number of times to write the character
	INT 10H ;video memory
	POP BX
	INC BX	
	JMP L1

L2:
	IRET

MYINT ENDP


INSTALL:
 ;install new interrupt vector
	MOV AH,25H ;set vector
	MOV AL,62H ;interrupt vector
	MOV DX,CS
	MOV DS,DX
	MOV DX, OFFSET MYINT
	INT 21H

;terminate

	MOV AX,3100H
	INT 21H

END
