There is a task:
Replace the combination 1011 in the given word with the combination 1101.
It is clear that there will be a cycle.
How can I apply to the lower 4 bits of an 8-bit register (for example, Al)?
How do I then replace the values?
There is a task:
Replace the combination 1011 in the given word with the combination 1101.
It is clear that there will be a cycle.
How can I apply to the lower 4 bits of an 8-bit register (for example, Al)?
How do I then replace the values?
If aligned to 4 bits, then you can do 4 checks without cycles, if at any offset, then save the original, set the mask to 110 (bin), do a cycle to 12 (dec), check for and $ 0f (hex) to equality 1011 (bin), if the xorim is equal to the mask with the original, then we shift using shr, for example, and the mask with shl and looping.
Source: https://ru.stackoverflow.com/questions/410923/
All Articles