Shop OBEX P1 Docs P2 Docs Learn Events
destination register question — Parallax Forums

destination register question

cncmemorymancncmemoryman Posts: 1
edited 2011-05-01 13:56 in Propeller 1
Hello. Have been following the forums for 5 months.
Found this at the end of the compiled SERIN command :mov 0-0,__temp2 .
Cannot find anywhere the structure that produces " 0-0" as a destination register.
Where is it documented that the use of a dash is ok?
Thanks.
Bill

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2011-05-01 13:25
    This is a common method to signify that this parameter (in this case the destination) is changed on the fly by another instruction. You should look at the label and then find where this label is used (quite likely in a movd instruction).

    Note, the modifying instruction cannot immediately preceed the modified instruction as the pipelined execution will have already fetched this instruction. i.e. you require at least 1 instruction between the modifying instruction and modified instruction.
  • MagIO2MagIO2 Posts: 2,243
    edited 2011-05-01 13:56
    It's not a dash, it's a minus. And this is an expression which is calculated at compile-time. Zero minus zero. And the result is used as destination register address, but, as Cluso already pointed out, it's irrelevant because it's changed BEFORE the instruction is executed.
Sign In or Register to comment.