Common Instructions Flashcards
What does “ADD op1, op2” mean?
Add operand 1 and operand 2 together and store in operand 1.
What does “SUB op1, op2” mean?
Subtract operand 2 from operand 1 and store in operand 1.
What values can be operands be in the ADD/SUB instructions?
Registers, memory locations (limited to one) or constant values.
What common instruction can be used to zero out a register?
XOR EAX, EAX (when EAX is the register that needs zeroing)
Which instruction is used to increment a value?
INC op1
Which instruction is used to decrement a value?
DEC op1
What does the CMP instruction do? i.e CMP op1, op2
It compares the two specified operands and sets the appropriate EFLAGS values
Which values are used to react to conditional jumps (i.e JZ, JE etc)
The EFLAGS values
If a register is wrapped in square brackets, what does this mean? i.e [EAX]
[EAX] refers to the value stored at the memory address of EAX, not the value of EAX.