IVXHELLO TITLE 'Simple IPCS Verb Exit saying Hello' * =================================================================== * * Name: IVXHELLO * * Author: David Alcock :: http://www.planetmvs.com * * Purpose: Simple Hello World IPCS VERBEXIT * * Invoked in IPCS option 6: VERBX IVXHELLO * * Disclaimer: This program is FREEWARE. Use at your own risk. It * is provided for your enjoyment and neither David * Alcock or his employer provides any warranty for it's * use. I'd like to hear how it works on your system. * * This software is not in the public domain but is * available free of charge and with source code * provided. It is copyright 1997-2009+ by David Alcock * All rights reserved. * =================================================================== * * IBM macros * PRINT NOGEN YREGS , Equate registers PRINT GEN BLSABDPL , Get IPCS mapping DSECTs #ADPLBUF EQU 133 Length of our output buffer * * Enter Housekeeping * IVXHELLO CSECT , IVXHELLO AMODE 31 IVXHELLO RMODE ANY BAKR R14,0 Save regs LAE R12,0(R15,0) Get base register USING IVXHELLO,R12 Get addressibility STORAGE OBTAIN,LENGTH=DSAL,LOC=BELOW Obtain storage LR R13,R1 Point to Save Area USING DSA,R13 Get addressibility to area MVC 4(4,R13),=C'F1SA' Indicate stack SA EREG R1,R1 Get R1 at entry off the stack ST R1,DSAABDPL Save input ABDPL address * * Print "Hello World" in IPCS output * bas r14,Initialize_Line mvc 0(11,r15),=c'Hello World' bas r14,Print_Line * * Exit Housekeeping * Exit DS 0H LR R2,R13 Get storage address STORAGE RELEASE,LENGTH=DSAL,ADDR=(R2) Release storage SLR R15,R15 Set return code PR , Return to caller EJECT * * Initialize line output line in IPCS buffer * * Output: R15 has start of line * Initialize_Line DS 0H L R1,DSAABDPL L R15,ADPLBUF-ABDPL(R1) Locate Print Message MVI 0(R15),C' ' Get blank MVC 1(#ADPLBUF-1,R15),0(R15) ..Propagate it BSM 0,R14 * * Print Line to IPCS output * Print_Line DS 0H BAKR R14,0 L R2,DSAABDPL Locate ABDPL L R15,ADPLSERV-ABDPL(R2) Locate IPCS service routine CALL (15), Call IPCS service routine @ ((2), ..ABDPL @ =A(ADPLSPRT)), ..Service: Print line @ MF=(E,DSAParm) PR , * * Constants * LTORG , DROP R12,R13 * * Dynamic Save area * DSA DSECT , DS 18F Register Save Area DSAABDPL DS A Address of the IPCS ABDPL DSAParm DS 8F Parameter list for calls DS 0D DSAL EQU *-DSA END ,