求调试,程序执行到mov ax,0b800h崩溃
assume cs:code , ss:stackcode segment
db 'Welcome to masm!',0
code ends
stack segment
dw 8 dup (0)
stack ends
code segment
_start:mov dh,8
mov dl,3
mov cl,2
mov ax,code
mov ds,ax
mov ax,stack
mov ss,ax
mov sp,16
mov si,0
call show_str
mov ax,4c00h
int 21h
show_str:
push si ;si记录字符串读取地
;dh记录行地址
;dl记录列数地址
push cx ;ch记录读取字符
push ax ;al记录字符属性
push bx ;bx用来存放行的基础地址
push dx
mov ax,0b800h
mov es,ax
mov ah,0
mov al,0a0h
mul dh
mov bx,ax
mov dh,0
mov si,dx
mov al,cl
mov cl,0
print: mov ch,ds:[si] ;如果ch为0,则跳出循环
jcxz _out
mov es:[bx+si],ch
inc si
mov es:[bx+si+1],al
add dl,2
jmp short print
_out: pop dx
pop bx
pop ax
pop cx
pop si
ret
code ends
end _start