I realize that unintuitive things happen when you start dealing with
limits of values, but I don't understand what I'm seeing here. I tried
using Robert Ngan's approach and changed my code to this:
RANGE EQU X'80000000'
&RANGE SETA RANGE SET symbol version of RANGE equate
...
RNDUP R6,&RANGE
The macro now looks like this:
MACRO ,
RNDUP ®,&BOUND
MNOTE *,'RNDUP &BOUND'
&BND SETA &BOUND
AIF (&BND LT 0).NEG
ALGFI ®,&BND-1
AGO .RNDDOWN
.NEG ANOP ,
ALGFI ®,&BND+1
.RNDDOWN ANOP ,
RNDDOWN ®,&BND
MEND ,
The MNOTE produces '*,RNDUP 2147483648' which indicates that &BOUND is
being treated as a positive number, not a negative number. This would
contradict the definition of a hexadecimal self-defining term in the
Language Reference, which says: "The maximum value of a hexadecimal term
is X'FFFFFFFF'; this allows a range of values from ?2,147,483,648 through
2,147,483,647." As a result, the SETA statement that sets &BND to the
value of &BOUND fails with error ASMA102E, "Arithmetic term is not
self-defining term; default=0."
- mb
IBM Mainframe Assembler List <[email protected]> wrote on
06/25/2015 06:33:32 PM:
> From: Paul Gilmartin <[email protected]>
> To: [email protected]
> Date: 06/25/2015 06:33 PM
> Subject: Re: Rounding to a 2G-byte boundary
> Sent by: IBM Mainframe Assembler List <[email protected]>
>
> On 2015-06-25 16:00, Mark Boonie wrote:
> >
> > However, I can't specify the boundary as a symbol equated to 2G (e.g.,
> > SEGTBLRANGE EQU X'80000000') without getting an assembler error due to
an
> > overflow in an intermediate value. Does anyone have any alternative
ways
> >
> It's not "an intermediate value". X'80000000' is negative, which
> you probably don't want.
>
> > to do this? I really need the ability to handle 2G. Thanks.
> >
> I guess it's finally time for the RFE, which isn't a short-term
> solution. It's absurd that a 32-bit assembler purports to
> support 64-bit hardware.
>
> -- gil
>