COMP 2003: Assembly Language and Digital Logic Chapter 0: Some Background Notes by Neil Dickson
Purposes of the Course Learn how modern computers work from a software perspective Learn about the basics of computer architecture
Behold, The Computer CPURAM I/O Devices the focus of this course a huge can of worms
Memory (RAM) Data in memory is whatever you use it as hFFFFFFFFh Bh
CPU Execution 1.Reads data from memory representing machine code instruction (fetch) 2.Interprets the machine code (decode) 3.Reads data from registers or memory to be operated on (load) 4.Performs the operation specified by the instruction (execute) 5.Writes results to registers or memory (store)
CPU State (32-bit x86) eax ebx ecx edx esp ebp esi edi eflags eip General Registers Special Registers 4 Cache Levels (primary, L1, L2, L3) Things relevant for now Things not relevant until later on Translation Lookaside Buffers (TLBs) cr0 cr2 cr3 cr4 Control Registers st0 st2 st3 st4 FPU Registers st1 st5 st6 st7 xmm0 xmm2 xmm3 xmm4 SSE Registers xmm1 xmm5 xmm6 xmm7 gdtr ldtr idtr trcw sw tw mxcsr MTRRs MSRs Miscellaneous Other Stuff
What is Assembly Language? A programmer-readable representation of machine code
Why Use Assembly Language? To learn how your software actually works under the hood Performance Operating Systems Embedded Systems
Things you’ll need Inventor IDE, an assembly editor created for this course ( Assembly Language Video Tutorial, a fast, easy way to learn assembly for doing graphics (