View Single Post
Old 11-12-2010, 02:24 PM   #1
lrizzo
Member
lrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tonguelrizzo can tie a knot in a cherry stem with his or her tongue
 
Posts: 23
Karma: 22222
Join Date: Oct 2010
Device: kindle3
tiny C compiler on the kindle

I have prepared a version of the Tiny C compiler (tcc) that can run on the Kindle.
You can find it at http://info.iet.unipi.it/~luigi/kindle/#TCC-for-Kindle

For those who don't know, tcc is a single, small binary that can compile and runs C code on the fly. The only serious impairment (common to all C compilers) is that you often need a ton of headers to build anything useful;
however, i am preparing a workaround which allows you to put all the definitions in a single file and ignore errors for missing headers.

For those who want to give it a try -- the tarball contains the compiler, tcc, and some tiny objects (crt*.o) which you should put in /usr/lib (they are not needed if you just want to run code on the fly).
Then edit your favourite hello world program and run it with
tcc -run helloworld.c
lrizzo is offline   Reply With Quote