有没有大佬 帮忙看下10.3的作业哪里出问题了
assume cs:code,ds:data,ss:stackdata segment
dw 123,12666,1,8,3,38
db 02h
data ends
stack segment
dw 16 dup (0)
stack ends
code segment
start: mov ax,12666
mov bx,data
mov ds,bx
mov bx,stack
mov ss,bx
mov si,0b800h
mov es,si
mov si,2000
mov bx,0
mov sp,20h
call s
mov ax,4c00h
int 21h
s: mov cx,10
div cx
mov cx,ax ;求余数 入栈
jcxz s0
add dx,30h
push dx
mov dx,0
inc bx
jmp short s
s0: add dx,30h
inc bx
push dx ;把最后1个余数+30h 入栈,设置cx循环次数
mov cx,bx
jmp short s1
s1:
pop ax
mov ah,ds: ;把颜色给ah
mov es:,ax ;把字符串导入es:
add si,2
loop s1
ret
code ends
end start 我debug里面t 每次字符都能显示 为啥直接运行exe 而不显示呢。。 dx每次都要置0
s: mov dx,0
mov cx,10
div cx
add dx,30h
push dx ;数字入栈
inc bx ;取余次数
mov cx,ax
jcxz s0 ;商为0则显示数字
jmp short s
s0:mov cx,bx
s1:pop ax
mov ah,ds:
mov es:,ax
add si,2
loop s1
ret
页:
[1]