Assembly Question: Why is wz the exception and not the rule?
Rayman
Posts: 14,789
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...
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
But setting flags implicitely is one of the worst features of all those machines
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
Post Edited (deSilva) : 9/26/2007 11:05:06 PM GMT
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
Rich