Tom Quarendon wrote:
does I get a segmentation violation at the point that it tries to write
to the save area. The assembler code is as follows:
USING FRED,15
FRED CSECT
B SAVE-*(15)
L 15,0(1)
B RETURN
SAVE DS 0H
STM 14,12,12(13)
BALR 11,0
LA 0,*-FRED
SLR 11,0
LA 2,SAVEAREA
ST 2,8(13)
ST 13,4(2)
* LR 13,2
B 4(15)
*
RETURN DS 0S
* L 13,SAVEAREA+4
L 14,12(13)
LM 0,12,20(13)
BR 14
LTORG
SAVEAREA DS 18F
END
As it stands above, I can call the code fine. Uncomment the LR 13,2 and
the program crashes at that point.
In addition to the save area store problem, the B RETURN would
fail, because R15 (the declared base) is clobbered by the
preceding instruction. You need a DROP 15 and USING FRED,11 at
that point.
Gerhard Postpischil
Bradford, VT
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@bama.ua.edu with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html