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.


Raspberry Pi requirements

  • Parts list .pdf file.
  • Script for enabling the BFH103 lab computers to use another Ethernet port.

    Download this script on the lab 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

Class Notes

Date Item

Connecting to Raspberry Pi in the lab

This script 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.


Wifi connections

Download these scripts and copy them to your Raspberry Pi using the "scp" command:

Some extras:
Some extras:

Related reading:


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

  • functions slides
  • sincos program variations, from class. Use of "argv", "scanf()", and "fgets()" all shown in main().
  • wordlist program, done using multiple files.
  • output from the "short-paragraph-3.txt" input file.
  • output from the "Enterprise.txt" input file.
  • output from the "The_Elements.txt" input file.
  • output from the "Homer-Iliad.txt" input file.
  • randtree.c Simple binary tree program (section 2 version)
2019-10-29 decimal-to-binary routines
2019-11-23 Solution for binary-tree assignment:
2019-12-03 Solution for binary-tree assignment:
2019-12-05 "minimum" C-and-assembly program:
2019-12-10 "minimum" C-and-assembly program:



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…


Operating System image

64-bit RaspiOS image
64-bit OS for Raspberry Pi 4B, 3B+, and 3B.

Customized for headless operation; C/Assembly software installed.

for Windows users

Install these programs on your computer as needed. The first, "Raspberry Pi Imager", 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.

for MacOS and Linux users

Needed 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.2018-08-25.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.

There is also a Raspberry Pi Imager utility that can do the "burning". See the information under "for Windows users", above.

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