

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Community
Ask the community for help and clear up your study doubts
Discover the best universities in your country according to Docsity users
Free resources
Download our free guides on studying techniques, anxiety management strategies, and thesis advice from Docsity tutors
Machine-Level Programming I: Basics - Study Notes
Typology: Study notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!
Lecture Overview
Intel Processor Evolution x86 Dominance:
Milestones:
Name | Year | Transistors | MHz | Notes |
---|---|---|---|---|
8086 | 1978 | 29K | 5-10 | First 16-bit, IBM PC & DOS |
386 | 1985 | 275K | 16-33 | 32-bit IA32, Unix support |
Pentium 4F | 2004 | 125M | 2800-3800 | First 64-bit x86-64 |
Core i7 | 2008 | 731M | 2667-3333 | Used in CMU labs |
IA vs Microarchitecture:
CPU Programmer's View:
From C to Machine Code:
Data Types:
Operations:
Registers:
IA32: %eax, %ebx, %ecx, %edx, %esi, %edi, %esp, %ebp x86-64: adds %r8-%r15 and extends others
Memory Addressing:
Example Swap Function (IA32): swap: pushl %ebp movl %esp, %ebp pushl %ebx movl 8(%ebp), %edx movl 12(%ebp), %ecx movl (%edx), %ebx movl (%ecx), %eax movl %eax, (%edx) movl %ebx, (%ecx) popl %ebx popl %ebp ret
x86-64 version: swap: movl (%rdi), %edx movl (%rsi), %eax movl %eax, (%rdi) movl %edx, (%rsi) ret
Disassembling:
Summary: