Click here to Skip to main content
Licence 
First Posted 4 Mar 2004
Views 51,963
Bookmarked 21 times

C to Assembly Cross-compiler

By | 4 Mar 2004 | Article
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

About the Author

M Owais Khan

Web Developer

Pakistan Pakistan

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
Generalcross compiling Pinmembernanlu0:22 28 May '09  
Questionmore Pinmemberkye4kye3:28 29 Mar '07  
Questionhi PinmemberGrkem13:58 17 Mar '07  
QuestionQuestion!!! PinmemberPankaj Paul1:48 13 Mar '07  
Generaldisapointed Pinmembertoxcct7:10 6 Oct '04  
GeneralRe: disapointed Pinmembergwapo22:54 14 Jun '06  
GeneralNice PinmemberAlexander M.2:58 7 Mar '04  
GeneralI use PinmemberNorm Almond6:01 6 Mar '04  
GeneralHmm PinmemberAnon E. Mouse5:24 5 Mar '04  
GeneralSo... PinmemberJörgen Sigvardsson5:04 5 Mar '04  
GeneralRe: So... [EDITED] PinmemberJohn M. Drescher13:43 5 Mar '04  

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 5 Mar 2004
Article Copyright 2004 by M Owais Khan
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid