Architecture 06 Flashcards
1
Q
What are the key instruction groups?
A
- Data transfer (mov)
- Arithmetic (add, imul)
- Control flow (jumping to different place, ret)
- Logic (and, or, xor, not)
- Shift and rotate
- Comparisons (to set flags)
- ‘None of the above’
- Extensions
2
Q
What is meant by zero-extend?
A
When copying a short integer to a long integer, doubleword operations set higher 32 bits of 64 bit value to 0
3
Q
What is meant by sign-extend?
A
When copying a short integer to a long integer, some other mov instructions multiply the sign bit
4
Q
What is the ‘xchg’ instruction?
A
Instruction exchanges source and destination
5
Q
What is the ‘lea’ instruction?
A
“Load effective address” is like mov except that a computed address (rather than content of address) is put in the destination
6
Q
What is the difference between ‘mul’ and ‘imul’?
A
• ‘mul’ is unsigned
• ‘imul’ is signed
(Typically one operand involves rax)