cs216 class

CS 216, System Programming Languages

Comprising low-level "Assembly language", the C language, and the Linux operating system

Course Outline

Software downloads

Software you might want to put on your own computer for this course.

Current Lab instructions - Lab list

If this link is not "Current" use the lab list!

Online Course notes

These notes are meant to supplement the textbook, with more examples and explanations. Generally, the note chapters correspond to the book chapters.

A classic C tutorial

My notes on C

Sample Final Exam

Sample midterm / review questions

2018 practice midterm

Some C notes, 29 January 2010

Using Macros in Assembly Language

C and mips, side by side


The example programs in the book, and some of my own,  are on linux.ubishops.ca in our course directory, /home/COURSES/cs216, sub-directory examples, the programming questions are in quests.

Assignments

  1. Assignment 1, binary arithmetic, due Friday, 26 January 2024
  2. Assignment 2, Hex arithmetic, and 2 MIPS instructions, due Friday, 16 February 2024
  3. Assignment 3, Boolean algebra and pseudo instructions, due 15 March 2024

Lab instructions:

Weekly lab period of: Due before next lab(For prompt marking, by Tuesday). Start early!

Connection trouble? see Troubleshooting

  1. Lab 1, 18 January addition.a, easy.a
  2. Lab 2, 25 January math2.a and (math6.a OR math7.a )
  3. Lab 3, 1 February loop4.a,
  4. Lab 4, 8 February MIPS program loop6.a, and C program minmax.c
  5. Lab 5, 15 February MIPS program logic7.a and C program changecase.c.
  6. Lab 6, 22 February MIPS programs bits.a and  stack2.a
  7. Lab 7, 29 February MIPS program funct7.a and C program oddeven.c
  8. - Reading Week --
  9. Lab 8, 14 March MIPS program recur1.a OR recur3.a recommended if you are having trouble
  10. Lab 9, 21 March , C program to evaluate an arithmetic expression,  evalprefix.c
  11. Lab 10, 28 March, MIPS program calctree.a, evaluate a binary expression tree, recursively.
  12. Lab 11, 4 April, C program to merge two ordered lists, merge.c
  13. Lab 12, 11 April, using make -- a C sorting project involving multiple files

Class examples

From time to time, I put the code for class examples in the sub-directory examples
(the older ones are also here on cs, hence the links)

James Larus on Assemblers, Linkers, and SPIM (84 page PDF)

A classic C tutorial

Only note that the syntax for declaring argument types for functions is archaic.

My notes on C

C and mips, side by side

reverse a string.

Summary of Intel assembler instructions, and Floating point coprocessor


Prepared by Lin Jensen, at Bishop's UniversityBishop's Coat of Arms