On 13 May 2016 at 03:25, <[email protected]> wrote: > you could extent your question to cover LOAD ON CONDITION... > then the generated code would look like this: > > CLI R9,UEPPLI PLI PROG? > LOC R8,0(R8),8 YES - FOLLOW POINTER > MVC PCB,0(R8) MOVE PCB TO MESSAGE > > Does not need a label for branching > > But I highly doubt that the macros do yet support this.
I'm not seeing what the macros would contribute to this. Those three lines of code are already clear and readable (well, I might quibble over the way you specify the CC), and require no labels or branches. Unlike some other structured assembler macros, the IBM/HLASM set doesn't really know anything about the instruction you specify in your IF statement. It just knows how to generate a suitable BC or BRC instruction after it, and how to manage ELSE and the like. So are you suggesting that you would write an IF specifying a CLI, and the macros would generate the LOC? Surely not; you would have to tell the IF that you want LOC, but then the macros would end up generating the very three instructions you've already written. Looked at another way, if the language was C or PL/I or something, would you expect to change its IF statement syntax, or to have the compiler generate LOC as part of a higher level understanding of the program's structure? Surely the latter, and I don't see that these HLASM macros will ever have such a high level understanding of the program or its data. Tony H.
