鱼C论坛

 找回密码
 立即注册
查看: 1944|回复: 1

求助如何用汇编写出比较两数大小指令

[复制链接]
发表于 2013-1-27 21:51:39 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
本帖最后由 ··。 于 2013-1-28 08:14 编辑

enter_num1:
output 'Enter a positive number'
input num1
load num1
jmplez re_enter_num1

enter_num2:
output 'Enter a positive number'
input num2
load num2
jmplez re_enter_num2

re_enter_num1:
output 'The first number is not positive. Re enter the firt number'
goto enter_num1


re_enter_num2:
output 'The second number is not positive. Re enter the firt number'
goto enter_num2

要求就是找出其中比较大的数(num1,num2 这两个数)
然后存到 内存地址为 MAX 上
哪位大神给解啊!!!:'(
自己解决了。。呵呵
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
发表于 2013-1-28 10:00:51 | 显示全部楼层
用cmp指令吧。
想知道小甲鱼最近在做啥?请访问 -> ilovefishc.com
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2024-10-7 22:29

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表