cs216 class

CS 216, System Programming Languages

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

Course Outline

Videos from the Covid era

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, 27 January 2023
  2. Assignment 2, Hex arithmetic, and 2 MIPS instructions, due Friday, 17 February 2023
  3. Assignment 3, Boolean algebra and pseudo instructions, due 17 March 2023

Lab instructions:

Weekly lab period of: Due end of the week (Midnight Friday). Start early! Subject to change

Connection trouble? see Troubleshooting

  1. Lab 1, 17 January addition.a, easy.a
  2. Lab 2, 24 January math2.a and (math6.a OR math7.a )
  3. Lab 3, 31 January loop4.a,
  4. Lab 4, 7 February MIPS program loop6.a, and C program minmax.c
  5. Lab 5, 14 February MIPS program logic7.a and C program changecase.c.
  6. Lab 6, 21 February MIPS programs bits.a and  stack2.a
  7. - Reading Week --
  8. Lab 7, 7 March MIPS program funct7.a and C program oddeven.c
  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