三位bcd加法计数器_两个8位BCD编号的加法| 8085微处理器
三位bcd加法計數器
Problem statement:
問題陳述:
To perform addition operation between two 8-bit BCD numbers using 8085 microprocessor.
使用8085微處理器在兩個8位BCD編號之間執行加法運算。
Algorithm:
算法:
Load the two numbers in HL pair register.
將這兩個數字加載到HL對寄存器中。
Store 00 on a register to calculate carry.
將00存儲在寄存器中以計算進位。
Move the content of register H to accumulator.
將寄存器H的內容移至累加器。
Add the content of accumulator with the content of register L.
將累加器的內容與寄存器L的內容相加。
Check if the sum is greater than 09 then add 06 to result.
檢查總和是否大于09,然后將06加到結果中。
If carry flag is equal to 0, goto step no 8 otherwise goto step no 7.
如果進位標志等于0,則轉到步驟8,否則轉到步驟7。
Increment the value of carry by 1.
將進位值增加1。
Store the result in memory.
將結果存儲在內存中。
Move the content from register to accumulator.
將內容從寄存器移到累加器。
Load the result in memory.
將結果加載到內存中。
Terminate the program.
終止程序。
Program:
程序:
LHLD 2050MVI C, 00MOV A, HADD LDAAJNC **INR C** STA 3050MOV A, CSTA 3051HLTObservation:
觀察:
INPUT: 2050:322051:77OUTPUT: 3050:013051:09Hence we successfully added two BCD number with carry.
因此,我們成功地將兩個BCD號碼加進了進位 。
翻譯自: https://www.includehelp.com/embedded-system/addition-of-two-8-bit-bcd-numbers-using-8085-microprocessor.aspx
三位bcd加法計數器
總結
以上是生活随笔為你收集整理的三位bcd加法计数器_两个8位BCD编号的加法| 8085微处理器的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: java 根据类名示例化类_Java L
- 下一篇: expm1_Java Math类静态do