.modelsmall
.stack4096
.data
bufferdb40
db10
db40DUP(?)
db\'$\'
stringdb40DUP(?),\'$\'
.code
.startup
callinstring
movbx,offsetbuffer
addbx,2
endcopy:;输出串
callnextline
movdx,offsetbuffer2
calloutstring;为什么没输出完整结果
.exit0
instringproc;输入字符串子程序
movdx,segbuffer
movds,dx
movdx,offsetbuffer
movah,0AH
int21H
callnextline
ret
instringendp
outstringproc;输出字符串子程序
movah,09H
movdx,offsetbuffer
int21H
ret
outstringendp
nextlineproc;回车换行子程序
movdl,13
movah,02H
int21H
movdl,10
movah,02H
int21H
ret
nextlineendp
end
|