Skip to content

kobenairb/tcc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TinyCC Compiler for the WDC 65816

About

TinyCC Compiler for the WDC 65816 for the WDC 65816 processor.

This projet is a fork of the TinyCC Compiler.

It does not manage the linkage or the creation of binary but only produces the assembly code.

The produced code is:

  • Strongly typed Wla-dx
  • Primarily intended for use with the Pvsneslib SDK and for creating games on the SNES console.
  • Not optimized and is best used in conjunction with the dedicated 816-opt and constify optimizers.

Some considerations

TCC is mostly implemented in C90. Do not use any non-C90 features that are not already in use.

Non-C90 features currently in use, as revealed by:

./configure --extra-cflags="-std=c90 -Wpedantic"
  • long long (including "LL" constants)
  • inline
  • very long string constants
  • assignment between function pointer and 'void *'
  • "//" comments
  • unnamed struct and union fields (in struct Sym), a C11 feature

For more informations, see CodingStyle

Getting Started

Build it

Compile it using the make command.

make

Generate the documentation

Generate the documentation in docs/html like this.

make docs

The current documentation is still in progress and can be incomplete or inaccurate.

Use it

See the help option.

./816-tcc -h

usage: 816-tcc [-v] [-c] [-o outfile] [-Idir] [-Wwarn] [infile1 infile2...]

General options:
  -v          display current version, increase verbosity
  -c          compile only - generate an object file
  -o outfile  set output filename
  -Wwarning   set or reset (with 'no-' prefix) 'warning' (see man page)
  -w          disable all warnings
Preprocessor options:
  -E          preprocess only
  -Idir       add include path 'dir'

License

TCC is distributed under the GNU Lesser General Public License (see COPYING and RELICENSING).

License: GPL v3

Contributing

See CONTRIBUTING.

Acknowledgements

The main contributors of this project:

And all the other contributors that I forget to name.

About

Tiny C Compiler - The Smallest ANSI C compiler

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 99.6%
  • Makefile 0.4%