接管0号中断,编译过了但是运行花屏,请各位指点
*********************************************************************
data segment
M dw 12
N db 0
String db 'DIVIDED BY ZERO!&'
data ends
code segment
assume cs:code, ds:data
main proc far
start:
push ds
mov ax, 0
push ax
mov ax, data
mov ds, ax
mov al, 0
mov ah, 35h ;取原中断矢量
int 21h
push es ;保存原中断矢量
push bx
push ds ;保存数据段基地质
mov dx, offset diy ;取自定义中断矢量偏移地址
mov ax, seg diy ;................段地址
mov ds, ax
mov al, 0
mov ah, 25h
int 21h
pop ds
mov ax, M
mov bl, N
div bl
pop dx ;取出原中断矢量
pop ds
mov al, 0
mov ah, 25h
int 21h
ret
main endp
diy proc near
push dx
push ax
mov dl, offset String
mov ah, 2
int 21h
pop ax
pop dx
iret
diy endp
code ends
end start