bcd码转换成ascii码
Problem statement:
问题陈述:
To convert ASCII to BCD 8-bit number using 8086 Microprocessor.
使用8086微处理器将ASCII转换为BCD 8位数字。
Algorithm:
算法:
Load the value from memory into register AL
将内存中的值加载到寄存器AL中
Then perform and operation on register AL with 0F
然后用0F对AL寄存器进行操作
Move the result value from register AL to memory
将结果值从寄存器AL移至存储器
Terminate the program
终止程序
Program:
程序:
MOV AL, [0600]
AND AL, 0F
MOV [0601], AL
HLT
Observation:
观察:
INPUT:
0600:35
OUTPUT:
0601:05
Hence we successfully converted 8 bit ASCII number to its equivalent BCD using 8086 Microprocessor.
因此,我们使用8086微处理器成功地将8位ASCII码转换为等效的BCD 。
翻译自: https://www.includehelp.com/embedded-system/convert-8-bit-ascii-to-bcd-number.aspx
bcd码转换成ascii码