|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
实验12 的代码如下,为什么没有显示‘divide error’,而是提示NTVDM CPU 遇到无效的指令,是代码错了吗?求教,非常感谢大家帮忙
assume cs:code
code segment
start: mov ax,cx
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
mov ax,0
mov es,ax
mov word ptr es:[0*4],200h
mov word ptr es:[0*4+2],0
mov ax,1000
mov bl,1
div bl
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+34*2
mov cx,13
s: mov al,[si]
mov es:[di],al
inc si
add di,2
loop s
mov ax,4c00h
int 21h
do0end: nop
code ends
end start
|
|