=-=-=-=-=-=-=-=-=-=
..Compile session..

Output Filename: ccna.nsm -which receives the nasm syntax
 assembly language translation.  This file is later assembled
 with NASM, the Netwide Assembler.

Input Filename: ccna.c -which is the K&R C (subset) source to
 be compiled.

The compile and assembly sessions were performed on win XP
 using CMD.EXE commandline (dosbox).  In all of these
 projects, this version was used: NASM version 0.98.38,
 compiled on Sep 12 2003, (for dos).

There is a development chain of progression, as new
 modifications are incorporated. The three circuits:

-inital bootstrap-

src_0 -> compile_0 with compiler_0 -> asm_0 -> assemble_0 ->
 .bin_0 -> renamed -> .exe = compiler_0 file.

-then- (changes in src_0 -> src_1)

src_1 -> compile_1 with compiler_0 -> asm_1 -> assemble_1 ->
 .bin_1 -> renamed -> .exe = compiler_1 file.

-also finally- (self-compile new version)

src_1 -> compile_1 with compiler_1 -> asm_1 -> assemble_1 ->
 .bin_1 -> renamed -> .exe = compiler_1 (self-compiled) file.

(goto -then-)

The last two circuits of development need to be performed to
 assure that changes are correctly and fully incorporated
 into a self-compiling updated version.

You will note that a compiler for src_0 is required in step
 two, of ciruit one, yet the compiler isn't produced until
 the last step!  The practical restriction is that the new
 version is written in terms of the old syntax, and that the
 initial compile of src_0 is done with a cross compiler.  This
 is called the 'bootstrap problem' of initial development.  I
 did the bootstrap for both the .com and .exe versions using
 Mix Software PowerC which recognizes both K&R and ANSI C
 syntax.

For your benefit, I provide the assembler output for NASM of
 the compiler sources, saving the 'bootstrap' step, so you
 are able to start at the current version of the compiler by
 assembling the nasm output produced in circuit three above.
 From there you can spin, fold and mungicate, incorporating
 your changes, just be mindful of the required development
 circuits 2, and 3, above, where src_1 represents your
 changes to a prior version.  If compile_1 will not compile
 with compiler_0, then your changes have out paced the
 syntax support for it.

One type of example of what I am talking about is the flow
 control construct (which is not recognized by small-c):

    for(expr1;expr2;expr3) stmt;

 which would need to be implemented in terms of the
 equivalent, and small-c recognized syntax, form:

    expr1;
    while (expr2)
         {
         stmt;
         expr3;
         }

=-=-=-=-=-=-=-=-=-=
- Session Output -
=-=-=-=-=-=-=-=-=-=


* * *  Small-C  V1.1  * * *

       By Ron Cain


* NASM Version, 26-Mar-2010 *

Based on Version N: July 17, 1980


Do you want the c-text to appear (y,N) ? y
Are you compiling the whole program at once (Y,n) ? y
Should I pause after an error (y,N) ? y
Output filename? ccna.nsm
Open file success: 00005
 file existed and was opened.

Input filename? (..or just [Enter] key to finish.) >ccna.c
Open file success: 00006
 file existed and was opened.
#include INCLUDE.H

Open file success: 00007
 file existed and was opened.

Close file success. 00007
#end include
====== main()
====== abort()
====== parse()
====== dumplits()
====== dumpstatics()
====== dumpautos()
====== errorsummary()
====== ask()
====== openout()
====== openin()
====== newfile()
====== doinclude()
====== endinclude()
====== closeout()
====== declstatic()
====== declauto()
====== mk_subscript()
====== newfunc()
====== getarg()
====== statement()
====== ns()
====== compound()
====== doif()
====== dodo()
====== dowhile()
====== doreturn()
====== dobreak()
====== docont()
====== doasm()
====== callfunction()
====== junk()
====== endst()
====== illname()
====== multidef()
====== needbrack()
====== needlval()
====== findstatic()
====== findauto()
====== addstatic()
====== addauto()
====== is_identifie()
====== getlabel()
====== printlabel()
====== sa_mk_lbl()
====== ostklbl()
====== alpha()
====== numeric()
====== an()
====== pl()
====== addwhile()
====== delwhile()
====== readwhile()
====== inspect_chr()
====== lookahead()
====== g_nxtchr()
====== kill()
====== scan_nxt()
====== inchar()
====== inline()
====== keepch()
====== preprocess()
====== addmac()
====== putmac()
====== findmac()
====== toconsole()
====== tofile()
====== outbyte()
====== outstr()
====== outasm()
====== nl()
====== tab()
====== colon()
====== bell()
====== error()
====== ol()
====== ot()
====== streq()
====== astreq()
====== match()
====== amatch()
====== deblank()
====== outdec()
====== outudec()
====== strlen()
====== toupperi()
====== expression()
====== heir1()
====== heir1a()
====== heir1b()
====== heir1c()
====== heir2()
====== heir3()
====== heir4()
====== heir5()
====== heir6()
====== heir7()
====== heir8()
====== heir9()
====== heir10()
====== heir11()
====== primary()
====== sa_store()
====== rq_val_sa()
====== dbltest()
====== result()
====== logic_tst()
====== logic_do_tst()
====== kind_const()
====== number()
====== chr_const()
====== str_const()
====== sa_comment()
====== header()
====== trailer()
====== sa_cseg()
====== sa_dseg()
====== FN_Prolog()
====== FN_Epilog()
====== asm_symb()
====== sa_getmem()
====== sa_deref()
====== sa_putmem()
====== sa_putstk()
====== sa_indirect()
====== sa_swap()
====== sa_immed()
====== sa_immedo()
====== sa_push()
====== sa_pop()
====== sa_swapstk()
====== sa_call()
====== sa_callrts()
====== sa_ret()
====== sa_callstk()
====== sa_jump()
====== sa_if_tst()
====== sa_do_tst()
====== def_sizein()
====== defstorchr()
====== defstorint()
====== defstorptr()
====== defbyte()
====== defword()
====== sa_modstk()
====== sa_rtnstk()
====== sa_doublereg()
====== sa_add()
====== sa_sub()
====== sa_mult()
====== sa_div()
====== sa_modulo()
====== sa_or()
====== sa_xor()
====== sa_and()
====== sa_asr()
====== sa_asl()
====== sa_neg()
====== sa_not()
====== sa_inc()
====== sa_dec()
====== sa_eq()
====== sa_not_equal()
====== sa_sless_tha()
====== sa_sless_or_()
====== sa_sgreater_()
====== sa_sge()
====== sa_uless_tha()
====== sa_uless_ore()
====== sa_ugt()
====== sa_uge()
====== sa_mk_bool()
====== sa_mk_nbool()
#include strcmp.c

Open file success: 00007
 file existed and was opened.
====== strcmp()

Close file success. 00007
#end include
#include itoa.c

Open file success: 00007
 file existed and was opened.
====== itoa()

Close file success. 00007
#end include
#include RELAT.C

Open file success: 00007
 file existed and was opened.
====== cceq()
====== ccne()
====== cclt()
====== ccle()
====== ccgt()
====== ccge()
====== ccult()
====== ccule()
====== ccugt()
====== ccuge()

Close file success. 00007
#end include
#include PCDOSLIB.C

Open file success: 00007
 file existed and was opened.
====== StateDegugFl()
====== strxcpy()
====== strcpy()
====== NLfn()
====== putstr()
====== puts()
====== putsline()
====== getstr()
====== getcstr()
====== getc()
====== gets()
====== putc()
====== putchar()
====== fopen()
====== fclose()
====== fgets()
====== fputs()
====== fgetline()
====== fwrite()
====== fread()
====== fseek()
====== fsetpos()
====== fgetpos()
====== fdelete()

Close file success. 00007
#end include

Close file success. 00006

Input filename? (..or just [Enter] key to finish.) >
Close file success. 00005

There were +0 errors in compilation.

=-=- eo compile session -=-=