But the challenge was to put a variable content into register 15 (from
halfword SURC),
not a constant value known at compile time.
As another poster said, in traditional programs with, say, 370 opcodes,
my two solutions
are probably the only valid ones.
Kind regards
Bernd
Terry Sambrooks schrieb:
Hi,
In a recent post responding to a query on the following code:
"01988A 98EC 9464 19A98 42272 LM R14,R12,CHKSU_SAVE
01988E 48F0 94A0 19AD4 42273 LH R15,SURC
019892 07FE 42274 BR R14"
Bernd Oppolzer responded with:
"There are two solutions (at least) to this problem: split the LM into a load for
R14 and a LM which starts at R0 and 20(r13), leaving R15 untouched, so you can put the
return code into R15 before the reload, or: modify the contents of the savearea (16(r13)
for R15) before doing the reload."
It might be argued that if the SAVE Macro cannot be used, the following
maintains the integrity of the save area.
LM R14,R12,CHKSU_SAVE
LA R15,SURC(0,0)
BR R14
SURC EQU rc-value
Kind Regards - Terry
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html