|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
本帖最后由 zengsnail 于 2011-9-23 23:37 编辑
assume cs:codesg
codesg segment
start:mov ax,cs
mov ds,ax
mov si,offset d0
mov ax,0
mov es,ax
mov di,200h
mov cx,offset d0end-offset d0
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,4c00h
int 21h
d0: jmp short d0start
db "divide error!"
d0start:mov ax,0 ;问题就是在这里,我如果改成mov ax, CS,运行后,在屏幕中间显示的是几个看不懂的乱码,
而写成mov ax,0 (因为字符串地址就是0000:0202,对吧?)才能正常显示 divide error!
mov ds,ax
mov si,202
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
d0end:nop
codesg ends
end start
|
|