要求一个0到35565之间的数字 [英] ask for a number from 0 - 35565
本文介绍了要求一个0到35565之间的数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
到目前为止这段代码是否正确?
so far is this code correct?
.model small
.data
message db "Enter a number: $"
message2 db " Enter another number $"
message3 db " + $"
Message4 db " = $"
.stack 100h
.code
newline proc
mov dl, 10
mov ah, 02h
int 21h
ret
newline endp
main proc
mov ax, @data
mov ds, ax
mov ax, seg message
mov ds, ax
mov dx, offset message
mov ah, 9h
int 21h
mov ah, 1h
int 21h
mov bl, al
sub bl, 30h
mov dl, bl
add dl, 30h
call newline
mov ah, 2h
int 21h
call newline
mov ax, 4c00h
int 21h
main endp
end main
当我运行这个程序时。我输入的数字和打印值都是彼此相邻的。为什么不打印行?
when i run this program. the number I entered and the printed value are both beside each other. why is the line not being printed???
推荐答案
message2 db 输入另一个数字
" message2 db " Enter another number
message3 db +
" message3 db " +
Message4 db =
" Message4 db " =
这篇关于要求一个0到35565之间的数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文