汇编两数相减怎么判断进位_使用8086微处理器将两个16位数字相减而不带进位

汇编两数相减怎么判断进位

Problem statement:

问题陈述:

To perform subtraction operation between 2 16bit numbers without carry using 8086 Microprocessor.

使用8086微处理器在两个16位数字之间执行减法运算而无需进位。

Algorithm:

算法:

  1. Load the first data into register AX from memory.

    从存储器将第一个数据加载到寄存器AX中。

  2. Load the second data into register BX from memory.

    将第二个数据从内存加载到寄存器BX中。

  3. Subtract content of register BX with the content of register AX.

    用寄存器AX的内容减去寄存器BX的内容。

  4. Now load the result value from AX to memory.

    现在将结果值从AX加载到内存。

Program:

程序:

	MOV     AX, 2050
	MOV     BX, 2052
	SUB     AX, BX
	MOV     2054, AX
	HLT

Observation:

观察:

    INPUT: 
    2050:03
    2051:03
    2052:03
    2053:03 

    OUTPUT: 
    2052:00
    2053:00

Hence we successfully subtracted two 16 bits numbers without using carry.

因此,我们成功地减去了两个16位数字,而没有使用进位

翻译自: https://www.includehelp.com/embedded-system/subtraction-of-two-16-bits-numbers-without-carry-using-8086-microprocessor.aspx

汇编两数相减怎么判断进位

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值