Well, X_4G should be Xl8'ffff ffff'. That second constant should be labeled X_32G.
sas On Sat, Jun 27, 2015 at 12:47 AM, Steve Smith <[email protected]> wrote: > OK. Your problem is with the the assembly-time arithmetic, which it > seems is always 32-bit signed, even if you are dealing in logical. > > Can you change the the second operand to specify the power instead of the > actual value? STORAGE OBTAIN has the STARTBDY operand that does it that > way. > > RNDUP ®,&POWER > LGHI R0,1 > SLLG R0,R0,&power > AGHI R0,-1 > AGR ®,R0 > RNDDOWN ... > > Lots more instructions, but it does support tera, peta, and exabyte > boundaries if you ever need them. > > You could also just generate constants for the needed values: > > X_2G DC Xl8'7fff ffff' > X_4G DC Xl8'7 ffff ffff' > ...&c. > > and use AG ®,X_&Bound > > sas > > On 6/26/2015 23:39, Mark Boonie wrote: > > Hi Steve, > > I'm not sure I understand your question. The rounding *is* being done at > run time, using the NILF and ALGFI instructions generated by the > RNDUP/RNDDOWN macros. These macros are intended to work with any power of > two up to, ideally, 2G. What I'm having trouble with is getting the > macros to generate the correct immediate values to be assembled into the > instructions when the rounding boundary is 2G. This is a bit of a pain > since that boundary is used fairly frequently in the code I'm working on. > > - mb > > ----- Forwarded by Mark Boonie/Poughkeepsie/IBM on 06/26/2015 11:25 PM > ----- > > From: Steve Smith <[email protected]> <[email protected]> > To: [email protected] > Date: 06/26/2015 11:08 PM > Subject: Re: Rounding to a 2G-byte boundary > Sent by: IBM Mainframe Assembler List > <[email protected]> <[email protected]> > ------------------------------ > > > > Out of curiosity, what is this 2gb boundary needed for (at assembly > time)? It would be a lot easier to calculate at run-time. > > > sas > > > -- sas
