415968430 发表于 2012-1-10 10:00:22

实验十,谁帮我看下指令,哪里出错了

assume cs:code

data segment
db 'welcome to masm!',0
data ends

code segment
start:
mov dh,8
mov dl,3
mov cl,2h
mov ax,data
mov ds,ax
mov si,0
call show_str

mov ax,4c00h
int 21h

show_str:
dec dh
mov al,160
mul dh
mov bx,ax
dec dl
mov al,2
mul dl
add ax,bx
add ax,0b800h
mov es,ax;段地址
mov di,0
mov bx,0
mov ah,cl
mov cx,16
s:mov al,ds:
mov es:,al
mov es:,ah
inc bx
inc di
inc di
loop s
ret
code ends
end start

415968430 发表于 2012-1-10 10:17:36

OK。自己解决了。果然睡一觉第二天起来脑子比较清醒。29.add ax,0b800h 这里出错了。错位了。导致内容存到显存的其他页去了,不是第一页了
页: [1]
查看完整版本: 实验十,谁帮我看下指令,哪里出错了