汇编程序一编译就死机
其他程序编译很正常。STACKS SEGMENT
dw 10 dup(0)
STACKS ENDS
data segment
db 10 dup(0)
data ends
code segment
assume cs:code,ss:stacks,ds:data
start:
mov ax,stacks
mov ss,ax
mov sp,12
mov ax,12666
mov bx,data
mov ds,bx
mov si,1
call dtoc
mov dh,8
mov dl,3
mov cl,2
call show_str
mov ax, 4c00h
int 21h
dtoc:
mov bl,10
s: div bl
mov cl,al
mov ch,0
jcxz ok
add ah,30h
mov ds:[si],ah
mov ah,0
inc si
jmp short s
ok: ret
show_str:
mov al,a0h
mul dh
mov bx,ax
mov al,2
mul dl
add bx,ax
mov ax,0b800h
mov es,ax
mov cl,ds:[si]
mov ch,0
jcxz ok1
s1: mov es:[bx+1],cl
dec si
mov es:[bx],ds:[si]
add bx,2
jmp short s1
ok1:ret
code ends
end start