I am guessing the answer to your MAX question boils down to this Max(A,B) = (|A-B|+A+B)/2
and probably takes advantage of an Assembler arithmetic rule which produces |A-B|. Maybe this one: "If a SETA symbol is used in the operand field of a SETC statement, the arithmetic value is converted to an unsigned integer" -Victor- ========================================= I think John has started something here... So here's an interesting problem I had to solve some years ago... 1) Given two non-relocatable equates, define a third equate that is equal to the MAX of those two. (As far as I know, the Assembler still does not offer MAX and MIN built-in functions.) 2) Extend that solution to three or more equates. (One z/XDC macro has internal logic that resolves the MAX of around fifty equates. It goes on and on for pages!) The answer I have in mind works for equates that are not resolvable at macro pass time. In fact, the solution does not use macro pass logic at all, no SETx symbols, no nothing. Hint: Central to the ability to do this is a rather "unusual" characteristic of the rules of arithmetic that the Assembler follows. (Did I just give it away?) Now I'm sure some of you, like me, have worked this out decades ago, so if you already know how to do this, feel free to brag, but please hold off posting an actual answer for a few days to give others a crack at this exercise. Thanks, Dave Cole ColeSoft Marketing 414 Third Street, NE Charlottesville, VA 22902 EADDRESS: [email protected] Home page: www.colesoft.com User's Group: www.xdc.com (on LinkedIn) Facebook: www.facebook.com/colesoftware Videos: www.youtube.com/user/colesoftware
