Shop OBEX P1 Docs P2 Docs Learn Events
Orochi — Parallax Forums

Orochi

SeairthSeairth Posts: 2,474
edited 2014-11-16 19:36 in Propeller 1
I mentioned a while ago that I was working on an assembler for the P1V (though it also works for the P1). Well, life happened and it got shoved to the side. I finally got back to it and cleaned it up enough for others to use. If you are interested, you can find it at:

https://github.com/Seairth/Orochi


It's written in python, but it doesn't mean you need to know python to use it. Further, I tried organizing the code so that you can easily add support for new instructions, constants, etc. with no python experience at all (just copy the code pattern you see and you should generally be safe). This will hopefully make it easier for people to quickly prototype new instructions and test them out.

As noted on github, there are still some improvements that I plan to make. If anyone has any suggestions, please let me know. And, as always, you can fork it and make the changes yourself.

Comments

  • pik33pik33 Posts: 2,366
    edited 2014-11-15 07:01
    How this works? I write a program in pasm, then compile with it, and then upload to the Propeller and what then? The uploaded pasm program starts in Cog 0?
  • SeairthSeairth Posts: 2,474
    edited 2014-11-15 07:44
    pik33 wrote: »
    How this works? I write a program in pasm, then compile with it, and then upload to the Propeller and what then? The uploaded pasm program starts in Cog 0?

    Yup, that's it. Use pasm.py to assemble and upload.py to upload/program the .bin or .eeprom that you created. The SPIN bootstrap just starts in cog 0, then immediately turns around and starts the real code in the same cog.

    Also, you can save a hex version of your file if you want to look at the generated code in a text editor. This can come in handy to verify that a newly-added instruction is resulting in the right bit pattern (for instance).

    Again, the focus of the code is to make it easy to modify, even for non-python programmers. Look in assembler/lang.py to see what I mean. For instance, adding new instructions are just a matter of copying an existing entry in the instructions dictionary, then tweaking the "parameters" as necessary. Note that the template basically matches Parallax's own documentation format, so it should be familiar to everyone.
  • pik33pik33 Posts: 2,366
    edited 2014-11-15 08:09
    This is a good start point. I am not Python programmer but at least I am a programmer :) so another language is not a problem.

    Edit: Do you know this?

    Kitaro - Orochi: https://www.youtube.com/watch?v=uEJsZOkA7BY
  • SeairthSeairth Posts: 2,474
    edited 2014-11-16 19:36
    pik33 wrote: »
    This is a good start point. I am not Python programmer but at least I am a programmer :) so another language is not a problem.

    Edit: Do you know this?

    Kitaro - Orochi: https://www.youtube.com/watch?v=uEJsZOkA7BY

    Hah. No, I hadn't. But I'm not surprised. Yamata no Orochi seems like a perfect subject for his works.

    As for my little project (which is admittedly must less grand than Kitaro's work), please make sure to let me know if there are ways I can make it easier for you (or others) to modify the code without having to learn Python.
  • mindrobotsmindrobots Posts: 6,506
    edited 2015-10-18 00:21
    Hi Seairth,

    Have you played with this at all looking to have support for the P2? Getting away from PNUT and Windows dependency would be nice while we are playing with the FPGA P2s.

    I just grabbed a copy from Github....but that doesn't mean much for me! :)
  • Not yet. The P2 is different enough that it will take a non-trivial amount of time to get Orochi updated.

    I will eventually get around to it, but not soon.
Sign In or Register to comment.