Div_by_zero

Why no greater than (>) contact in DirectSoft?

5 posts in this topic

I'm almost embarrassed to ask this question as I'm sure the answer is going to be incredibly simple and obvious, but why is there no greater than (>) contact in DirectSoft?

For what it's worth, I'm running 6.1a.

Thanks for any replies.

Share this post


Link to post
Share on other sites

Koyo decided not to include one.  No idea why, it's just not there.  I used to wonder the same thing myself.  After the first ten years of using DirectLogic, I quit worrying about it.  The second ten years has got me to quit worrying about a lot of other things as well.  :)

Share this post


Link to post
Share on other sites

I'm not sure why it's not included either. I do know a common mistake when comparing a value is to miss comparison for the Equality. Therefore when it's necessary (on other platforms), you'll need to compare:

<= and >

or

< and >=

By omitting the > it'll be impossible to make this mistake. That's the only reason I can think of.

Share this post


Link to post
Share on other sites

To me, > is virtually the same as >=.

You set >= one higher than what you would have set > and it works the same.

So >10 would be >= 11. At 10, neither do nothing and at 11 both are triggered.

So > would effectively be a duplicate command and therefore why have it if you are after efficiency.

Anyhow, that's my take on it.

Share this post


Link to post
Share on other sites

I worked with some microprocessors. A comparison between numbers were often performed by subtracting them and utilizing result flags. For example if we subtracted A from B and then saw that the negative result flag was set I could say that A > B, if it wasn't set then A ≤ B. A zero flag would indicate equality but the state of < would take more operations. I'm just guessing but I think it is similar to this.

Many times you can achieve the other comparisons by swapping the arguments but many times a constant can't be on the left hand side. If needed load the constant into a V register.

Edited by b_carlton
1 person likes this

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now