Way back when HLASM R1 was being tested, it did report on any overlaps. However during testing, we discovered that the PLX compiler used this same construct for its USINGs and it was decided that we should not produce the warning for that 1 byte overlap, so that there would not be protests from the internal developers about unnecessary warnings.
The reason I was told for this use of USINGs separated by 4095 was that it only requires a single LA to load the the subsequent base registers - remember this is long before the advent of immediate operand instructions - if we have two base registers, then this technique allows for an addressing range of 8191 and costs a single LA to load the second base register (assuming that the entry point is in another register). This gives you 8187 bytes for the actual module code. If you use USING *,2,3 then you have an addressing range of 8192 but it would cost you two LA instructions to load the second base, reducing the overall area for the module to 8184 I know that this is only 3 bytes difference, but back when this code was originally written, the real memory on machines was very small and 3 bytes could make a difference Kind Regards John From: Paul Gilmartin <[email protected]> To: [email protected] Date: 11/03/2017 23:35 Subject: Re: 50 year old assembler code still running. Sent by: IBM Mainframe Assembler List <[email protected]> On 2017-03-11, at 08:07, Charles Mills wrote: > > That was a common way of addressing CSECTs larger than 4K: multiple USING instructions. We sometimes used an offset of 4095 because it could be accomplished with LA as you see in your snippet. > And even today, HLASM does not issue overlapping USING warnings for overlaps of a single byte. Overlapping USING warnings are silly, given the availability of multiple displacement ranges. > -----Original Message----- > From: Tony Thigpen > Sent: Saturday, March 11, 2017 4:53 AM > > For instance, it appears that USING could not support multiple > registers. I see this code sequence in the 'start' macro: > > USING *,3 ESTABLISH REG 3 > USING *+4095,4 AND REG 4 > USING *+2*4095,5 AND REG 5 AS BASE REGS -- gil
