借位减指令_在8085微处理器中将两个8位数字相减而没有借位

借位减指令

Problem statement:

问题陈述:

To perform subtraction of two 8 bits numbers without borrows using 8085 microprocessor.

使用8085微处理器无需借位即可对两个8位数字进行减法运算。

Algorithm:

算法:

  1. Load the accumulator with the first data.

    向累加器加载第一个数据。

  2. Move data of accumulator to register B.

    将累加器的数据移至寄存器B。

  3. Load the second data into accumulator.

    将第二个数据加载到累加器中。

  4. Subtract the content of register B with the content of accumulator.

    用累加器的内容减去寄存器B的内容。

  5. Now load the result value in memory location.

    现在将结果值加载到内存位置。

Program:

程序:

    LDA     2050   
    MOV     B,A
    LDA     2051    
    SUB     B         
    STA     2052

Observation:

观察:

    INPUT: 
    2050:02
    2051:04

    OUTPUT: 
    2052:02

Hence, we successfully subtracted two 8 bits numbers.

因此,我们成功地减去了两个8位数字

翻译自: https://www.includehelp.com/embedded-system/subtraction-of-two-8-bits-number-without-borrow-in-8085-microprocessor.aspx

借位减指令

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值