您的位置 首页 应用

除法中止处理程序-asm

assumecs:code,ss:stack;关键在于处理中断的层层返回stacksegmentdw16dup(0)stackendscodesegmentstart:movax,csmovds,ax

assume cs:code,ss:stack;关键在于处理中止的层层回来

stack segment
dw 16 dup(0)
stack ends

code segment
start:
mov ax,cs
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,28h
mov si,offset do0
mov ax,0
mov es,ax
mov di,200h
mov cx,offset do0end-offset do0
cld
rep movsb
mov ax,0
mov es,ax
mov word ptr es:[0*4],200h
mov word ptr es:[0*4+2],0
calls1
mov ax,004ch
int 21h
do0:jmp short do0start
db “divvide error!”
do0start: mov ax,cs
mov ds,ax
mov si,202h
mov ax,0b800h
mov es,ax
mov di,3*160+2*2
mov cx,13
mov bl,5
s0:mov al,[si]
mov es:[di],al
inc di
mov es:[di],bl
inc si
incdi
loop s0
mov ax,004ch
int 21h

do0end:nop
s1: mov ax,0ffffh
mov dx,1
mov bx,1
div bx
ret
code ends

声明:本文内容来自网络转载或用户投稿,文章版权归原作者和原出处所有。文中观点,不代表本站立场。若有侵权请联系本站删除(kf@86ic.com)https://www.86ic.net/yingyong/317189.html

为您推荐

联系我们

联系我们

在线咨询: QQ交谈

邮箱: kf@86ic.com

关注微信
微信扫一扫关注我们

微信扫一扫关注我们

返回顶部