Div_by_zero Posted December 14, 2017 Report Posted December 14, 2017 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.
rlp122 Posted December 14, 2017 Report Posted December 14, 2017 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. :)
IO_Rack Posted December 14, 2017 Report Posted December 14, 2017 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.
rocket Posted January 7, 2019 Report Posted January 7, 2019 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.
b_carlton Posted January 7, 2019 Report Posted January 7, 2019 (edited) 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 January 7, 2019 by b_carlton 1
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now