借位减指令
Problem statement:
问题陈述:
To perform subtraction of two 8 bits numbers without borrows using 8085 microprocessor.
使用8085微处理器无需借位即可对两个8位数字进行减法运算。
Algorithm:
算法:
Load the accumulator with the first data.
向累加器加载第一个数据。
Move data of accumulator to register B.
将累加器的数据移至寄存器B。
Load the second data into accumulator.
将第二个数据加载到累加器中。
Subtract the content of register B with the content of accumulator.
用累加器的内容减去寄存器B的内容。
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位数字 。
借位减指令