js数字最多保留两位小数
Problem statement:
问题陈述:
To find maximum of two 8bit numberusing 8085 microprocessor.
使用8085微处理器查找最多两个8位数字。
Algorithm:
算法:
Load the accumulator with the first data.
向累加器加载第一个数据。
Move the content of accumulator to register B.
将累加器的内容移至寄存器B。
Load the accumulator with the second data.
向累加器加载第二个数据。
Compare the content of accumulator with the content of register B.
将累加器的内容与寄存器B的内容进行比较。
If carry flag is reset then jump to the step 7.
如果进位标志被重置,则跳至步骤7。
Copy the content to accumulator.
将内容复制到累加器。
Now load the result value in memory location from accumulator.
现在,将结果值从累加器加载到存储器位置。
Program:
程序:
LDA 2050
MOV B, A
LDA 2051
CMP
JNC **
MOV A, B
** STA 2052
Observation:
观察:
INPUT:
2050:05
2051:02
OUTPUT:
2052:05
Hence, we successfully find the maximum among two 8 bits numbers.
因此,我们成功地在两个8位数字中找到最大值 。
翻译自: https://www.includehelp.com/embedded-system/maximum-of-two-8-bits-number-in-8085-microprocessor.aspx
js数字最多保留两位小数