comp 2003: assembly language and digital logic chapter 0: some background notes by neil dickson
TRANSCRIPT
![Page 1: COMP 2003: Assembly Language and Digital Logic Chapter 0: Some Background Notes by Neil Dickson](https://reader036.vdocuments.us/reader036/viewer/2022081808/56649ec85503460f94bd5e3a/html5/thumbnails/1.jpg)
COMP 2003:Assembly Language and Digital Logic
Chapter 0: Some BackgroundNotes by Neil Dickson
![Page 2: COMP 2003: Assembly Language and Digital Logic Chapter 0: Some Background Notes by Neil Dickson](https://reader036.vdocuments.us/reader036/viewer/2022081808/56649ec85503460f94bd5e3a/html5/thumbnails/2.jpg)
Purposes of the Course
• Learn how modern computers work from a software perspective
• Learn about the basics of computer architecture
![Page 3: COMP 2003: Assembly Language and Digital Logic Chapter 0: Some Background Notes by Neil Dickson](https://reader036.vdocuments.us/reader036/viewer/2022081808/56649ec85503460f94bd5e3a/html5/thumbnails/3.jpg)
Behold, The Computer
CPU RAM
I/O Devices
the focus of this course
a huge can of worms
![Page 4: COMP 2003: Assembly Language and Digital Logic Chapter 0: Some Background Notes by Neil Dickson](https://reader036.vdocuments.us/reader036/viewer/2022081808/56649ec85503460f94bd5e3a/html5/thumbnails/4.jpg)
Memory (RAM)
Data in memory is whatever you use it as.
...
00000000h FFFFFFFFh
0000002Bh
![Page 5: COMP 2003: Assembly Language and Digital Logic Chapter 0: Some Background Notes by Neil Dickson](https://reader036.vdocuments.us/reader036/viewer/2022081808/56649ec85503460f94bd5e3a/html5/thumbnails/5.jpg)
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)
![Page 6: COMP 2003: Assembly Language and Digital Logic Chapter 0: Some Background Notes by Neil Dickson](https://reader036.vdocuments.us/reader036/viewer/2022081808/56649ec85503460f94bd5e3a/html5/thumbnails/6.jpg)
CPU State (32-bit x86)
eax
ebx
ecxedx
espebpesiedi
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)
cr0cr2cr3cr4
Control Registers
st0
st2st3st4
FPU Registers
st1
st5st6st7
xmm0
xmm2xmm3xmm4
SSE Registers
xmm1
xmm5xmm6xmm7
gdtrldtridtr
tr cwswtw
mxcsr
MTRRsMSRs
Miscellaneous Other Stuff
![Page 7: COMP 2003: Assembly Language and Digital Logic Chapter 0: Some Background Notes by Neil Dickson](https://reader036.vdocuments.us/reader036/viewer/2022081808/56649ec85503460f94bd5e3a/html5/thumbnails/7.jpg)
What is Assembly Language?
• A programmer-readable representation of machine code
![Page 8: COMP 2003: Assembly Language and Digital Logic Chapter 0: Some Background Notes by Neil Dickson](https://reader036.vdocuments.us/reader036/viewer/2022081808/56649ec85503460f94bd5e3a/html5/thumbnails/8.jpg)
Why Use Assembly Language?
• To learn how your software actually works under the hood
• Performance• Operating Systems• Embedded Systems
![Page 9: COMP 2003: Assembly Language and Digital Logic Chapter 0: Some Background Notes by Neil Dickson](https://reader036.vdocuments.us/reader036/viewer/2022081808/56649ec85503460f94bd5e3a/html5/thumbnails/9.jpg)
Things you’ll need
• Inventor IDE, an assembly editor created for this course (http://www.codecortex.com/ide/)
• Assembly Language Video Tutorial, a fast, easy way to learn assembly for doing graphics (http://www.codecortex.com/ide/tutorial/)