大神帮我看看,除法错误中断处理后怎么不能返回dos呢?
assume cs:codecode segment
start:mov ax,code
mov ds,ax
mov si,offset do0 ;设置ds:si指向源地址
mov ax,0
mov es,ax
mov di,200h ;设置es:di指向目的地址
mov cx,offset do0end-offset do0;cx的传输长度
cld
rep movsb
mov ax,0
mov es,ax
mov word ptr es:,200h
mov word ptr es:,0
mov ax,1000h
mov bh,1h
div bh
mov ax,4c00h
int 21h
do0: jmp short do0start
db "overflow!"
do0start: mov ax,cs
mov ds,ax
mov si,202h ;设置ds:si指向字符串
mov ax,0b800h
mov es,ax
mov di,12*160+36*2
mov cx,9 ;字符串长度
s: mov al,
mov es:,al
mov byte ptr es:,02h
inc si
add di,2
loop s
mov ax,4c00h
int 21
do0end: nop
code ends
end start
学习学习! assume cs:code
code segment
start:mov ax,code
mov ds,ax
mov si,offset do0 ;设置ds:si指向源地址
mov ax,0
mov es,ax
mov di,200h ;设置es:di指向目的地址
mov cx,offset do0end-offset do0;cx的传输长度
cld
rep movsb
mov ax,0
mov es,ax
mov word ptr es:,200h
mov word ptr es:,0
mov ax,1000h
mov bh,1h
div bh
mov ax,4c00h
int 21h
do0: jmp short do0start
db "overflow!"
do0start: mov ax,cs
mov ds,ax
mov si,202h ;设置ds:si指向字符串
mov ax,0b800h
mov es,ax
mov di,12*160+36*2
mov cx,9 ;字符串长度
s: mov al,
mov es:,al
mov byte ptr es:,02h
inc si
add di,2
loop s
mov ax,4c00h
int 21
do0end: nop
code ends
end start 谢谢!太大意啦!下次一定注意{:5_110:}
页:
[1]