00000000 1 SUBA DS 0H
R:F 00000000 2 USING SUBA,15
00000000 3 LABELA DS 0H
00000000 07FE 4 BR 14
00000002 6 SUBB DS 0H
R:F 00000002 7 USING SUBB,15
00000002 0000 0000 00000000 8 B LABELA
** ASMA034E Operand LABELA beyond active USING range by -2 bytes
** ASMA435I Record 8 in SYS22063.T154658.RA000.ST002ASM.SYSIN.H02(MLHTEST)
on volume: SW444C
00000006 07FE 9 BR 14
00000008 11 SUBC DS 0H
R:F 00000008 12 USING SUBC,15
00000008 A7F4 FFFC 00000000 13 J LABELA
0000000C 07FE 14 BR 14
*Mark*
On Fri, Mar 4, 2022 at 3:37 PM Seymour J Metz <[email protected]> wrote:
> What is not clear is whether it is an error and whether the branch would
> have the same issues. It is very common for multiple subroutines in the
> same assembly to use the same base registers, in which case the branch back
> might be valid. If the routines don't share the same register setup then it
> might be time to ask whether they really should be together..
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> ________________________________________
> From: IBM Mainframe Assembler List [[email protected]] on
> behalf of Mark Hammack [[email protected]]
> Sent: Friday, March 4, 2022 4:28 PM
> To: [email protected]
> Subject: Re: Jump vs. Branch
>
> Well, assuming a single register USING (i.e. USING FUNCTION,R12), then your
> talking 4k vs 64k address. It is *very* apparent when LABEL is in a
> subroutine that is prior to the current subroutine (and therefore USING).
> BRANCH will get an assembler error, BRANCH RELATIVE will not.
>
>
> *Mark*
>
>
> On Fri, Mar 4, 2022 at 3:23 PM Seymour J Metz <[email protected]> wrote:
>
> > USING can take more than one register, so the range may be more than 4
> KiB
> > even for old instructions.
> >
> > I'm confused.Is the issue jump versus R-form branch or jump versus
> RX-form
> > branch? An R-form branch with bad register contents will certainly take
> you
> > to Cloud La-La Land, but an out of range label on either a branch or a
> jump
> > should give you an error at assembly time.
> >
> >
> >
> > --
> > Shmuel (Seymour J.) Metz
> >
> https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fmason.gmu.edu%2F~smetz3&data=04%7C01%7Csmetz3%40gmu.edu%7C0dcc8bf7c0a7403c2ae508d9fe25e933%7C9e857255df574c47a0c00546460380cb%7C0%7C0%7C637820261061118411%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=fw7TLQLmXf4X89VmKArzope0rugOtwl7QHtgSGd3B28%3D&reserved=0
> >
> > ________________________________________
> > From: IBM Mainframe Assembler List [[email protected]] on
> > behalf of Mark Hammack [[email protected]]
> > Sent: Friday, March 4, 2022 3:58 PM
> > To: [email protected]
> > Subject: Re: Jump vs. Branch
> >
> > Using BRANCH, LABEL would need to be within +4k (x'0FFF') of the
> > *current* USING.
> > If you have USING/DROP on each subroutine, LABEL may or may not fall into
> > that range. If it does, the program will branch to LABEL and go into
> lala
> > land. If it doesn't, the assembler will throw an error.
> >
> > Using JUMP, LABEL needs to be +/- 64k (BRC) from the current instruction.
> > No assembler error but the run time error still exists.
> >
> > In the case that caused the S0Cx, B LABEL would have been caught by the
> > assembler.
> >
> >
> >
> > *Mark*
>