+ -
当前位置:首页 → 问答吧 → 关于字符串输出很奇怪,在debug下运行正确却不能直接运行正确?

关于字符串输出很奇怪,在debug下运行正确却不能直接运行正确?

时间:2011-12-27

来源:互联网

我想在同一行输出两个字符串,由于第一个字符串最多20个字节,所以第二个字符串就在这一行的第20个位置开始输出,可是输出结果不正确,这是我的代码
Assembly code

;-------------------------------------------------------------------
;输出单个数据
;输入:si存放要输出的数据的地址
;输出:向屏幕输出数据的信息并输出一个换行
info_output proc near
push ax
push bx
push cx
push dx


mov dx , si
mov ah , 9
int 21h
mov ah , 3
int 10h
mov cl , name_length_max
sub cl , dl
mov ch , 0
output_space:
mov dl , ' '
mov ah , 2
int 21h
loop output_space
mov dx , si
add dx , name_size
mov ah , 9
int 21h
call newline

pop dx
pop cx
pop bx
pop ax
ret
info_output endp
;-------------------------------------------------------------------


对字符串
Assembly code

test_1                db 'hehehe$',14 dup(?),'23873824$'


进行了测试,在debug下可以正确输出hehehe 23873824,然而直接运行却只能看见23873824,请问为什么?

作者: ww884203   发布时间: 2011-12-27

那么我想让它可以运行和debug时一样的结果该怎么做呢?谢谢

作者: ww884203   发布时间: 2011-12-27

热门下载

更多