Shop OBEX P1 Docs P2 Docs Learn Events
Variable from spin to assembler and vice versa — Parallax Forums

Variable from spin to assembler and vice versa

Luiz mauricio mionLuiz mauricio mion Posts: 77
edited 2008-08-20 20:36 in Propeller 1
Anyone know how pass variable from spin to assembler code for multiples variables?
Thank you

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-08-20 13:56
    This post is being moved from the Completed Projects forum to the Propeller forum as it is off topic in the original forum which is for Completed Projects only. Please read the Forum Guidelines and post in the correct forum for the subject of your message.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • Mike GreenMike Green Posts: 23,101
    edited 2008-08-20 14:09
    There's a simple example near the bottom of this thread: http://forums.parallax.com/showthread.php?p=601870 in the posting dated 11/7/2006 10:38 PM. This shows how you can store values in the data that's to be copied to the new cog. It also shows how to pass an address in the PAR register which can be used with the RDxxxx and WRxxxx instructions. The PAR register can also be copied to another location and a constant added to it to get an address of a 2nd or 3rd value. Look at the source for the FullDuplexSerial object that's included with the Propeller Tool. It uses this technique to pass a series of values to the assembly portion of the object.
  • Luiz mauricio mionLuiz mauricio mion Posts: 77
    edited 2008-08-20 20:36
    THANKYOU Mike Green
Sign In or Register to comment.