I'm in favor. I'd prefer some new verb other than USING, although I wouldn't go to mat if USING was more popular. To weaken my case, I think you can use "dummy" USINGs if needed (I do already for documenting a register that should not change).
USING DUMMY,R2 * This is the count One could define DUMMY to be anything, although something like a 0-length DSECT would eliminate the possibility of unpleasant surprises. sas On Mon, Jun 25, 2018 at 12:16 PM, Jonathan Scott < [email protected]> wrote: > There is no option at present to detect modification of a base > register which is currently active in a USING, but variants of > this idea already appear at least four times in the requirements > list (from GUIDE, SHARE, customers, IBM internal etc.) which was > passed to the HLASM team some years ago by Dr John Ehrman. > > The simplest approach would be a new FLAG option (which could be > modified using ACONTROL if required), avoiding the need for any > syntax changes to the language itself. However, many existing > programs are likely to modify registers within the scope of a > USING for good reason (for example when loading the pointer to > the next entry in a linked list). Another suggested approach is > to mark selected registers as "read-only" within sections of > code, which would require new syntax, perhaps as an extension > of the existing ACONTROL statement. > > When the TYPECHECK options, assembler types and program types > were first introduced, there were ambitious plans to enhance the > language so that the assembler would understand enough about the > intent of the source code to be able to add many additional > checks, as for a high-level language, and these type extensions > were intended to be just a first step. However, it seems that no > next step could be identified which would provide sufficient > value to make it worth the effort of updating source code to > enable new features! > > Jonathan Scott, HLASM > IBM Hursley, UK > -- sas
