ASLREGS TITLE ' - Display All Registere - Abbydale Systems LLC.' ASLREGS CSECT ASLREGS AMODE 31 ASLREGS RMODE 31 *---------------------------------------------------------------------* * ASLREGS * *---------------------------------------------------------------------* * * * Description : A simple program to display the contents of all the * * registers from a calling program. It saves using a * * SNAP function. * * * * Created on : 05 Aug 1997 * * Created by : Kevin Ferguson * * : Userid(MIT001) * * : Using ABBYDALE.DEVL.SOURCE(ASLREGS) * * * * Called by : Anything by using LINK EP=ASLREGS * * * * Calls : Nothing * * * * Change Activity : * * * * Macro Usage : HEXPRINT * * * *---------------------------------------------------------------------* * ©Copyright of Abbydale Systems LLC. * *---------------------------------------------------------------------* USING ASLREGS,R15 BAKR R14,R0 Linkage stack LAE R12,0(R15,0) Set R12 as base register DROP R15 Drop temporary base ... USING ASLREGS,R12 <=== Program base addressability STM 14,12,12(13) Save callers registers L R2,0(R1) Address of passed parameter list LA R5,Workarea_Length Length for storage obtain STORAGE OBTAIN,ADDR=(6),SP=0,LENGTH=(R5),LOC=ANY LTR R15,R15 Did it work? BZ Crack_On Yes - Branch to keep going WTO 'ASLREG01E - Storage obtain failed. Abend S0C3' CRASH EX R15,CRASH Abend Crack_On DS 0H ST R13,4(R6) Save callers save area in ours ST R6,8(R13) Save ours in the callers area LR R13,R6 Get workarea address ... USING Workarea,R13 ... and establish addressability XR R0,R0 Clear for return code ST R0,CONDCODE ... and save it * ** Mainline process * L R8,4(R6) Get callers save area L R9,20(R8) Get R0 Value MVC OurReg,=c'0 ' Move in reg name BAS R10,Display_It Go and display it L R9,24(R8) Get R1 Value MVC OurReg,=c'1 ' Move in reg name BAS R10,Display_It Go and display it L R9,28(R8) Get R2 Value MVC OurReg,=c'2 ' Move in reg name BAS R10,Display_It Go and display it L R9,32(R8) Get R3 Value MVC OurReg,=c'3 ' Move in reg name BAS R10,Display_It Go and display it L R9,36(R8) Get R4 Value MVC OurReg,=c'4 ' Move in reg name BAS R10,Display_It Go and display it L R9,40(R8) Get R5 Value MVC OurReg,=c'5 ' Move in reg name BAS R10,Display_It Go and display it L R9,44(R8) Get R6 Value MVC OurReg,=c'6 ' Move in reg name BAS R10,Display_It Go and display it L R9,48(R8) Get R7 Value MVC OurReg,=c'7 ' Move in reg name BAS R10,Display_It Go and display it LR R7,R8 Load R7 to preserve base L R9,52(R7) Get R8 Value MVC OurReg,=c'8 ' Move in reg name BAS R10,Display_It Go and display it L R9,56(R7) Get R9 Value MVC OurReg,=c'9 ' Move in reg name BAS R10,Display_It Go and display it L R9,62(R7) Get R10 Valie MVC OurReg,=c'10' Move in reg name BAS R10,Display_It Go and display it L R9,66(R7) Get R11 Value MVC OurReg,=c'11' Move in reg name BAS R10,Display_It Go and display it L R9,70(R7) Get R12 Value MVC OurReg,=c'12' Move in reg name BAS R10,Display_It Go and display it L R9,72(R7) Get R13 Value MVC OurReg,=c'13' Move in reg name BAS R10,Display_It Go and display it L R9,12(R7) Get R14 Value MVC OurReg,=c'14' Move in reg name BAS R10,Display_It Go and display it L R9,16(R8) Get R15 Value MVC OurReg,=c'15' Move in reg name BAS R10,Display_It Go and display it * ** End of process * END DS 0H LA R2,Workarea_Length Size of area to free LR R1,R13 Restore save area L R13,4(1) STORAGE RELEASE,ADDR=(1),SP=0,LENGTH=(R2) Free it L R15,CONDCODE Load R15 with condition code PR , * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Display_It DS 0H STM R9,R10,Two Save the working registers LA R10,WTP+18 Point at where to write it HEXPRINT R9,R10 Print it MVC WTP+30(2),OurReg Move in register name WTP WTO 'ASLREG02I xxxxxxxx = R ',ROUTCDE=11,DESC=7 LM R9,R10,Two Restore the working registers BR R10 Return to caller SPACE 2 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * REGISTER EQUATES * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * R0 EQU 0 * R1 EQU 1 * R2 EQU 2 * R3 EQU 3 * R4 EQU 4 * R5 EQU 5 * R6 EQU 6 * R7 EQU 7 * R8 EQU 8 A S L E Q U C * R9 EQU 9 * R10 EQU 10 EQUATE PREFIX TO NUMERIC SYMBOLS IN ORDER * R11 EQU 11 TO MAKE THE USE OF REGISTER OPERANDS IN * R12 EQU 12 INSTRUCTIONS SELF EXPLANITORY.THIS ALSO * R13 EQU 13 CREATES ENTRIES IN CROSS REFERENCE. * R14 EQU 14 * R15 EQU 15 * LTORG * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Workarea Map * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * Workarea DSECT Workarea_Length EQU Workarea_End-Workarea SAVEAREA DS 18F Register save area CONDCODE DS F COndition code Two DS 2F Save area for Display_It OurReg DS CL2 Register name Workarea_End EQU * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * END ASLREGS PUNCH ' MODE AMODE(31)' Binder AMODE statement. PUNCH ' MODE RMODE(ANY)' Binder RMODE statement. PUNCH ' ENTRY ASLREGS' Binder Module Entry Point. PUNCH ' NAME ASLREGS(R)' Binder Module Name. END , End of Binder Input.