The following are the ANSI-fied source files of CCNA32, which are more gcc friendly, and are provided thru the efforts of Chris Myers.
'Make' builds the compiler as scc, and 'make tst1' builds the test program tst1, from the assembler source output, from scc compiling tst1.c.
Here is how you would build everything:

$> make

$> ./scc

:) scc is the SmallC Compiler.  The compiler answers are: y,y,y, tst1.nsm, tst1.c

$> make tst1

$> ./tst1

But first, setup the workspace as follows..
In the current working directory (say SCC32), place the following folders:

Also in the current working directory place the following files:

In the 'asm' folder place the following files:

In the 'include' folder place the following files:

In the 'src' folder place the following files:


Now, you are ready to build the SmallC Compiler (scc) and the test file tst1.c. The execution of tst1 causes a copy of tst1.c to be read and then written to the file mytst.txt in the current working directory. This exercises file i/o signifying success. Please note that scc compiles a subset of K&R C. Also note that the Netwide Assembler (NASM) package must be installed, as the object code of the SmallC Compiler is in nasm syntax assembly language.

8:06 PM 4/23/2012