;[]-------------------------------------------------------------------------[]
;|	Program name: A_4.ASM                                                |
;|	Image   file: A_4.COM                                                |
;|	Note        : This is not a TSR program.                             |
;|		      This program is used to show the interrupt 03H.        |
;[]-------------------------------------------------------------------------[]


cseg	segment
	assume	cs:cseg,ds:cseg
	org	100H
start:
	jmp	initialize

;------- Data area ---------------------

old_int03	dd	?
old_int61	dd	?

;------- Include area ------------------

DEBUG		EQU	1
include	register.inc
include	interrup.inc
include	debug.inc

;------- Interrupt subroutine ----------

new_int03	proc	far

	jmp	near ptr new_int61

new_int03	endp

;------- Initial procedure -------------

initialize:

	assume	cs:cseg,ds:cseg

	get_int	03H,old_int03
	set_int	03H,<offset new_int03>
	get_int	61H,old_int61
	set_int	61H,<offset new_int61>

	int	03H			; Let CPU generates the interrupt 03H
	db	0CDH,03H		; CPU will also generate INT 03H
next:
	assume	cs:cseg,ds:nothing

	set_int	03H,<word ptr old_int03>,<word ptr old_int03[2]>
	set_int	61H,<word ptr old_int61>,<word ptr old_int61[2]>

	mov	ah,4CH
	int	21H

cseg	ends
	end	start
