16位的数字高字节和低字节_显示8位数字的较低和较高半字节的掩蔽| 8086微处理器...

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

Problem: To show masking of lower and higher nibbles of 8-bit number using 8086 Microprocessor.

问题:使用8086微处理器显示8位低半字节和高半字节的屏蔽。

Assumption:

假设:

  • Number is stored at memory location 0600.

    编号存储在内存位置0600。

  • Result will be stored at memory location 0601 and 0602.

    结果将存储在存储器位置0601和0602。

Algorithm:

算法:

  1. Load first number to the register AL.

    将第一个数字加载到寄存器AL中。

  2. Move the content of register AL to register BL.

    将寄存器AL的内容移至寄存器BL。

  3. Apply AND operation on register AL with 0F.

    对0F的AL寄存器进行AND运算。

  4. Now Apply AND operation on register BL with F0.

    现在,用F0对AND BL进行AND操作。

  5. Rotate the content of register BL 4 times.

    将寄存器BL的内容旋转4次。

  6. Now move the content of register AL to memory location [0601].

    现在将寄存器AL的内容移动到存储器位置[0601]。

  7. Now move the content of register BL to memory location [0602].

    现在将寄存器BL的内容移至存储位置[0602]。

  8. Terminate the program.

    终止程序。

Program:

程序:

	MOV     AL, [0600]
	MOV     BL, AL
	AND     AL, 0F
	AND     BL, F0
	MOV     CL, 04
	ROR     BL, CL
	MOV     [0601], AL
	MOV     [0602], BL
	HLT

Observation:

观察:

    INPUT:
    0600: 12

    OUTPUT:
    0601:02
    0602:01

Hence, we successfully masked the higher and lower nibble of an 8-bit number using 8086 Microprocessor.

因此,我们使用8086微处理器成功掩盖了8位数字的高半字节和低半字节

翻译自: https://www.includehelp.com/embedded-system/show-masking-of-lower-and-higher-nibbles-of-8-bit-number.aspx

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

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

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值