在8086组装大型二进制变化? [英] Large binary shifts in 8086 assembly?

查看:166
本文介绍了在8086组装大型二进制变化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有数据的二进制块512字节长,我想知道最有效的方法是什么,如果我想一旦转移它的权利。

I have a binary chunk of data 512 bytes long, I was wondering what the most efficient way would be if I wanted to shift it once to the right.

我最好的猜测,现在(很新的组装)将是我必须首先检查一大块(可能INT),看看它会移出,移位,然后携带无论previous INT会已经移出,并继续执行这一转变下的数据。是否有更简单的方法?如果非要用这种套利方法,什么是我可以转移最大的一块?双字?四字?

My best guess right now (very new to assembly) would be that I would have to first check a chunk (probably int) to see what it would shift out, shift, then carry in whatever the previous int would have shifted out and proceed carrying this shift down the data. Is there an easier way? If I have to use this carry technique, what's the largest chunk I can shift? DWord? QWord?

推荐答案

如果你只是想转移一次,使用旋转,通过携带的指令。

If you just want to shift once, use the rotate-through-carry instructions.

首先,确保进位标志为零。然后:

First, make sure the carry flag is zero. Then:


  1. 拉4个字节到寄存器

  2. RCR

  3. 写回

  4. 下一个4字节重复

这篇关于在8086组装大型二进制变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆