Cliff Hacks Things.

Sunday, October 22, 2006

propasm, the Propeller Assembler

I've released propasm, my assembler for the Parallax Propeller eight-core microcontroller. Unlike the Parallax-provided assembler, it:

  • Runs on practically anything;

  • Can be automated from scripts or Makefiles;

  • Provides really good feedback;

  • Supports characters outside of US English;

  • Is written in Java;

  • Will be open-sourced shortly.



This was an interesting project for me, because it involved a number of separate areas of my brain. This was my first hand-written traditional parser; I've written plenty of parsers before, but this one is broken into a traditional scanner/lexer and recursive-descent parser. Since I was writing the parser by hand, I was able to make the error messages clear and specific — something generated parsers often lack.

I also had to reverse-engineer the binary format and parts of the instruction set, as Parallax's documentation on both is spotty.

Since it's in Java, rather than x86 assembler (like Parallax's), it's somewhat slower. It takes all of 10ms to load, parse, wire, and write out a decent-sized program.

...of course, to use Parallax's, I have to boot Windows, start an IDE, open my text file, and click four times in a menu. I think propasm wins overall. :-)

Update: I'm already on my first point release; I'd made an error on the I/O code that caused UTF-8 to be mangled on some platforms. Fortunately, my test case using ウーロン茶 as a variable name failed. If only I'd had the tests written when I released... :-)

2 Comments:

  • I've downloaded version 14 from the google SVN repository, but it won't compile. It seems to be missing PllMode and ClockMode. I've searched the entire repo and can't find any comment references to it. Can you suggest a previous version to try that will actually compile?`

    By Blogger Chuck Wolber, at 7:53 PM  

  • It is very encouraging to go through the post for it contains information about these interesting feature. A very good and informative article indeed. I will share it to my friends and add this website to my bookmark lists! Thanks.thai singles

    By Blogger Unknown, at 10:26 PM  

Post a Comment

<< Home