If you are removing 104 MVC or ZAP instructions and a 4-byte constant and replacing them by two MVC instructions and 256-byte constant, you are reducing the overall program size by (104*6+4)-(2*6+256)=360 bytes. The 256-byte literal constant could be coded instead as a named constant at the very end of addressability, so only the start would need to be addressable. That is of course more storage than using two propagated MVCs with a 4-byte offset, but as I said before, if you simply want it to run faster, it is likely that MVC from a constant will be significantly faster. It is likely that MVC with a 1-byte offset is an optimised case, as that is commonly used to initialise storage to a pad value such as spaces.
Jonathan Scott -----Original Message----- From: IBM Mainframe Assembler List <[email protected]> On Behalf Of Brian Westerman Sent: 01 December 2025 01:00 To: [email protected] Subject: Re: quick way to initialize Packed fields? Won't this add an extra 64x4 bytes to the program's addressibility? Brian On Sun, 30 Nov 2025 09:54:11 -0000, Jonathan Scott <[email protected]> wrote: >Overlapping MVC where the overlap is not just 1 byte is likely to be much >slower than an ordinary MVC, as it is less likely to be handled in an >optimised way. > >I think the fastest solution would be one ordinary MVC per 256 bytes, >something like the following (using the same literal in both cases to avoid >needing a second one, even though the second move is less than 256 bytes): > MVC P1(256),=64PL4'0' > MVC P1+256(104*4-256),=64PL4'0' > >I had an ASSERT macro to verify assembly-time assumptions, so I'd add >something like ASSERT L'P1,EQ,4 in this case. If you don't have an equivalent >macro, you can at least use this: > DC 0SL2(L'P1-4,4-L'P1) Verify assumption that L'P1 is 4 > >[I'm retired now so the above is all from memory and has not been tested]. > >Jonathan Scott
