Shop OBEX P1 Docs P2 Docs Learn Events
Assembly Question: Why is wz the exception and not the rule? — Parallax Forums

Assembly Question: Why is wz the exception and not the rule?

RaymanRayman Posts: 14,162
edited 2007-09-27 17:56 in Propeller 1
I guess the wz option is something only found in the Prop.· After debugging my CMP...IF_Z instructions, I found that I needed to use it...

What I don't understand is why did they make wz (and wc) the exception and not the rule?· Was it just to make·it painfully·clear that this option is available?· Why not make it the rule and have nz and nc indicate an exception?· This way it would be more like other assembly languages...

Comments

  • deSilvadeSilva Posts: 2,967
    edited 2007-09-26 22:27
    It would be more like other machine code, indeed.
    But setting flags implicitely is one of the worst features of all those machines smile.gif

    I don't want to start an argument. But I find it perfect as it is done with the Prop.

    And some advertisement: Reading my Turorial might further your machine code programming smile.gif
  • RaymanRayman Posts: 14,162
    edited 2007-09-26 22:34
    I read a lot of your Tuturial. Obviously, I stopped before the wz part...
  • deSilvadeSilva Posts: 2,967
    edited 2007-09-26 22:50
    Happy to hear this! The "wz part" is described in detail on page 15 and 16 smile.gif

    Post Edited (deSilva) : 9/26/2007 11:05:06 PM GMT
  • Mike GreenMike Green Posts: 23,101
    edited 2007-09-26 22:51
    Rayman,
    I think it was done this way to make places stand out where Z and C are changed. It's easier to look back in your program flow to see where they may have been changed rather than to look for a place where they weren't inhibited from changing. It's not unusual to set only one of these two bits on a compare while carrying some other unrelated information in the other flag.
  • Graham StablerGraham Stabler Posts: 2,507
    edited 2007-09-26 22:52
    It all becomes clear as soon as you start using the if_nc type instructions

    Graham
  • rjo_rjo_ Posts: 1,825
    edited 2007-09-27 17:56
    you'd end up typing more... and making more errors.

    Rich
Sign In or Register to comment.