assume cs:code
code segment
start:
mov ax,cs
mov ds,ax
mov si,offset do0
mov ax,0
mov es,ax
mov di,200h
mov cx,offset do0end-offset do0
cld
rep movsb ;安装do0中断例程
mov ax,0
mov es,ax
mov word ptr es:[0],200h
mov word ptr es:[2],0 ;设置中断向量表,其实就是改变函数地址
mov ax,4c00h
int 21h
do0:
jmp short do0Start
db "divide error!"
do0Start:
mov ax,cs
mov ds,ax
mov si,202h
mov ax,0b800h
mov es,ax
mov di,12*160+36*2
mov cx,13
s:
mov al,ds:[si]
mov es:[di],al
mov ah,1
mov es:[di+1],ah
inc si
add di,2
loop s
mov ax,4c00h
int 21h
do0end:
nop
code ends
end start
汇编语言第3版实验12编写0号中断的处理程序
最新推荐文章于 2022-02-04 22:12:18 发布