Assembly Language Alan L Cox alcrice edu Some
Assembly Language Alan L. Cox alc@rice. edu Some slides adapted from CMU 15. 213 slides
Objectives Be able to read simple x 86 -64 assembly language programs Cox Assembly 2
Why Learn Assembly Language? You’ll probably never write a complete program in assembly w With a few exceptions, modern compilers are much better at writing assembly than you are But, understanding assembly is key to understanding the machine-level execution model w Behavior of programs in presence of bugs • High-level language model breaks down w Tuning program performance • Understanding sources of program inefficiency w Implementing system software • Compiler has machine code as target • Operating systems must manage process state Cox Assembly 3
Assembly Language One assembly instruction w Straightforward translation to a group of machine language bits that describe one instruction What do these instructions do? w Same kinds of things as high-level languages! • Arithmetic & logic – Core computation • Data transfer – Copying data between memory locations and/or registers • Control transfer – Changing which instruction is next Cox Assembly 4
Assembly Language (cont. ) But, assembly language has additional features: w Pseudo-instructions = special directives to the assembler • For example, distinguish instructions from data w Labels = names for program control points or data storage • For example, the starting address of a function (instructions) or a string (data) w Macros = user-definable abbreviations for code & constants • Like #define in C Cox Assembly 5
Example C Program main. c: #include <stdio. h> Run the command: void hello(char *name, int hour, int min) { UNIX% cc -S main. c printf("Hello, %s, it's %d: %02 d. ", name, hour, min); } Output a file named main. s containing the assembly code for main. c int main(void) { hello(“Alan", 2, 55); return (0); } Cox Assembly 6
C Compiler’s Output. file "main. c". section. rodata call leave ret . LC 0: . string "Hello, %s, it's %d: %02 d. ". text. globl hello. type hello, @function hello: . LFB 2: pushq %rbp. LCFI 0: movq %rsp, %rbp. LCFI 1: subq $16, %rsp. LCFI 2: movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl -16(%rbp), %ecx movl -12(%rbp), %edx movq -8(%rbp), %rsi movl $. LC 0, %edi movl $0, %eax Cox Assembly printf . LFE 2: . size hello, . -hello. section. rodata. LC 1: . string "Alan". text. globl main. type main, @function main: . LFB 3: pushq %rbp. LCFI 3: movq %rsp, %rbp. LCFI 4: movl $55, %edx movl $2, %esi movl $. LC 1, %edi call hello movl $0, %eax <. . snip. . > 7
A Breakdown of the Output call leave ret . file "main. c". section. rodata. LC 0: . string "Hello, %s, it's %d: %02 d. ". text. globl hello. type hello, @function hello: . LFB 2: pushq %rbp. LCFI 0: movq %rsp, %rbp. LCFI 1: subq $16, %rsp. LCFI 2: movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl -16(%rbp), %ecx movl -12(%rbp), %edx movq -8(%rbp), %rsi movl $. LC 0, %edi movl $0, %eax Cox Assembly printf . LFE 2: . size <. . snip. . > hello, . -hello Instructions, Pseudo-Instructions, & Label Definitions 8
Instructions: Opcodes call leave ret . file "main. c". section. rodata. LC 0: . string "Hello, %s, it's %d: %02 d. ". text. globl hello. type hello, @function hello: . LFB 2: pushq %rbp. LCFI 0: movq %rsp, %rbp. LCFI 1: subq $16, %rsp. LCFI 2: movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl -16(%rbp), %ecx movl -12(%rbp), %edx movq -8(%rbp), %rsi movl $. LC 0, %edi movl $0, %eax Cox Assembly printf . LFE 2: . size <. . snip. . > hello, . -hello Arithmetic, data transfer, & control transfer 9
Instructions: Operands call leave ret . file "main. c". section. rodata. LC 0: . string "Hello, %s, it's %d: %02 d. ". text. globl hello. type hello, @function hello: . LFB 2: pushq %rbp. LCFI 0: movq %rsp, %rbp. LCFI 1: subq $16, %rsp. LCFI 2: movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl -16(%rbp), %ecx movl -12(%rbp), %edx movq -8(%rbp), %rsi movl $. LC 0, %edi movl $0, %eax Cox Assembly printf . LFE 2: . size <. . snip. . > hello, . -hello Registers, constants, & labels 10
Instruction Set Architecture Contract between programmer and the hardware w Defines visible state of the system w Defines how state changes in response to instructions Assembly Programmer (compiler) w ISA is model of how a program will execute Hardware Designer w ISA is formal definition of the correct way to execute a program Cox Assembly 11
Architecture vs. Implementation Instruction Set Architecture w Programmer visible elements of computer system w Defines what a computer system does in response to a program and a set of data Implementation w Defines how a computer does it w Sequence of steps to complete operations w Time to execute each operation w Hidden “bookkeeping” functions Cox Assembly 12
Often Many Implementations of an ISA Implementations Intel Core i 7 -9 x 00 x 86 -64 AMD Ryzen 7 3 x 00 VIA Nano (2008) ARMv 8 Cox Apple A 13 Bionic Amazon Graviton 2 Assembly 13
Why separate architecture and implementation? Compatibility w VAX architecture: mainframe single chip w ARM: 20 x performance range • high vs. low performance, power, price Longevity w 20 -30 years of ISA w x 86/x 86 -64 many generations of implementations (architecture families) w Retain software investment w Amortize development costs over multiple markets Cox Assembly 14
Instruction Set Basics Instruction formats Instruction types Addressing modes Mem instruction Op Mode Ra Rb PC Regs Mem Data types Operations PC Regs After State Before State Machine state Memory organization Register organization Cox Assembly 15
Typical Machine State CPU General. Purpose Registers ALU, FPU, … Memory Special-Purpose Registers Cox Assembly 16
general purpose Integer Registers (IA 32) Cox Origin (mostly obsolete) %eax %ah %al accumulate %ecx %ch %cl counter %edx %dh %dl data %ebx %bh %bl base %esi %si source index %edi %di destination index %esp %ebp %bp stack pointer base pointer Assembly 16 -bit virtual registers (backwards compatibility) 17
Moving Data: IA 32 Moving Data movl Source, Dest: %eax %ecx %edx %ebx %esi Operand Types w Immediate: Constant integer data • Example: $0 x 400, $-533 %edi • Like C constant, but prefixed with ‘$’ • Encoded with 1, 2, or 4 bytes %esp %ebp w Register: One of 8 integer registers • Example: %eax, %edx • But %esp and %ebp reserved for special use • Others have special uses for particular instructions w Memory: 4 consecutive bytes of memory at address given by register • Simplest example: (%eax) Cox • Various other “address modes” Assembly 18
movl Operand Combinations Source movl Dest Src, Dest C Analog Imm Reg movl $0 x 4, %eax Mem movl $-147, (%eax) temp = 0 x 4; Reg movl %eax, %edx Mem movl %eax, (%edx) temp 2 = temp 1; Mem Reg temp = *p; movl (%eax), %edx *p = -147; *p = temp; Cannot do memory-memory transfer with a single instruction Cox Assembly 19
Simple Memory Addressing Modes Normal (R) Mem[Reg[R]] w Register R specifies memory address movl (%ecx), %eax Displacement D(R) Mem[Reg[R]+D] w Register R specifies start of memory region w Constant displacement D specifies offset movl 8(%ebp), %edx Cox Assembly 20
Using Simple Addressing Modes void swap(int *xp, int *yp) { int t 0 = *xp; int t 1 = *yp; *xp = t 1; *yp = t 0; } Cox swap: pushl %ebp movl %esp, %ebp pushl %ebx movl movl 8(%ebp), %edx 12(%ebp), %ecx (%edx), %ebx (%ecx), %eax, (%edx) %ebx, (%ecx) popl ret %ebx %ebp Assembly Set Up Body Finish 21
Using Simple Addressing Modes void swap(int *xp, int *yp) { int t 0 = *xp; int t 1 = *yp; *xp = t 1; *yp = t 0; } swap: pushl %ebp movl %esp, %ebp pushl %ebx movl movl 8(%ebp), %edx 12(%ebp), %ecx (%edx), %ebx (%ecx), %eax, (%edx) %ebx, (%ecx) popl %ebx popl %ebp ret Cox Assembly Set Up Body Finish 22
Understanding Swap void swap(int *xp, int *yp) { int t 0 = *xp; int t 1 = *yp; Offset *xp = t 1; *yp = t 0; } Register %edx %ecx %ebx %eax Cox Value xp yp t 0 t 1 • • • movl movl 12 yp 8 xp 4 Rtn adr 0 Old %ebp -4 Old %ebx %esp 8(%ebp), %edx 12(%ebp), %ecx (%edx), %ebx (%ecx), %eax, (%edx) %ebx, (%ecx) Assembly Stack (in memory) # # # edx ecx ebx eax *xp *yp = = = xp yp *xp (t 0) *yp (t 1) t 1 t 0 23
Understanding Swap 123 Address 0 x 124 456 0 x 120 0 x 11 c %eax Offset %edx %ecx %ebx %esi 12 0 x 120 0 x 110 xp 8 0 x 124 0 x 10 c 4 Rtn adr 0 x 108 0 0 x 104 -4 %esp Cox 0 x 114 yp %ebp %edi %ebp 0 x 118 0 x 104 movl movl 8(%ebp), %edx 12(%ebp), %ecx (%edx), %ebx (%ecx), %eax, (%edx) %ebx, (%ecx) Assembly # # # 0 x 100 edx ecx ebx eax *xp *yp = = = xp yp *xp (t 0) *yp (t 1) t 1 t 0 24
Understanding Swap 123 Address 0 x 124 456 0 x 120 0 x 11 c %eax %edx Offset 0 x 124 %ecx %ebx %esi 12 0 x 120 0 x 110 xp 8 0 x 124 0 x 10 c 4 Rtn adr 0 x 108 0 0 x 104 -4 %esp Cox 0 x 114 yp %ebp %edi %ebp 0 x 118 0 x 104 movl movl 8(%ebp), %edx 12(%ebp), %ecx (%edx), %ebx (%ecx), %eax, (%edx) %ebx, (%ecx) Assembly # # # 0 x 100 edx ecx ebx eax *xp *yp = = = xp yp *xp (t 0) *yp (t 1) t 1 t 0 25
Understanding Swap 123 Address 0 x 124 456 0 x 120 0 x 11 c %eax %edx 0 x 124 %ecx 0 x 120 Offset %ebx %esi 12 0 x 120 0 x 110 xp 8 0 x 124 0 x 10 c 4 Rtn adr 0 x 108 0 0 x 104 -4 %esp Cox 0 x 114 yp %ebp %edi %ebp 0 x 118 0 x 104 movl movl 8(%ebp), %edx 12(%ebp), %ecx (%edx), %ebx (%ecx), %eax, (%edx) %ebx, (%ecx) Assembly # # # 0 x 100 edx ecx ebx eax *xp *yp = = = xp yp *xp (t 0) *yp (t 1) t 1 t 0 26
Understanding Swap 123 Address 0 x 124 456 0 x 120 0 x 11 c %eax %edx 0 x 124 %ecx 0 x 120 %ebx Offset 123 %esi 12 0 x 120 0 x 110 xp 8 0 x 124 0 x 10 c 4 Rtn adr 0 x 108 0 0 x 104 -4 %esp Cox 0 x 114 yp %ebp %edi %ebp 0 x 118 0 x 104 movl movl 8(%ebp), %edx 12(%ebp), %ecx (%edx), %ebx (%ecx), %eax, (%edx) %ebx, (%ecx) Assembly # # # 0 x 100 edx ecx ebx eax *xp *yp = = = xp yp *xp (t 0) *yp (t 1) t 1 t 0 27
Understanding Swap 123 Address 0 x 124 456 0 x 120 0 x 11 c %eax 456 %edx 0 x 124 %ecx 0 x 120 %ebx Offset 123 %esi 12 0 x 120 0 x 110 xp 8 0 x 124 0 x 10 c 4 Rtn adr 0 x 108 0 0 x 104 -4 %esp Cox 0 x 114 yp %ebp %edi %ebp 0 x 118 0 x 104 movl movl 8(%ebp), %edx 12(%ebp), %ecx (%edx), %ebx (%ecx), %eax, (%edx) %ebx, (%ecx) Assembly # # # 0 x 100 edx ecx ebx eax *xp *yp = = = xp yp *xp (t 0) *yp (t 1) t 1 t 0 28
Understanding Swap 456 Address 0 x 124 456 0 x 120 0 x 11 c %eax 456 %edx 0 x 124 %ecx 0 x 120 %ebx Offset 123 %esi 12 0 x 120 0 x 110 xp 8 0 x 124 0 x 10 c 4 Rtn adr 0 x 108 0 0 x 104 -4 %esp Cox 0 x 114 yp %ebp %edi %ebp 0 x 118 0 x 104 movl movl 8(%ebp), %edx 12(%ebp), %ecx (%edx), %ebx (%ecx), %eax, (%edx) %ebx, (%ecx) Assembly # # # 0 x 100 edx ecx ebx eax *xp *yp = = = xp yp *xp (t 0) *yp (t 1) t 1 t 0 29
Understanding Swap 456 Address 0 x 124 123 0 x 120 0 x 11 c %eax 456 %edx 0 x 124 %ecx 0 x 120 %ebx Offset 123 %esi 12 0 x 120 0 x 110 xp 8 0 x 124 0 x 10 c 4 Rtn adr 0 x 108 0 0 x 104 -4 %esp Cox 0 x 114 yp %ebp %edi %ebp 0 x 118 0 x 104 movl movl 8(%ebp), %edx 12(%ebp), %ecx (%edx), %ebx (%ecx), %eax, (%edx) %ebx, (%ecx) Assembly # # # 0 x 100 edx ecx ebx eax *xp *yp = = = xp yp *xp (t 0) *yp (t 1) t 1 t 0 30
Complete Memory Addressing Modes Most General Form D(Rb, Ri, S) Mem[Reg[Rb]+S*Reg[Ri]+D] w D: Constant “displacement” 1, 2, or 4 bytes w Rb: Base register: Any of 8 integer registers w Ri: Index register: Any, except for %esp • Unlikely you’d use %ebp, either w S: Scale: 1, 2, 4, or 8 (why these numbers? ) Special Cases (Rb, Ri) D(Rb, Ri) (Rb, Ri, S) Cox Mem[Reg[Rb]+Reg[Ri]] Mem[Reg[Rb]+Reg[Ri]+D] Mem[Reg[Rb]+S*Reg[Ri]] Assembly 31
Quiet Please! It’s time to start … Cox Memory Allocation 32
The 64 -bit Evolution The x 86 -64 Instruction Set Architecture w Original specification by AMD in 2000 • Maintained backward compatibility with IA 32 w First implementation by AMD (“Opteron”) in 2003 w First Intel implementation in 2004 Notable changes to the visible machine state w A larger 247 -byte address space for applications • 64 -bit pointers to hold these larger addresses w Extended integer register set Notable changes to the instructions w “Position-independent code” • Memory addressing modes can use the program counter (%rip) to compute the address of data Cox Assembly 33
x 86 -64 Integer Registers %rax %eax %r 8 d %rbx %ebx %r 9 d %rcx %ecx %r 10 d %rdx %edx %r 11 d %rsi %esi %r 12 d %rdi %edi %r 13 d %rsp %esp %r 14 d %rbp %ebp %r 15 d w Extend existing registers. Add 8 new ones. Cox w Make %ebp/%rbp general purpose Assembly 34
Instructions Long word l (4 Bytes) ↔ Quad word q (8 Bytes) New instructions: w movl ➙ movq w addl ➙ addq w sall ➙ salq w etc. 32 -bit instructions that generate 32 -bit results w Set higher order bits of destination register to 0 w Example: addl Cox Assembly 35
32 -bit code for swap void swap(int *xp, int *yp) { int t 0 = *xp; int t 1 = *yp; *xp = t 1; *yp = t 0; } Cox swap: pushl %ebp movl %esp, %ebp pushl %ebx movl movl 8(%ebp), %edx 12(%ebp), %ecx (%edx), %ebx (%ecx), %eax, (%edx) %ebx, (%ecx) popl ret %ebx %ebp Assembly Set Up Body Finish 36
64 -bit code for swap void swap(int *xp, int *yp) { int t 0 = *xp; int t 1 = *yp; *xp = t 1; *yp = t 0; } swap: movl (%rdi), %edx (%rsi), %eax, (%rdi) %edx, (%rsi) ret Set Up Body Finish Operands passed in registers (why useful? ) w First (xp) in %rdi, second (yp) in %rsi w 64 -bit pointers No stack operations required 32 -bit data w Data held in registers %eax and %edx w Cox movl operation Assembly 37
64 -bit code for long int swap_l: void swap_l(long *xp, long *yp) { long t 0 = *xp; long t 1 = *yp; *xp = t 1; *yp = t 0; } movq (%rdi), %rdx (%rsi), %rax, (%rdi) %rdx, (%rsi) ret Set Up Body Finish 64 -bit data w Data held in registers %rax and %rdx w movq operation • “q” stands for quad-word Cox Assembly 38
Application Binary Interface (ABI) Standardizes the use of memory and registers by C compilers w Enables interoperability of code compiled by different C compilers • E. g. , a program compiled with Intel’s optimizing C compiler can call a library function that was compiled by the GNU C compiler w Sets the size of built-in data types • E. g. , int, long, etc. w Dictates the implementation of function calls • E. g. , how parameters and return values are passed Cox Assembly 39
Register Usage The x 86 -64 ABI specifies that registers are used as follows w Temporary (callee can change these) %rax, %r 10, %r 11 w Parameters to function calls %rdi, %rsi, %rdx, %rcx, %r 8, %r 9 w Callee saves (callee can only change these after saving their current value) %rbx, %rbp, %r 12 -%r 15 – %rbp is typically used as the “frame” pointer to the current function’s local variables w Return values %rax, %rdx Cox Assembly 40
Procedure Calls and the Stack 0 x 7 FFFFFF Where are local variables stored? Unused %rsp Stack w Registers (only 16) w Stack provides as much local storage as necessary Shared Libraries w Until memory exhausted w Each procedure allocates its own space on the stack Heap Referencing the stack w %rsp points to the bottom Read/Write Data Read-only Code and Data of the stack in x 86 -64 Unused 0 x 000000 Cox Assembly 41
Control Flow: Function Calls What must assembly/machine language do? Caller 1. 2. Callee Save function arguments Branch to function body 3. Execute body • • 4. 5. May allocate memory May call functions Save function result Branch to where called 1. 3. 4. 5. 2. Use registers sub %rax ret call%rsp (jump to %rdi, to create procedure, %rsi, newetc. , stack save then frame return stacklocation on stack) Cox Assembly 42
Program Stack Figure 3. 3 is reproduced from the AMD 64 ABI Draft 0. 99. 5 by Matz et al. Cox Assembly 43
What are Pseudo-Instructions? Assembler directives, with various purposes Data & instruction encoding: w Separate instructions & data into sections w Reserve memory with initial data values w Reserve memory w/o initial data values w Align instructions & data Provide information useful to linker or debugger w Correlate source code with assembly/machine w … Cox Assembly 44
Instructions & Pseudo-Instructions call leave ret . file "main. c". section. rodata. LC 0: . string "Hello, %s, it's %d: %02 d. ". text. globl hello. type hello, @function hello: . LFB 2: pushq %rbp. LCFI 0: movq %rsp, %rbp. LCFI 1: subq $16, %rsp. LCFI 2: movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl -16(%rbp), %ecx movl -12(%rbp), %edx movq -8(%rbp), %rsi movl $. LC 0, %edi movl $0, %eax Cox Assembly printf . LFE 2: . size <. . snip. . > hello, . -hello Instructions, Pseudo-Instructions, & Label Definitions Separate instructions & data 45
Instructions & Pseudo-Instructions call leave ret . file "main. c". section. rodata. LC 0: . string "Hello, %s, it's %d: %02 d. ". text. globl hello. type hello, @function hello: . LFB 2: pushq %rbp. LCFI 0: movq %rsp, %rbp. LCFI 1: subq $16, %rsp. LCFI 2: movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl -16(%rbp), %ecx movl -12(%rbp), %edx movq -8(%rbp), %rsi movl $. LC 0, %edi movl $0, %eax Cox Assembly printf . LFE 2: . size <. . snip. . > hello, . -hello Instructions, Pseudo-Instructions, & Label Definitions Reserve memory with initial data values 46
Instructions & Pseudo-Instructions call leave ret . file "main. c". section. rodata. LC 0: . string "Hello, %s, it's %d: %02 d. ". text. globl hello. type hello, @function hello: . LFB 2: pushq %rbp. LCFI 0: movq %rsp, %rbp. LCFI 1: subq $16, %rsp. LCFI 2: movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl -16(%rbp), %ecx movl -12(%rbp), %edx movq -8(%rbp), %rsi movl $. LC 0, %edi movl $0, %eax Cox Assembly printf . LFE 2: . size <. . snip. . > hello, . -hello Instructions, Pseudo-Instructions, & Label Definitions Correlate source code with assembly/machine 47
Label Types call leave ret . file "main. c". section. rodata. LC 0: . string "Hello, %s, it's %d: %02 d. ". text. globl hello. type hello, @function hello: . LFB 2: pushq %rbp. LCFI 0: movq %rsp, %rbp. LCFI 1: subq $16, %rsp. LCFI 2: movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl -16(%rbp), %ecx movl -12(%rbp), %edx movq -8(%rbp), %rsi movl $. LC 0, %edi movl $0, %eax Cox Assembly printf . LFE 2: . size <. . snip. . > hello, . -hello Definitions, internal references, & external references The label’s value is the address of the subsequent instruction or pseudoinstruction 48
Assembly/Machine Language – Semantics Basic model of execution w Fetch instruction, from memory @ PC w Increment PC w Decode instruction w Fetch operands, from registers or memory w Execute operation w Store result(s), in registers or memory Cox Assembly 49
Simulate Program Execution. file "main. c". section. rodata call leave ret . LC 0: . string "Hello, %s, it's %d: %02 d. ". text. globl hello. type hello, @function hello: . LFB 2: pushq %rbp. LCFI 0: movq %rsp, %rbp. LCFI 1: subq $16, %rsp. LCFI 2: movq %rdi, -8(%rbp) movl %esi, -12(%rbp) movl %edx, -16(%rbp) movl -16(%rbp), %ecx movl -12(%rbp), %edx movq -8(%rbp), %rsi movl $. LC 0, %edi movl $0, %eax Cox Assembly printf . LFE 2: . size hello, . -hello. section. rodata. LC 1: . string "Alan". text. globl main. type main, @function main: . LFB 3: pushq %rbp. LCFI 3: movq %rsp, %rbp. LCFI 4: movl $55, %edx movl $2, %esi movl $. LC 1, %edi call hello movl $0, %eax <. . next slide. . > 50
Simulate Program … (cont. ) movl leave ret $0, %eax . LFE 3: . size <. . snip. . > Cox main, . -main Assembly 51
Exercise 0 x 70000088 0 x 70000084 0 x 70000080 0 x 7000007 c 0 x 70000078 0 x 70000074 0 x 70000070 0 x 7000006 c 0 x 70000068 0 x 70000064 0 x 70000060 0 x 7000005 c 0 x 70000058 0 x 70000054 0 x 70000050 0 x 7000004 c 0 x 70000048 0 x 70000044 0 x 70000040 0 x 7000003 c 0 x 70000038 0 x 70000034 0 x 70000030 0 x 7000002 c 0 x 70000028 0 x 70000024 0 x 70000020 0 x 7000001 c 0 x 70000018 0 x 70000014 0 x 70000010 0 x 700000 c 0 x 7000008 0 x 7000004 0 x 7000000 Cox initial values: ` %rbp 0 x 70000088 %rsp 0 x 7000006 c . LC 0 0 x 408280 . LC 1 0 x 408400 &”movl $0, %eax” in main() == 0 x 400220 %rbp %rsp ` %rdi %rsi %edi %esi %eax %rax %ecx %rcx %edx %rdx Assembly 52
More x 86 -64 Assembly Chapter 3 of the textbook explains x 86 and x 86 -64 assembly in greater detail w More examples translated from C w More detail than you’re expected to know for this course Some code sequences generated by the compiler can still be confusing w Usually not important for this class (web is helpful if you are still curious) Cox Assembly 53
Next Time Program Linking Cox Assembly 54
- Slides: 54