Seymour J Metz wrote on 10/18/2024 4:54 AM:
Returning to a previous discussion, I have an assembly with
SYSSTATE ARCHLVL=7,OSREL=ZOSV2R5
that has some macro expansions that look like the date to S/360.
GETMAIN RU
L 0,=A(LENGTH)
L 15,=AL1(B'00000000',(0),(-),B'00000010)
I was going to say that GETMAIN/FREEMAIN are obsolete, but I see that
STORAGE OBTAIN (at ARCHLVL=2 because I haven't checked recently to see
what's safe to use for customers on the trailing edge) still generates
the above literal.
I would have expected
LAY 0,LENGTH
IILF 15,AL1(B'00000000',(0),(-),B'00000010)
FREEMAIN R
generates
CNOP
B *+8
DC A(LENGTH)
L 0,*-4
LA 1,0(,1)
I would have expected
LAY 0,LENGTH
LA 1,0(,1)
The suggested LAY could be IILF to support length of 2 MiB or longer.
STORAGE RELEASE generates better code even at ARCHLVL=2.
I hope that any resources that IBM puts into improving macros goes
into the STORAGE macro. There's no reason to bother improving
GETMAIN/FREEMAIN.
Ultimately, at ZSERIES(5), there's nearly no reason for any 2 or 4
byte literals. (From my notes, ZSERIES(5) seems to be ARCHLVL=4.) And
there's never been a good enough reason for branching around constants
for parameters. For some reason, the OS/360 authors didn't like
literals. IIRC, no OS/360 macros used literals, while DOS/360 macros did.
/Leonard
--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
עַם יִשְׂרָאֵל חַי
נֵ֣צַח יִשְׂרָאֵ֔ל לֹ֥א יְשַׁקֵּ֖ר
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN