Shop OBEX P1 Docs P2 Docs Learn Events
Is there an "End" for assembly? — Parallax Forums

Is there an "End" for assembly?

SteelSteel Posts: 313
edited 2007-08-06 19:43 in Propeller 1
I have an assembly routine that I want to·run on a new cog and to end as soon as the last ASM command completes.· Is there an "END" to put into the ASM, or does the cog stop automatically when it runs the last ASM command?

The reason I ask is because I remember seeing that once your ASM routine finishes, it goes into an endless loop.


·

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2007-08-06 19:26
    No there is no end; the COG is filled after what you think is the last instruction with arbitrary data!
    You can either go into an "endless loop" - add WAITCNT to reduce power consumption! - or stop the COG, fetching your own COG number and kill it. Consult the manual smile.gif

    Post Edited (deSilva) : 8/6/2007 7:31:11 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-08-06 19:43
    Steel,
    deSilva is referring to this code fragment:
              cogid      temp
              cogstop  temp
    temp  long       0
    
    


    This effective resets the cog, shutting it down.
Sign In or Register to comment.