fa25-cs354 cs354assemblyregisterscontrol-flow
W09 W09
Content locked
The catalog is public. Reading this content requires approved access.
Sign in to readWeek 09 Objectives
Midterm Exam 2
This Week
Read before Next Week
This Week Assignments
C, Assembly, & Machine Code
C
Assembly (ASM)
Machine Code (MC)
Low-Level View of Data
C’s View
Machine’s View
Assembly Data Formats
Registers
What? Registers
General Registers
Program Counter (PC)
Condition Code Registers
Operand Specifiers
What? Operand specifiers are
Why?
How?
Operands Practice
Instructions - MOV, PUSH, POP
What?
Why?
How?
Practice with Data Formats
Operand/Instruction Caveats
Missing Combination?
Instruction Oops!
Instruction - LEAL
Load Effective Address
LEAL vs. MOV
LEAL Simple Math
Instructions - Arithmetic and Shift
Unary Operations
Binary Operations
Shift Operations
Instructions - CMP and TEST, Condition Codes
What?
Why?
How?
Condition Codes (CC)
Instructions - SET
What?
How?
Example: a < b
Instructions - Jumps
What?
Why?
How? Unconditional Jump
How? Conditional Jumps
Encoding Targets
What?
Absolute Encoding
Solution? RELATIVE ENCODING
Converting Loops
do-while loop
while loop
for loop