Lab 1, CSC430, Spring 2018
1 Getting Started
7.0.0.7

Lab 1, CSC430, Spring 2018

First, a quick survey

Next, use this github classroom link to create a repo for the first mini-lab-project-milestone-thing.

Next, in the language of your choice, write a compiler for this language:

Expr ::= Int

       | Int + Int

... where an Int is an integer between -(2^16) and 2^16.

1 Getting Started

In the Lab 1 directory, you should find the two files "ghouloum.c" and "our-code.s". Read them. Make sure the C file makes sense. Make sure the single instruction in the assembly file makes sense.

Compile them like this on a Mac:

% clang -m32 -c ghouloum.c

% nasm -f macho our-code.s

% clang -m32 -o a.out our-code.o ghouloum.o

On linux, use -f elf in the call to "nasm".

On Windows... well, let’s talk about it.