编写一个程序来从键盘输入20个整数(范围-128至127),并计算其最大值
发布时间
阅读量:
阅读量
编写程序:通过键盘输入20个数值(范围为-128至127),计算并输出其中的最大值
include 一套工具.mac
data segment
show db "Please Input twenty numbers:$"
iit1 db "The $"
iit2 db " number is:$"
buf db 20 dup(?)
x db ?,?,?,? ;x[0]用来存负号
w db ? ;用于显示提示信息
max db ?
boundary db "128$"
display db "Max:$"
error1 db "Input error!<you can check whether it is between -128~127>",13,10,"Please Input again:$"
data ends
stack segment
stack ends
code segment
assume ds:data,cs:code,ss:stack
start:
m
全部评论 (0)
还没有任何评论哟~
