Shop OBEX P1 Docs P2 Docs Learn Events
how come cmp = sub nr but cmps <> subs nr? — Parallax Forums

how come cmp = sub nr but cmps <> subs nr?

mparkmpark Posts: 1,305
edited 2010-10-25 18:27 in Propeller 1
Opcode-wise, that is. What does cmps do that subs doesn't?

Comments

  • Cluso99Cluso99 Posts: 18,069
    edited 2010-10-25 02:41
    It is discussed in the latest rev of the manual with examples (see CMPS page 274).
    CMPS sets C if signed(D<S) whereas SUBS sets C on signed overflow. Sometimes both cases of C are required.
  • mparkmpark Posts: 1,305
    edited 2010-10-25 05:51
    Thanks. New rev of manual, eh? Off to download it...
  • Cluso99Cluso99 Posts: 18,069
    edited 2010-10-25 18:27
    Also noticed the Q&A article has some great tips.
Sign In or Register to comment.