16位的数字高字节和低字节_掩盖8位数字的较低和较高半字节| 8085微处理器

16位的数字高字节和低字节

Problem statement:

问题陈述:

To mask lower and higher nibble of 8-bit number using 8085 Microprocessor.

使用8085微处理器掩盖8位数字的较低和较高半字节。

Algorithm:

算法:

  1. Load the content of accumulator A with an 8bit number.

    用8位数字加载累加器A的内容。

  2. Copy the content of accumulator to the register B.

    将累加器的内容复制到寄存器B中。

  3. Perform AND operation on the content of accumulator with 0F.

    用0F对累加器的内容执行AND操作。

  4. Store the result in a memory location.

    将结果存储在存储位置中。

  5. Copy the content of register B to the register accumulator.

    将寄存器B的内容复制到寄存器累加器。

  6. Perform AND operation on the content of accumulator with F0.

    用F0对累加器的内容执行AND操作。

  7. Perform RLC operation 4 times.

    进行4次RLC操作。

  8. 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位的数字高字节和低字节

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值