O'Reilly logo

Windows Debugging: Practical Foundations by Dmitry Vostokov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Logical Instructions and EIP

Instruction Format

We have seen that assembly language instructions have uniform format:

Opcode operand
Opcode destination_operand, source_operand

Operands can be registers (reg), memory reference (mem) or some number, called immediate value (imm). Typical notational examples:

inc mem/reg
dec mem/reg
add mem/reg, reg/imm
add reg, mem/imm

and some concrete assembly language examples:

inc dword ptr [eax]
dec byte ptr [a]
add byte ptr [eax], 10
add eax, dword ptr [a]

Logical Shift Instructions

In addition to arithmetic instructions there are so called logical shift instructions that just shift a bit string to the left or to the right.

Shift to the left:

11111111 -> 11111110 ; shift by 1 11111110 -> 11110000 ; shift by ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required