王爽汇编p206实验10显示字符串程序问题
为什么在CMD中直接运行程序,不会打印出字符,代码和小甲鱼老师视频里的代码一样的? assume cs:code,ds:datadata segment
db 'I love YOU',0
data ends
code segment
start: mov dh,8
mov dl,3
mov cl,2
mov ax,data
mov ds,ax
mov si,0
call show_str
mov ax,4c00h
int 21h
show_str:
push cx
push si
mov al,0a0h
dec dh
mul dh
mov bx,ax;定位行
mov al,2
mul dl
sub ax,2
add bx,ax;定位列
mov ax,0b800h
mov es,ax
mov di,0
mov al,cl
mov ch,0
show:mov cl,ds:
jcxz ok
mov es:,cl
mov es:,al
inc si
add di,2
jmp short show
ok:pop si
pop cx
ret
code ends
end start
页:
[1]