CMSI 284

Computer System Organization/
Systems Programming

Spring 2019



Assignments

  • Assignment 0122 GitHub-YouTube account listing: 20 points
  • Assignment 0205 Encoding drills 1 Setup
  • Assignment 0221 Encoding drills 2 Setup
  • Assignment 0309 Encoding drills 3 Setup

    Recommended Spring Break Preparation

    Download and install a gcc compiler (see options below), then read through Dr. Toal’s Introduction to C, typing and running the sample programs provided there. Bring any questions or points of confusion back to class after the break.

    Options for a gcc compiler are:

    • macOS: Download and install Xcode from the Mac App Store or from their developer website (free signin required)
    • Windows: Download and install Cygwin or MinGW
    • Linux virtual machine option: Alternatively, you can use a virtual machine such as VirtualBox and install Linux on it—this will have the gcc compiler as standard issue and you would do your homework within the virtual machine

    You might know of other options…if you’re wondering if one will work, ask me.


  • Assignment 0326 extended to 0328 C programs 1: Oh Say Can You C Setup
  • Assignment 0404 C programs 2: From C to Shining C Setup
    Recommended April 6–7 Weekend Preparation

    Download and install a virtual machine and set up Ubuntu Desktop 18.04.2 on it. Install NASM (sudo apt-get install nasm on the terminal) then read through Dr. Toal’s NASM Tutorial, copy-pasting, assembling, linking, and running the sample programs provided there. Bring any questions or points of confusion back to class after the weekend.

    Virtual machine possibilities are:

    • VirtualBox—This is free and will be the one that I’m using. Probably the best first option unless you have good reason to go with something else
    • VMWare—This is Windows only and is a free version of a commercial product
    • Cygwin: If you already have Cygwin, you can add NASM to it; the claim is that it provides Linux system call compatibility, but this has not been verified firsthand. If anyone tries this option, give Dr. Toal’s sample code a shot and report back on whether this works
    • Built-in Windows virtual machine: Some editions of Windows 10 have a built-in virtual machine called Hyper-V. This is again not verified firsthand, but if you want to give it a shot here is a web page with instructions (and there may be others)
    • Physical machine: If circumstances keep you from setting up your own virtual machine (e.g., laptop is full, compatibility issues, etc.), please contact our Lab Manager, Masao Kitamura, for possible options. He is aware that some students might need this and will have a number of options available, like setting up a Keck lab machine or helping you with an Amazon EC2 host

    Installation should follow the same general procedure: the Ubuntu download is a virtual disk (ISO) file—it’s like a CD/DVD but in the form of a file. You would “insert” this disc into the virtual machine’s virtual drive and “boot” the machine off that “disc.” Installation proceeds just like on a physical computer, except that it is running in a window on the host machine.

    You might know of other options…if you’re wondering if one will work, ask me.


    VirtualBox/Ubuntu Assorted Tips

    Some late-breaking notes to optimize your virtual machine experience:

    • Don’t forget—the .iso download from the Ubuntu website is a virtual disc. You need to “insert” this disc in your virtual machine’s virtual drive via the Settings > Storage dialog. You only need to do this upon installation…just like an actual computer!
    • If you haven’t already set yourself up, you can choose Minimal Install instead of Normal Install (unless you really want to play some Linux games). This shortens installation time and will give you a smaller initial virtual hard drive footprint.
    • For the Bidirectional Clipboard and Shared Folder features to work, you may need to install something called “Guest Additions.” While your virtual machine is running, choose Devices > Insert Guest Additions CD Image… This adds some supplementary software that makes your virtual machine interact better with the host machine. Reboot the virtual machine after installation completes.
    • You might need some tweaking in order to find the “sweet spot” of performance for your virtual machine. Start by running VirtualBox by itself (no other apps on your host machine) and also giving your virtual machine a decent chunk of memory (2GB if you can spare it, with additional graphics memory too). If things feel sluggish, gradually lower settings until things are running comfortably. The beauty of a virtual machine is that upgrades/downgrades are just mouse clicks away!
    • To be able to link to C libraries and functions, you will need gcc (yes you will now end up with two copies of gcc: one on your host machine and another on your virtual machine). Similarly to NASM, the command to install this is sudo apt-get install gcc.
    • Finally, a late-breaking issue: on this latest version of Ubuntu, the gcc command should be invoked with the -no-pie argument in order to correctly link assembly language object files, e.g., gcc -no-pie make-quarter-change.o (look up what PIE is if you’re curious).

  • Assignment 0416 Assembly language programs 1: Déjàssembly Vu Setup
  • Assignment 0425 Assembly language programs 2: System Call Me Maybe Setup
  • Assignment 0507 Mixed language programs: Welcome to the .o, C Setup
  • Make-Up Work 0510 Play It Again, .asm Setup