Shop OBEX P1 Docs P2 Docs Learn Events
C Compiler available shortly — Parallax Forums

C Compiler available shortly

scottascotta Posts: 168
edited 2008-01-15 23:41 in Propeller 1
How many of you would be interested in purchasing a C compiler/interpretor for the propeller ?

The package consists of a true Recursive Descent Compiler for the C language,
available for Windows, Linux, and, shortly, the Mac. The interpretor is written
in assembler, specifically for the Parallax Propeller. The programs are compact,
and execute immediately after the processor is powered up.

The combination is fantastic:

The current chip executes 120,000 C language expressions per second, PER COG .
The next chip (some months away...) should do 1 million/COG.


Supported commands: for,while,repeat,do,until,if,else if,else, goto, function calls

Parameters supported: multi-level function calls with multiple parameters and return value.

Preprocessor-directives: Simple commands like #DEFINE are supported, recursive parsing of defines' in the works

Currently supported operators (in order of precedence):
Postfix Add/Sub a++
Function
Prefix Add/Sub ++a
Logical Not !
Binary Not ~
Multiply *
Divide /
Modulus %
Add +
Subtract -
Shl <<
Shr >>
<
>
<=
>=
!=
==
Bitwise And &
Bitwise XOR ^
Bitwise OR |
Logical AND &&
Logical OR ||
Assignment y=((m*x)+b) * c /5

Sincerely,

Scott Alcock
Essay Software, LLC
EssaySoftware@gmail.com
«1

Comments

  • Paul Sr.Paul Sr. Posts: 435
    edited 2007-12-12 21:38
    Are you throwing out feelers to determine whether or not to undertake this effort or is there an actual product. Website?
  • scottascotta Posts: 168
    edited 2007-12-12 21:42
    The compiler has been in the works for about 1 year.

    Its ready for beta testers.

    Sincerely,

    Scott Alcock
    Essay Software, LLC
    EssaySoftware@gmail.com
  • Paul Sr.Paul Sr. Posts: 435
    edited 2007-12-12 21:49
    Great - good luck to you.

    If I were a 'C' person, I'd join in!
  • Ym2413aYm2413a Posts: 630
    edited 2007-12-12 21:57
    (Hmm). I'd give it a try.
    Sounds very interesting.

    I'm also glad to see linux support! [noparse]:)[/noparse]
    Thanks Scott.
    C was something I always wished for on the Prop.

    --Andrew Arsenault.
  • Nick MuellerNick Mueller Posts: 815
    edited 2007-12-12 22:35
    If I can use my ASM-parts (pure ASM only per cog), I'd like to try it out.

    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • mike101videomike101video Posts: 43
    edited 2007-12-12 22:41
    Price??

    But if it is in the right range. YES
  • Nick MuellerNick Mueller Posts: 815
    edited 2007-12-12 22:45
    Is errr... *was* it this Essay Software?
    <www.essay-software.com>

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • scottascotta Posts: 168
    edited 2007-12-12 22:51
    Sorry about the web-page confusion, the compiler
    will be posted on Essay-Software.com after the
    beta.

    Send an email if you wish to be on the beta.

    Sincerely,

    Scott Alcock
    Essay Software, LLC
    EssaySoftware@gmail.com
  • cowboy3398cowboy3398 Posts: 2
    edited 2007-12-12 23:02
    Hey that's great.

    Does it generate normal (small model) cog assembly?
    Does does it generate Bill Henning's large model code or some kind of P-code?

    ----
    The Code Cowboy
  • RaymanRayman Posts: 14,162
    edited 2007-12-12 23:19
    Sounds interesting... Can it use the existing VGA/TV drivers?
  • kittmasterkittmaster Posts: 77
    edited 2007-12-12 23:36
    I would be interested in this, I love C programming and pretty good with it.

    How much we talking here?

    Is there a beta discount?
  • scottascotta Posts: 168
    edited 2007-12-12 23:43
    Nick Mueller,
    A C-based "Cog New" is in the prototype area. If we add one level of
    precedence to the compiler, we end up at the 'object-thread' level. This
    level contains the code-space, and the execution space (I.E. C-code
    running on a cog). The object-thread level is where we intend on injecting
    assembler source/object code.

    cowboy3398,

    It, right now, is somewhere between the "Large Memory Model" and Pseudo-Code. The
    stack itself can reside in either local (cog based) or global (32K) memory. It seems there
    is nothing to be had at compiling to the cog level, not until the cog memory space
    exceeds a few Kb.

    Rayman,
    The existing video drivers are completely portable (minor wrapper changes), when
    we release the object-thread precedence. See the "Nick Mueller" section of this post.


    Sincerely,

    Scott Alcock
    Essay Software, LLC
    EssaySoftware@gmail.com
  • QuattroRS4QuattroRS4 Posts: 916
    edited 2007-12-13 01:35
    I'd be on for beta testing .. if it does what it says on the tin then I'm in....

    JT

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    'Necessity is the mother of invention'
  • Alex MackinnonAlex Mackinnon Posts: 25
    edited 2007-12-13 16:27
    Yes, I'd be interested.

    It depends on price of course and also how much of a memory footprint the p-code interpreter has.
  • deSilvadeSilva Posts: 2,967
    edited 2007-12-14 01:20
    Scotta,
    I have been hesitant to post to this thread, as your initial advertisement lacked any indication of professionality...
    Phrases like "120,000 C language expressions per second", or lists of supported operators are - lets say - particular.

    I should expect performance statements wrt acknowledged benchmarks and compliance statement wrt C-standard, subsets or waivers if applicable.... Compile time for larger programs (e.g. 30kb code generated) is interesting to know as well...

    It it not so tricky to develop a "recursive descent compiler" for a C-subset using the appropriate tools or languages. This is a standard homework for computer science graduates...


    A "C -instruction" per 8 µs is quite close to SPIN performance...
  • Mike GreenMike Green Posts: 23,101
    edited 2007-12-14 01:35
    deSilva,
    Don't be too hard on the guy. It sounds like we will have an abundance of C compilers this season, one for the Large Memory Model and one for another virtual machine more comparable to Spin's. I'm sure ImageCraft's will be done up in a very professional manner. This one may or may not be as professional and probably will have a less professional cost. It's expensive to do the benchmark and compliance testing properly and, if included, should add significantly to the cost. It's not so tricky to do a recursive descent compiler for C, but it's still a huge amount of work, not something for a holiday project and it would still be a significant effort for a term project.
  • deSilvadeSilva Posts: 2,967
    edited 2007-12-14 01:42
    Mike, you are definitely right (as nearly always...)
    It is mainly that I do not have a good feeling with it from the start...
  • DroneDrone Posts: 433
    edited 2007-12-14 08:34
    Will Regular Expressions be supported, PCRE or at least POSIX?
  • AleAle Posts: 2,363
    edited 2007-12-14 10:13
    Mike, deSilva: That is why porting gcc is probably the best option smile.gif, the compiler is already done, works, and works well, only the code-generating part needs to be done. It is still a lot of work.

    The more compilers/support we have, the better, even at professional prices. As a hobbyst, I'd prefer lower ones smile.gif
  • simonlsimonl Posts: 866
    edited 2007-12-14 10:39
    @Ale: Now that's real interesting. I just took a look at gcc.gnu.org and noticed they support OpenMP. According to www.openmp.org, "The OpenMP Application Program Interface (API) supports multi-platform shared-memory parallel programming in C/C++ and Fortran on all architectures..." - sounds like it's made for the Prop' YAY!

    Is anyone likely to port this though?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Cheers,

    Simon
    www.norfolkhelicopterclub.co.uk
    You'll always have as many take-offs as landings, the trick is to be sure you can take-off again ;-)
    BTW: I type as I'm thinking, so please don't take any offense at my writing style smile.gif
  • AleAle Posts: 2,363
    edited 2007-12-14 11:37
    simonl: Once I tried to port it to I really do not remember if it was H8/300H or 68HC11 well, was many years ago... but at that time, there were a couple of files to modify... In the case of avr, there are in gcc/gcc/config/avr, just a handful of source files.
    avr.c 140 kbytes
    avr.h
    avr.md 80 kbytes
    libgcc.S

    those are basically, and some others for inclusion in the gcc itself.

    But, we have to have a working LMM and asm compiler. (i'm working on that).
  • AleAle Posts: 2,363
    edited 2007-12-14 11:42
    Now, that I look closer, maybe the pdp11 is a better start, avr has many variants. The pdp11 sources are only 100 kbytes combined smile.gif
  • hippyhippy Posts: 1,981
    edited 2008-01-06 03:39
    Has anything come of this, anyone heard anything more ?
  • Nick MuellerNick Mueller Posts: 815
    edited 2008-01-06 09:54
    > Has anything come of this, anyone heard anything more ?

    No, not me. I've sent him an eMail that I'd like to test the compiler, but didn't get any answer.
    Imagecraft's C shouldn't be that far away ...


    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-06 13:21
    What about some wagers / book making smile.gif for the ImageCraft compiler?
    There are two absolutely unknows parameters to bet on:

    * First download of First Beta (for free, I hope smile.gif )
    -> deSilva's guess: around Easter (which is early this year)

    * The run time performance. We can choose one of the proposed Benchmarks in the other thread (i.e. computung fibo(29) recursively) Measurements by deSilva were

    - 26 sec with SPIN
    - 800 ms handcoded PASM
    http://forums.parallax.com/showthread.php?p=601870 - near the end

    This is a very PASM unfriendly benchmark!
    -> deSilva's hope: Imagecraft C will do it in 10 seconds!

    Post Edited (deSilva) : 1/6/2008 1:29:21 PM GMT
  • Beanie2kBeanie2k Posts: 83
    edited 2008-01-06 13:30
    deSilva said...
    What about some wagers / book making smile.gif for the ImageCraft compiler?
    There are two absolutely unknows parameters to bet on:

    * First download of First Beta (for free, I hope smile.gif )
    -> deSilva's guess: around Easter (which is early this year)

    * The run time performance. We can choose one of the proposed Benchmarks in the other thread (i.e. computung fibo(29) recursively) Measurements by deSilva were

    - 26 sec with SPIN
    - 800 ms handcoded PASM
    http://forums.parallax.com/showthread.php?p=601870 - near the end

    This is a very PASM unfriendly benchmark!
    -> deSilva's hope: Imagecraft C will do it in 10 seconds!

    OK, my guess is:

    1st Beta - April 1, 2008

    fibo(29) benchmark: 15 seconds
  • hippyhippy Posts: 1,981
    edited 2008-01-06 14:12
    @ Nick : I emailed also and heard nothing back.

    @deSilva : Yes, recursive fibo(29) is PASM unfriendly; my own PASM attempt took 1.8 seconds, over twice as long as yours. Well done with your coding there.
  • Nick MuellerNick Mueller Posts: 815
    edited 2008-01-06 15:07
    My bet is Feb 27, 3:36 local time.
    Speed is 2.1 times faster than Spin.


    Nick

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
  • deSilvadeSilva Posts: 2,967
    edited 2008-01-06 17:21
    We are all very close... That's not a good omen. In advanced project management that would translate to: August (2008 hopefully) and not much faster than SPIN smile.gif
  • Nick MuellerNick Mueller Posts: 815
    edited 2008-01-06 18:42
    Isn't that the most feared "RSN" in software development?


    Nick
    "Real Soon Now"

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Never use force, just go for a bigger hammer!

    The DIY Digital-Readout for mills, lathes etc.:
    YADRO
Sign In or Register to comment.