CompSci 240, C and Assembly Programming

Index: Announcements, Notes, Software Links


to Newest entry.

Posting Date Item
(start of semester) Welcome to CompSci 240, C and Assembly Programming.
This page will contain announcements and updates that occur throughout the semester.

Scroll down or check the links above left for specific course materials. Check "Class Notes, below" for online versions of material covered in class.


Connecting to Raspberry Pi in the lab

Here is the script that sets up a Hardware Lab computer to connect to a Raspberry Pi:

Download this script on the host computer, and run it with python Then connect your Raspberry Pi and wait for it to assign an IP address to the host computer.


Notes for Assignment 6

2018-12-06 Final exam — take-home.
2018-09-26 Grades have been emailed to each of you. Contact me if you didn't receive them, or have any questions.
Asn numberRemarks
assignments overall Please notice what asn-number each assignment is, and upload your files to the correct assignment!

Class Notes

Date Item
Some extras:

Related reading: Is Tomorrow's Embedded Systems Programming Language Still C?
A short article about C's place in the scheme of things (from


Related reading: Is there a benefit to compiling your code as you go?
Why compile a partial program?

Related reading: Ten Commandments for C Programmers Guidelines for writing portable and understandable programs in C, written by Henry Spencer in 1987 and annotated in 1990.


A related reading:
Interesting and informative article about an important kind of programming error, from the Ars Technica website


Notes for Assignment 6

  • Assembly-intro — first looks at assembly language; conditional execution
  • Assembly-C; subroutines; interfacing with C
2017-10-17 Structs, pointers to structs, and a linked list:
2017-11-23 Thanksgiving



C programming

"conversion specifiers" in the printf() statement.
The format-specificaton argument to printf().
C operators and precedence — see also K&R.
Python operators and precedence.
Python Operator basics
Pascal operators and precedence.
C/C++ standard basic operators, Python operators, and Pascal operators, for comparison. (additionally, Python operators and some standard methods.)
Errata for The C Programming Language, Second Edition
Listing of "all known errors" in the K&R book.
Wikipedia's C Standard Library:
ctype.h, math.h, stdio.h, stdlib.h, string.h, time.h, etc.
Descriptions of the contents of some of the C standard libraries.
Duff's Device from Usenet://net.lang.c (archived on Google Groups).
An "unusual" programming technique; an early example of the ways in which legal — but perverse — C can do things that were thought to be exclusive to assembly language.


7-bit ASCII table
7-bit ASCII table, showing decimal and hexadecimal values.
ASCII and EBCDIC tables
8-bit character encodings: "Extended ASCII", EBCDIC.

Floating-Point & IEEE-754

IEEE-754 floating-point specification.
Summary of the IEEE-754 standard for floating-point formats.
An Interview with the Old Man of Floating-Point
An interview with one of the major forces behind IEEE-754. Includes a historical perspective.

Assembly, mixed C-and-assembly

ARMv8 architecture, Cortex-A53 processor, Raspberry Pi
Raspberry Pi — ARMv8
Reference Manuals for the Cortex-A53 processor used in the Raspberry Pi Model 3B+. (Local copies.)
Arm® Cortex®-A53 MPCore Processor Technical Reference Manual
ARM® Cortex®-A53 MPCore Processor Advanced SIMD and Floating-point Extension Technical Reference Manual
Technical Reference Manuals for the Cortex-A53 processor used in the Raspberry Pi Model 3B+. ( website.)
ARM assembler
32-bit Assembler articles.
64-bit Linux syscalls — local listing
Low-level operations provided by 64-bit Linux syscall.
32-bit Linux syscalls
32-bit Linux system calls quick reference — .pdf file
Low-level operations provided by Linux interrupt 0x80.
x86 and x86_64 architecture (Intel/AMD processors)
Intel® 64 and IA-32 Architectures Software Developer's Manuals
Links to a set of free documents from Intel (in .pdf format), describing the IA-32 and IA-64 architectures and instruction sets in detail. (Volume 1 also includes a brief history of the x86 architecture family.) (Links are valid as of November 2007.)


miscellaneous information relating to LowLevel Programming.
Unorganized stuff…


Raspberry Pi 64-bit OS — OS .img file with Mate GUI
Download this image.

for MacOS and Linux users

All necessary software is standard on these operating systems.
  1. Insert microSD card into USB adapter; plug USB adapter into computer.
  2. Determine what device the card appears as: for example, "/dev/sdc".

    One way to do this is with the "dmesg" command. It will show you the most recent hardware activity; you should see that the card was recognized as "dev/sd???".

  3. If the card was automounted by the computer, unmount it again (but leave it plugged in).
  4. Run this command: sudo dd bs=4M status=progress if=devuanpi-mate.2018-09-03.img of=/dev/sdc Change the image file name and output device as needed.
  5. When that's done, run the command: sync
  6. Remove the card and use it.

for Windows users

  • website — download app. to burn OS images ont microSD cards.
  • Xming and PuTTY — utilities to make an SSH connection to the Raspberry Pi, and run X GUI applications remotely.

Install these programs on your computer as needed. The first, "etcher", will be used once to copy the OS image onto your microSD card.

The "Xming" software is an X Window server. "PuTTY" is an remote-connection tool that opens an SSH session to a host such as the Raspberry Pi. Once you are logged in, you can start a GUI program (such as an editor) that will connect to Xming to display the window.

compiling eldritch runes
Software tools
Quotes about C and assembly language.