Flash C is a small C compiler with a full-screen, text-mode IDE. Both are written from scratch and both run on Linux. The compiler, fcc , reads C source code and writes a native x86-64 Linux executable directly. No assembler, linker or C library is used at any point. The IDE, fc , wraps the same compiler in pull-down menus, overlapping edit windows, an error window , option dialogs , a source-level debugger and hyper-linked online help. Its layout follows the classic Turbo Vision style IDEs. This post shows what is in the project and how it works inside. The Flash C IDE. The whole toolchain lives in one repository: the lexer and preprocessor, the parser and type checker, an optimizer, the x86-64 code generator, an ELF writer, a run-time library written in C, the IDE, a debugger and the help system. Flash C compiles C89 with a few C99 conveniences, such as // comments. C++ is deliberately not supported. Two programs come out of the build. fcc is the command-line compiler. Runn...
This blog contains electronic, amateur radio, and embedded system projects, which I did during my free time. Unless otherwise noted, all the articles and projects described on this blog are based on my original designs.