- Moving Data: IA32
- movx Source, Dest
- x is one of {b(1-byte), w(2-byte), l(4-byte)}
- Operand Types
- Immediate: Constant integer data
- Example: $0x400, $-533
- Like C constant, but prefixed with‘$’
- Register; one of 8 integer registers
- Example: %eax, %edx
- But %esp and %ebp reserved for special use
- Memory: 4 consecutive bytes of memory at address given by register
- Simplest example: (%eax)
- Various other “address modes”
Memory Addressing Modes: Basic
- Indirect (R) Mem[Reg[R]]
- Displacement D(R) Mem[Reg[R]+D]
Conditionals and Control Flow Loops Switch Statements