Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

C to Assembly Cross-compiler

0.00/5 (No votes)
4 Mar 2004 1  
An example cross-compiler program with full source code

Introduction

C2ASM is a cross compiler and it converts "C" code into "ASSEMBLY" code. It uses a subset of "C" language. It is written as a console mode application. If you want to read more about C2ASM, download the documentation provided with the article in an RTF file. You may also download the source code and also sample input programs in "C".

It uses no Object Code Optimizations or Register Allocation Algorithms. It's a very simple cross compiler. I made it as my semester project for learning purposes only. At the time I was making it, I got no help on how to create Intermediate Code and to do Code Generation. So, I submit this here and hope that my C2ASM project may help other beginner Compiler Writers to get an idea on how to make a complete working compiler from start to finish. Thanks for any feedback that you might have for me.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here