Step Into x64 Assembly · Lesson 2 · Registers & Arithmetic
Arithmetic
add, sub, imul, neg, lea as a calculator, and signed division with cqo and idiv.
- ~30 minreading and coding
- 4missions
- membersaccess
- x64 Assemblylanguage
Part of Step Into x64 Assembly. The full lesson, its missions and the real compiler and debugger are in the course. Try a free lesson first to see how it works.
Most x64 arithmetic instructions take two operands and store the result in the first:
In this lesson
- Two-operand arithmetic
- lea: the address calculator
- Overflow and flags
- Division
- Writing through a pointer argument
Missions
- Add three numbers
- A polynomial
- One lea
- Quotient and remainder