Loading ...
Sorry, an error occurred while loading the content.
 

"Small C" Slightly OT

Expand Messages
  • bill rowe
    I came across Small C on the Dr. Dobbs web site.    http://www.drdobbs.com/developer-network-small-c-compiler-book/184415519?queryText=%2522small%2Bc%2522 
    Message 1 of 82 , Sep 1, 2012
      I came across Small C on the Dr. Dobbs web site.   
      http://www.drdobbs.com/developer-network-small-c-compiler-book/184415519?queryText=%2522small%2Bc%2522%c2%a0

      The original version was published in 1980 and could compile itself. An optimizing version was published in 1983 and it's been ported to a variety of other systems such as the 6502 but not the 1802.

      I downloaded it to a Vista machine and, rather to my surprise, the .exe ran fine and compiled itself.  I had to poke around to find a 16 bit linker that would handle its object file
      http://download.microsoft.com/download/vc15/Update/1/WIN98/EN-US/Lnk563.exe
       but once I found one it linked and the resulting .exe works just like the original! 

      It won't work on my 64 bit Win7 system but it's still sort of amazing that the 30 year old code compiles and runs on the many times removed hardware and software.  I think the author mentions he wanted it for his 1.8Mhz NorthStar and now it's running on my 2GHZ machine - boy is it quick!  I haven't tried anything other than the compiler and hello world but that runs through a lot of code by itself.

      There are several other available C compilers that could be considered for 1802 targets including GCC, LCC and LLVM.  These are newer, more complete, builds but Small C is the first one that I've been able to get a complete working build of.  If you're interested in playing with the guts of a compiler this could be something to start with.
    • wmaalouli
      Please do! Walid
      Message 82 of 82 , Sep 15, 2012
        Please do!

        Walid

        --- In cosmacelf@yahoogroups.com, Lee Hart <leeahart@...> wrote:
        >
        > On 9/12/2012 9:20 PM, Charles Richmond wrote:
        >
        >
        > I had assumed that there was about zero interest in 8TH, given the large
        > number of much bigger and more powerful versions of FORTH already "out
        > there". But the comments in this thread have encouraged me to move it up
        > the list a bit. :-)
        >
        > --
        > If you would not be forgotten
        > When your body's dead and rotten
        > Then write of great deeds worth the reading
        > Or do these great deeds, worth repeating.
        > -- Ben Franklin, from Poor Richard's Almanac
        > --
        > Lee A. Hart http://www.sunrise-ev.com/LeesEVs leeahart@...
        >
      Your message has been successfully submitted and would be delivered to recipients shortly.