Assembly Basics Preparation
Overview
It’s time to dive deeper under the hood and find out about what is between C and binary: assembly!
Basic Learning Objectives
Before class, you should be able to:
- Explain what registers are
 - List the parts of an instruction
 - Explain at a high-level how conditional control works in assembly
 
Advanced Learning Objectives
After class, you should be able to:
- Explain how registers are used during program execution
 - Explain how pointers relate to memory form operands
 - Interpret operands with constants, registers, and basic memory lookups
 
Resources
Read the following:
- DIS 7.0 64-bit x86 Assembly
 - DIS 7.1 Assembly Basics
 - DIS 7.2 Common Instructions
 - DIS 7.4 Conditional Control and Loops
 
Checks
Submit answers the following on Moodle.
- 
    
Given the following values in memory and registers:

Write the value of each of the following:
$0x31B0%rsi(%rdi)0x8(%rdi)(%rdi, %rsi)(%rdi, %rsi, 2)
 - 
    
Assuming
%rdxcontains0x32A0and%raxcontains0x8, what will both registers contain afteraddq %rdx %rax? - 
    
Assuming
rdxcontains0x6and%raxcontains0x8, what will both registers contain aftersubq %rdx %rax?