Common Instructions Flashcards

1
Q

What does “ADD op1, op2” mean?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does “SUB op1, op2” mean?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

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

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which instruction is used to increment a value?

A

INC op1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Which instruction is used to decrement a value?

A

DEC op1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

A

The EFLAGS values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly