;[]-------------------------------------------------------------------------[]
;|	Program name: B_1.ASM                                                |
;|	Image   file: B_1.COM                                                |
;|	Note        : This is not a TSR program.                             |
;|		      This program is used to demo how to use INT 15H.       |
;|		      It will move the interrupt table (from 0000:0000H) to  |
;|			the buffer at 5000:0000H.                            |
;[]-------------------------------------------------------------------------[]

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

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

descriptor_table	label	word
dummy		dw	4 dup(0)	; You must set it to zero
gdt_loc		dw	4 dup(0)	; You must set it to zero
source_gdt	dw	0FFFFH		; Seg_limit
		dw	0000H		; Base_lo_word
		db	00H		; Base_hi_byte
		db	93H		; Data_acc_rights
		dw	0000H		; Data_reserved
target_gdt	dw	0FFFFH		; Seg_limit
		dw	0000H		; Base_lo_word
		db	05H		; Base_hi_byte
		db	93H		; Data_acc_rights
		dw	0000H		; Data_reserved
bios_cs		dw	4 dup(0)	; You must set it to zero
bios_ss		dw	4 dup(0)	; You must set it to zero

;------- Initialize --------------------

initialize:

	assume	cs:cseg,ds:cseg

	mov	ax,cs			; Let ES:SI point to descriptor table
	mov	es,ax
	mov	si,offset descriptor_table

	mov	cx,200H			; Move 400H bytes

	mov	ah,87H			; Call block move routine
	int	15H

	int	20H			; End program

cseg	ends
	end	start
