Shop OBEX P1 Docs P2 Docs Learn Events
PAR vs PTRA — Parallax Forums

PAR vs PTRA

I am converting one of my P1 programs and was able to make some small changes to get it to compile with spin2gui. I have not hooked it up to the hardware that I am going to test on yet, however, it does compile.

One of the issues I had was when an object is instantiated from the main.spin2 it gripes that PAR is not a recognized symbol. A little research in the P2 Tricks, Traps & Differences between P1 thread I found that PAR is replaced by PTRA with the caveat that "needs to be set by SETQ before COGINIT". Does anyone have an example of how to do that?


Comments

  • If you start it from Spin the coginit() function will handle this automatically; it's only a problem if you're using the raw PASM COGINIT (in which case you need to use SETQ with it).
Sign In or Register to comment.