Shop OBEX P1 Docs P2 Docs Learn Events
SPIN and ASM — Parallax Forums

SPIN and ASM

Spork FrogSpork Frog Posts: 212
edited 2007-03-21 09:56 in Propeller 1
I have two quick questions for whoever knows the answers:

1. Can you launch a spin routine from inside an ASM program? I assume the answer is yes, and I also assume it has to do with setting the PAR address correctly in COGINIT. However I don't know for sure on either of those.

2. Has there been a spec released for Spin such as tokens and such so, say, one could create his own Spin compiler?

Thanks in advance cool.gif

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2007-03-20 22:38
    1) Sort of. Chip had posted a routine to do this some time ago. You can download a copy of FemtoBasic and look in the object OS_i2cSpiInit.spin near the end in a routine "nowBootSpin". This changes the clock if needed, then starts up the Spin interpreter on a program just loaded into memory. You can't start just a routine. The Spin interpreter expects a whole program or something that looks like one. You could theoretically force the interpreter to execute a routine, but I've never tried it and there's not enough publically documented information to do it.

    2) No. My understanding is that it won't be although one or two people have done a nearly complete "clean room" analysis and posted what they believe are the descriptions of the byte codes.
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-03-21 09:56
    This thread may also help:

    calling spin code from assembly
Sign In or Register to comment.