Products > lcc-win32 > Components

Lcc-win32 components

The compiler

This is an adaptation to the Windows operating system of the 'lcc' compiler, written by Chris Fraser and Dave Hanson, and described fully in their book: A Retargetable C compiler: design and implementation. (Benjamin/Cummings Publisher). In that book, Fraser and Hanson describe each of the functions in the source code, its general design, the decisions done etc. Lcc-win32 is not just a mountain of meaningless code. It is well documented. The modifications I did to adapt it to the windows environment are all described in the document that is shipped with the compiler.

The compiler generates code fully compatible with MSVC. The debug information format choosen is the NB09 standard, as published by Microsoft. This means that you can use all the Microsoft toolchain with the code of lcc.

The linker

But you are not forced to use any of those expensive tools lcc-win32 comes with its own linker, an essay in software minituarization: imakes only 63K. In that small footprint, lcclnk manages to pack a lot of functionality: it will automatically convert .res resource files into object files, it will link and pack all the debug information into a format compatible with the Microsoft debugger, build dlls, etc

The resource compiler and the the resource editor.

This tools allow you to design and compile your resources, an essential part of any windows application.

'lrc', the resource compiler, includes a complete Ansi C pre-processor, and will generate a .res file from a .rc resource description file.

'Weditres' resource editor, allows you to design your dialog boxes interactively at the screen. It will generate a .res file directly.

The editor

'Wedit' is a programmer's editor that contains all the features you are used to: real-time syntax coloring, project management, and a dynamic cross referencing utility that replaces the 'program database' of other compiler systems.

Instead of building a database, 'Wedit' parses each time anew the program text to find out the information you request. This has the advantage of not having to compile to find out something, and having the information always up-to-date.

A new introduced features is structure completion just type in a structur name and a dialog pops up which show the structure elements, you can just use the arrow keys to choos the element you like to get.

It has many 'bells and whistles', like software metrics, with McCabe graphs, built-in utilities like Grep, Diff, search/replace, regular expressions etc.

The debugger

It will allow you to follow a program's execution, set Watch and Breakpoints, inspect the memory. It still under development and will get improved over time.

MMX Intrinsics

Nowadays, most machines are shipped with CPUs containing this new set of instructions that provide a simple SIMD (Single Instruction Multiple Data) parallelism. Lcc-win32 is one of the few compilers in the world to support all this instructions through intrinsics that work with vectors. Using this primitives, Lcc-win32 can add two tables of 32 bit integers faster than MSVC with all optimizations turned on for example.

Other instructions are saturated add/substract, comparing string data, packing/unpacking words to bytes and many others. All of them are called using C syntax, no assembly is required.

Other components:

A full set of import libraries are provided to allow your program to use most of the windows API. A set of header files is shipped with the system, all of them in a semi-compressed format. The 'windows.h' file, is only about 400K, instead of more than 4MB in other systems. This speeds compilation enormously, since the I/O bandwidth is greatly reduced.

Other utilities shipped with the system are 'rebase' an utility to change the base address of a dll (size: 5K!), a dump utility adapted from Matt petreck's famous 'pedump' utility, a diff and patch utility to apply and build patches and a lot more.

You can even get the full source code for all the tools.