Shop OBEX P1 Docs P2 Docs Learn Events
Going insane with a simple assembly task — Parallax Forums

Going insane with a simple assembly task

JasonDorieJasonDorie Posts: 1,930
edited 2013-04-22 11:20 in Propeller 1
I've started writing what will ultimately be a fixed-point math co-processor for my quadrotor, but I'm at an impasse here and would love a fresh set of eyes on it. I have to assume I'm doing something stupid, but I can't for the life of me figure out what it is.

I've attached the code - There's a very simple test file that sets some variables to known values, then calls my MathAccel cog to load a value from HUB into the cog, then store it back out to a different HUB variable, and display the results through the debug terminal.

The output SHOULD be:
(spin time) 25
(mathaccel time) 10 10

But the 2nd "10" is coming out "100", which means my command to write the value back to a different variable isn't working.

I'll be very grateful if someone can spot what I've done wrong.

Thank you.

Comments

  • kuronekokuroneko Posts: 3,623
    edited 2013-04-22 00:24
    @ in DAT sections only resolves to the relative offset. You'd have to manually add the DAT section offset.

    This [thread=139401]post[/thread] may help.
  • JasonDorieJasonDorie Posts: 1,930
    edited 2013-04-22 11:20
    Thank you very much, Kuroneko. Adding the offset to my command stream addresses has the code running as expected. I appreciate your help.
Sign In or Register to comment.