Article View: bit.listserv.asm370
Article #342SAVE/RETURN macros in AMODE 64
From: Michel Castelein
Date: Fri, 16 Sep 2005 18:28
Date: Fri, 16 Sep 2005 18:28
75 lines
3311 bytes
3311 bytes
Girls and Boys,
In z/OS V1R3 and using HLASM R4, the following lines of assembler coding:
MAINPGM CSECT
MAINPGM AMODE 64
MAINPGM RMODE ANY
SYSSTATE AMODE64=YES <-- !!!
PROLOG SAVE (14,12)
expand into:
PROLOG DS 0H
STMG 14,12,8(13) <-- !!!
Cf. the Store Multiple "Grande" (STMG) instruction:
Seemingly, the SAVE macro assumes there is a caller-provided 144-byte Format
4 save area available to save the ENTIRE 64-bit contents of R14-R12.
1st question:
For a main program, the caller is the system (z/OS).
What kind of save area is supplied by z/OS V1R3 (and later)?
Is it still a traditional 72-byte "Format 0" save area or is it a new
144-byte Format 4 save area?
Or does the type of save area provided by z/0S depends upon the AMODE of the
(main) program?
In the same assembler source, i.e. still under control of SYSSTATE
AMODE64=YES, the macro call
RETURN (14,12),RC=0
expands into:
LMG 14,12,144(13) <-- !!!
LA 15,0(0,0)
BR 14
Cf. the Load Multiple "Grande" (LMG) instruction:
Seemingly, the RETURN macro also assumes the caller-provided save area to be
of type Format 4.
2nd question:
- The distance 144 used by LMG goes beyond the 144-byte save area!
- 144 happens to be the offset in a (208-byte) Format 5 area used to
save/restore the HIGH HALVES of R0-R15!
What point am I missing (or is it a bug)?
BTW, the LMG is the cause for a S0C4 with reason code 11. Not a surprise to
me.
The complete JCL is:
//ARCIS07X JOB 'HLASM',CLASS=A,MSGCLASS=X,COND=(0,NE),NOTIFY=&SYSUID
//STEP1 EXEC PROC=ASMACLG,PARM.C=ASA HLASM Release 4 - z/OS V1R3
//C.SYSIN DD *
MAINPGM CSECT
MAINPGM AMODE 64
MAINPGM RMODE ANY
SYSSTATE AMODE64=YES
PROLOG SAVE (14,12)
BALR R12,R0
USING *,R12
LA R11,SAVEAREA
ST R11,8(R13)
ST R13,SAVEAREA+4
LR R13,R11
*
EPILOG L R13,SAVEAREA+4
RETURN (14,12),RC=0
SAVEAREA DC 18F'0'
YREGS
END
/*
//L.SYSIN DD DUMMY
TIA for the response.
Michel
--------------------------------------------------
Michel Castelein - Arcis Services
MVS-OS/390-z/OS system engineer & instructor
arcisATadvalvasDOTbe
http://www.geocities.com/michelcastelein/
Technical Details
Message-ID:
<432b0ef8$0$29922$ba620e4c@news.skynet.be>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.agarik.com!skynet.be!newspost001!tjb!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: fcdcb,5aef08407a8abe43,start X-Google-Thread: fd4af,5aef08407a8abe43,start X-Google-Attributes: gidfcdcb,gidfd4af,public X-Google-Language: ENGLISH,ASCII-7-bit Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!news.agarik.com!skynet.be!newspost001!tjb!not-for-mail From: "Michel Castelein" <arcis@advalvas.be.without.the.no.spam.tail> Newsgroups: bit.listserv.asm370,bit.listserv.ibm-main Subject: SAVE/RETURN macros in AMODE 64 Date: Fri, 16 Sep 2005 20:28:21 +0200 X-Newsreader: Microsoft Outlook Express 6.00.2900.2527 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527 Lines: 77 Message-ID: <432b0ef8$0$29922$ba620e4c@news.skynet.be> Organization: -= Belgacom Usenet Service =- NNTP-Posting-Host: 26e6857c.news.skynet.be X-Trace: 1126895353 news.skynet.be 29922 81.247.161.108:11537 X-Complaints-To: usenet-abuse@skynet.be