Common Instructions Flashcards Preview

Assembly x86 > Common Instructions > Flashcards

Flashcards in Common Instructions Deck (9)
Loading flashcards...
1
Q

What does “ADD op1, op2” mean?

A

Add operand 1 and operand 2 together and store in operand 1.

2
Q

What does “SUB op1, op2” mean?

A

Subtract operand 2 from operand 1 and store in operand 1.

3
Q

What values can be operands be in the ADD/SUB instructions?

A

Registers, memory locations (limited to one) or constant values.

4
Q

What common instruction can be used to zero out a register?

A

XOR EAX, EAX (when EAX is the register that needs zeroing)

5
Q

Which instruction is used to increment a value?

A

INC op1

6
Q

Which instruction is used to decrement a value?

A

DEC op1

7
Q

What does the CMP instruction do? i.e CMP op1, op2

A

It compares the two specified operands and sets the appropriate EFLAGS values

8
Q

Which values are used to react to conditional jumps (i.e JZ, JE etc)

A

The EFLAGS values

9
Q

If a register is wrapped in square brackets, what does this mean? i.e [EAX]

A

[EAX] refers to the value stored at the memory address of EAX, not the value of EAX.