16位的数字高字节和低字节
Problem statement:
问题陈述:
To mask lower and higher nibble of 8-bit number using 8085 Microprocessor.
使用8085微处理器掩盖8位数字的较低和较高半字节。
Algorithm:
算法:
Load the content of accumulator A with an 8bit number.
用8位数字加载累加器A的内容。
Copy the content of accumulator to the register B.
将累加器的内容复制到寄存器B中。
Perform AND operation on the content of accumulator with 0F.
用0F对累加器的内容执行AND操作。
Store the result in a memory location.
将结果存储在存储位置中。
Copy the content of register B to the register accumulator.
将寄存器B的内容复制到寄存器累加器。
Perform AND operation on the content of accumulator with F0.
用F0对累加器的内容执行AND操作。
Perform RLC operation 4 times.
进行4次RLC操作。
Terminate the program.
终止程序。
Program:
程序:
LDA 2051
MOV B, A
ANI 0F
STA 2052
MOV A, B
ANI F0
RLC
RLC
RLC
RLC
STA 2053
HLT
Observation:
观察:
INPUT:
2051:16
OUTPUT:
2052:06
2053:01
Hence, we successfully masked the lower and higher nibble of 8-bit number.
因此,我们成功地掩盖了8位数字的较低和较高的半字节 。
翻译自: https://www.includehelp.com/embedded-system/masking-of-lower-and-higher-nibble-of-8-bit-number.aspx
16位的数字高字节和低字节