|
The NEG doesn't make sense in this context. LT returns either 0 or -1, so the NEG would leave the false case unchanged and the true case would be converted from -1 to +1 which will still be interpreted as true by the if-goto (every value other than 0 is true). Therefore your observation is right, the loop would end early here.
I presume the NEG should be replaced by a NOT, then the code makes sense and will execute as (likely) intended. Generally since LT, GT and EQ leave a boolean constant on the stack, the result has to be inverted with NOT if required.
|