Lab 1, CSC430, Spring 2019
1 Getting Started

Lab 1, CSC430, Spring 2019

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 -m64 -c ghouloum.c

% nasm -f macho64 our-code.s

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

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

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