On 16 February 2015 at 13:32, <mar...@pi-sysprog.de> wrote: > Rob, > > >> it is rather unpleasant to find code store into the save area.... > > even in the middle of the code you can see, that it either uses r13 in > the store (with no local save area) or R13+4 as field in a load and > then the store to some other location.... > > You're right, when you have a local save area you need to go a bit further to pass something in a register on return. And in my case it was using R1 to address the save area, and thus had the value in R3 to be returned in R1 upon exit.
> Can you imagine my surprise, when I found code (in an untouched > subroutine) that relied on some register in the MIDDLE of the routine > (3500 lines of code) to be the same as it was, when the calling routine > was left. I had to use PER SLIP Storage alteration to find that tiny > little bug/instruction. > > Yes, things like that seem to be popular in return code aggregation or if you want to avoid a series of error messages: look at whether the return code already was set already. Writing assembler in some way is a bit like I used to say about the building permits in Belgium: "It's great that you can build whatever house you want. Too bad your neighbour can too." or as my German friends phrase it: "In der Beschränkung zeigt sich der Meister" Rob