You can - and should - expect of a compiler that it does such kind of
optimizations, but of course not of the HLASM toolkit macros - they only allow
for a structured form of control statements without branches (jumps) and labels,
but you have to do the necessary optimizations yourself. That's what ASSEMBLER
programming is all about :-)
Kind regards
Bernd
Am 25.04.2012 13:54, schrieb J.D.
> Yes, that's it !
>
> If A<>B I don't care about R1 and C,
> and if (it's known that) A=B I only have to test R1<= C
>
> I had put mental parentheses around the 2nd and 3rd conditions connected by the AND,
> never seeing that the 2nd condition was not even needed in the first place ...
>
> Many thanks !
>
>
> -----Message d'origine-----
> Objet : Re: Boolean logic in structured programming macroes
>
> The macros are only doing exactly what you are telling them - unfortunately in this
> case the second CLC in your "IF" is redundant and there is no need to code it.
>
> If "A<>B" is not satisfied, then there is no need to test "A=B" before your next condition.
>
> You should be able to code the following :
>
> IF (CLC,A,NE,B),OR,(CH,R1,LE,C)
> STH R3,NUMBER
> ENDIF ,
>
>
> R.S.
>
|