汇编安装中断的程序:push dspush espush bxpush dx
push cspop dsmov si, offset myint ;int源程序在代码段
mov ax,0mov es,axmov di,200h ;安装int的地址为200h
mov cx,offset myintend - offset myintcld ;设置传输方向为正rep movsb ;安装int
mov bx,word ptr es:[7ch*4] ;获得原先中断向量表mov dx,word ptr es:[7ch*4+2] ;获得原先中断向量表段地址
mov word ptr es:[7ch*4],200h ;设置中断向量表mov word ptr es:[7ch*4+2],0 ;设置中断向量表段地址(es)
jmp continue ;跳过自己编写的中断程序
myint:;在这里输入自己编写的中断程序iretmyintend:nop
continue:pop dxpop bxpop espop ds
mov ax,4c00h;退出程序int 21h