CIS-2010 (Computer Organization) Home Page
This is the home page for Peter Chapin's Computer Organization course notes for the
Spring 2017 semester. Here you will find electronic versions of class handouts, homework
assignments, lecture slides, and links to other references of interest. If you are a student
taking Computer Organization you should bookmark this page.
- The course syllabus gives an overview of the course
and its content, lists course resources, and describes the grading policy and related
issues.
- The homework submission area and gradebook are on Moodle, but all other course
resources are here.
- We'll be using the Open Watcom C compiler and x86 assembler in this class. You can
download a snapshot of the development version from
this web site. To install it, just unzip the archive in any suitable location. To use it,
open a console window and run the useOW.bat batch file in the root folder of the
unpacked archive.
- My C Tutorial may be of interest. It includes
the "lectures" of a first course in programming using C. It also includs several sample
programs of interest.
- The Hexdump program displays a file's
contents in hex. It is a useful utility and an example of a (relatively simple) C program.
I will describe in class the basics of using Git to access this
repository.
- The Huffman program compresses a file
using Huffman encoding. It is a useful utility and an example of (less simple) C
program.
- My home page contains other resources of potential
interest.
Topic Summary
- 2017-01-17. Class introduction, resources, grading policy, etc. Described how to build
simple C and Assembly programs using Open Watcom.
- 2017-01-19. Described some details of Program Zero (how it works, how to build it).
Introduced binary, hex, and two's complement.
- 2017-01-24. No class due to weather.
- 2017-01-26. Reviewed two's complement. Discussed bit manipulation instructions: and,
or, xor. Discussed the representation of floating point numbers (Section 2.4 in the
text).
- 2017-01-31. Introduced the assembly language instructions: add, sub, cmp, and various
jumps. Described how to implement conditional branches and while loops in assembly
language. Showed their corresponding C forms.
- 2017-02-02. Discussed the details of Lab #2 and some topics
needed to make sense of it..
- 2017-02-07. No class.
- 2017-02-09. Discussed Homework #2 and how to best
approach it. Introduced global variables in both C and Assembly.
- 2017-02-14. Introduced pointers and arrays in both C and Assembly.
- 2017-02-16. Discussed the details of Lab #3. Demonstrated
the Watcom debugger. Continued discussion of pointers and arrays in C.
- 2017-02-28. Reviewed pointers and arrays. Discussed dynamic allocation using
malloc and free. Introduced structures.
- 2017-03-02. More discussion of stuctures. Introduced the Date example.
- 2017-03-07. Review of the Date example. Discussed issues related to structure layout
and padding. Did an overview of the assembly language version of
Date_advance.
- 2017-03-09. ?
- 2017-03-14. Discussed the stack and the stack-based calling convention.
- 2017-03-16. Discussed Lab #5. Showed three version of a swap
array function (in C) and then reviewed the assembly language produced by the compiler for
each.
- 2017-03-21. Discussed the Wind library for managing text-mode windows on the console
using assembly language. Introduced calling operating system API functions.
- 2017-03-23. Reviewed the clear_region implementation in the Wind library in
preparation for Lab #6.
- 2017-03-28. Started discussing virtual memory.
- 2017-03-30. Continued talking about virtual memory (paging to disk).
- 2017-04-11. Discussed interrupts and task (context) switching in multi-threaded
environments.
- 2017-04-13. Introduced instruction level parallelism (pipelining, branch prediction,
out-of-order execution, super scalar architectures). See ILP.asm for a sample of instruction level parallelism at
work.
- 2017-04-18. Introduced the memory hierarchy and the basic concepts of memory
caching.
- 2017-04-20. Demonstrated caching effects using a Gaussian elimination program in C and
Fortran.
- 2017-04-25. Demonstrated splint by applying it to
the str example in the Spica library.
- 2017-04-27. ...
- 2017-05-02. Reviewed course topics.
- 2017-05-04. No class.
- — Topics below are subject to change —
Homework
- Homework #01. Number Systems. Due:
2017-01-27.
- Homework #02. Count Bits. Due: 2017-02-16.
- Homework #03. Reverse Array (Assembly). Due:
2017-03-17.
- — Homeworks below are subject to change —
Labs
The lab set is summarized in the lab summary document, along with
links to specific lab handouts and supporting code samples.
Samples
- The "Hello, World" program in C and in
assembly language.
- Program0 is a complete sample of a mixed C/Assembly program
that we will use as a starting point for many of the programs we'll write in this
class.
- A abstract data type (effectively a "class") that represents calendar dates: Date.h, Date.c, Date_demo.c. There is also an assembly language version:
Date.asm.
Resources/Articles
Last Revised: 2017-05-04
© Copyright 2017 by Peter C. Chapin
<PChapin@vtc.vsc.edu>