马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
assume cs:code,ds:data
data segment
db 10 dup (0)
data ends
code segment
start: mov ax,12666
mov bx,data
mov ds,bx
mov si,0 ;ds:si指向data首地址
call dtoc
mov dh,8
mov dl,3
mov cl,2
call show_str
mov ah,7
int 21h
mov ax,4c00h
int 21h
dtoc:
push dx
push cx
ret
show_str:
mov dx,0
mov bl,10
div bl
add dl,30h ;余数+30h
mov ds:[si],dl
mov cx,ax
inc si
jcxz ok
jmp short show_str
ok: pop cx
pop dx
mov ax,0
mov al,dh
mov bl,80h
mov dx,0
mul bl ;ax的值在第八行了
mov dx,0b800h
add ax,dx ;第八行
push ax
mov ax,0
mov dx,0
mov al,dl
mov bl,25h
mul bl ; AX的值在第三列
mov dx,ax
pop ax
add ax,dx ;AX在第八行3列
mov cx,10
s: mov es,ax
mov dx,0
mov si,0
mov dl,ds:[si]
mov es:[si],dl
mov al,02h
mov es:[si+1],al
inc si
loop s
ret
code ends
end start
请问一下,这程序错在哪里?求大神批评。菜鸟勿喷 |