CSCI 223 - Computer Organization and Assembly Language



Dr. Tobin Maginnis (ptm@pix.cs.olemiss.edu)


Course Syllabus
Class Schedule

Test Taking Procedure


Test One
Test Two
Test Three

Unix Introduction
Code Examples from Text
Additional Helpful Documentation
Red-Blue-Green Logic Example

Textbook Figures
4.21 - Hardware Structure of SEQ
4.23 - Tracing Two Cycles of Execution by SEQ
4.25 - SEQ Fetch Stage
4.26 - SEQ Decode and Write-Back Stage
4.27 - SEQ Execute Stage
4.28 - SEQ Memory Stage
4.29 - SEQ Update Stage
4.32 - SEQ Un-pipelined hardware
4.33 - SEQ Three-stage hardware
4.34 - SEQ Three-stage pipeline timing
4.35 - SEQ One clock cycle of pipeline operation
4.36 - SEQ Limitations of pipelining - delays
4.37 - SEQ Limitations of pipelining - overhead
4.38 - SEQ Limitations of pipelining - dependencies
4.39 - SEQ Abstract view of PIPE-
4.40 - Abstract view of PIPE-
4.41 - Hardware structure of PIPE-
4.42 - Pipelined execution of prog1 simple
4.43 - Pipelined execution of prog2 simple
4.44 - Pipelined execution of prog3 simple
4.45 - Pipelined execution of prog4 simple
4.46 - Pipelined execution of prog2 w/stalls
4.47 - Pipelined execution of prog3 w/stalls
4.48 - Pipelined execution of prog4 w/stalls
4.49 - Pipelined execution of prog2
4.50 - Pipelined execution of prog3
4.51 - Pipelined execution of prog4
4.52 - Abstract view of PIPE
4.53 - Hardware structure of PIPE
4.54 -
4.55 -
4.56 -
4.57 -
4.58 -
4.61 -
4.62 -
4.63 -
4.65 -

eHandouts
Instruction Parts
Instruction Parts V2
Instruction Decode
Instruction Decode Description
IA-32 Instruction Decode example
ModR/M Byte Decode
S-I-B Byte Decode
IA-32 First Byte Decode
IA-32 Flags (PSW) Register
Memory hierarchy
Vi Command Reference (html)
Vim Command Reference (html)
Another Vi Command Reference (pdf)
VIM Command Reference (pdf)
Intel Core i7 Processors: Nehalem and X58 Have Arrived

Program Assignments

    How to turn in a programming assignment
  1. Demonstrate how to use the Vi (VIM) editor, compile hello.c, generate hello.s, and hello.lst
  2. Add two numbers that sum to less than nine and print them out in three ways.
  3. Read two numbers from the command line and display the sum.
  4. Read two, two digit, numbers from the command line and display the sum.
  5. Read three, multi-digit, numbers from the command line and display the sum.
  6. Read up to 10 multi-digit numbers from the command line and display the sum.

Example Programs
Display command line args in C
Display command line args in assembly
Add and printf two binary numbers in C
Add and printf two binary numbers in assembly
Add any number multi-digit numbers from the command line with the specified radix -->

Objectives
Unit One Objectives
Gcc Link-edit and run-time support
GNU debugger commands
Big Endian and Little Endian Byte Ordering
Integer, Longs, & Pointers for 64-bit architecures
Intel Architecture x86, 64-bit registers
PDP-8 Sample Program
Unit Two Objectives
Unit Three Objectives
Unit Four Objectives

Unix Help Pages
http://www.saintmarys.edu/~psmith/candunix.html
http://wwwlinuxdoc.org
http://www.emerson.emory.edu/services/unixhelp1.3/Pages
http://www.ee.surrey.ac.uk/Teaching/Unix


Assembly Help Pages
Software optimization resources
Intel Architecture Software Developer's Manual - Volume 1: Basic Architecture (pdf)
Chapters 3 to 6 show the register transfers for each instruction; howevever the most of segmentation documention is irrelevant since the text assumes flat paging addressing. Also, GNU "as" does not support all IA instructions including: conditional moves, the MMX, or SSE instructions. The overall document is 369 pages long. You probably don't want to print it out.
Intel Architecture Software Developer's Manual - Volume 2: Instruction Set Reference (pdf)
Chapter 3 contains a description of the register transfers that make up instructions. Note that they list the operands in the old IBM right-to-left style rather in the DEC/ATT left-to-right style of GNU "as." This manual is 854 pages long. You definitely don't want to print it out.
Intel Architecture Software Developer's Manual - Volume 3: System Programming (pdf)
Describes the interface between the hardware and the operating system, including cache and TLB specs, virtual memory, exceptions and interrupt handling, and processes.
2004 IA-32 Intel Architecture Software Developer's Manual Volume 1: Basic Architecture in PDF
2004 IA-32 Intel Architecture Software Developer's Manual Volume 2A: Instruction Set Reference A-M in PDF
2004 IA-32 Intel Architecture Software Developer's Manual Volume 2B: Instruction Set Reference N-Z in PDF
2004 IA-32 Intel Architecture Software Developer's Manual Volume 3: System Programming Guide in PDF
Intel Architecture Software Developer's Manual Volume 1: Basic Architecture in PDF
Intel Architecture Software Developer's Manual Volume 2: Instruction Set Reference in PDF
Intel Architecture Software Developer's Manual Volume 3: System Programming Guide  in PDF
GNU as80386 Dependent Features
Assembly tutorial - http://www.strangecreations.com/library/assembly/
Assembly tutorial - http://www.faqs.org/faqs/assembly-language/x86/general/
Assembly tutorial - http://cs.smith.edu/~thiebaut/ArtOfAssembly/artofasm.html


GNU Help Pages
The GNU gcc and "as" manuals - http://www.gnu.org/manual/
The GNU assembler (gas) documentation in HTML
The GNU source-level debugger (gdb) documentation in HTML
The GNU gcc compiler front-end documentation in HTML
Using "as" - http://www.myri.com/scs/L3/doc/as_toc.html
http://www.loria.fr/~galibert/texi/as/as_1.html
http://www.linuxdoc.org/HOWTO/Assembly-HOWTO.html
http://www.math.utah.edu/docs/info/ld_2.html
http://www.intel.com/design/pentium/manuals/
http://www.ucmb.ulb.ac.be/documents/gcc_2.7.2/gcc_toc.html
http://www.efm.leeds.ac.uk/~as/gnu/info_html/g++FAQ_toc.html


Misc reference
http://linuxassembly.org
http://www.ice-digga.com/programming/proglink.html
http://www.upl.cs.wisc.edu/~epaulson/links.html