Michel Castelein
2005-09-16 18:28:21 UTC
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/
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/