Notes on the example below:
YREGS * Define register names ... * This routine calls an external routine to get some data. * Then it calls a subroutine to examine/validate that data, * Note that the GETDATA routine does not use a return code, * but the TESTDATA edit routine does use a return code. * If TESTDATA finds an error, we call an error routine. * TESTDATA will set RETCODE to either 0, 4, or 8 (0 means normal) * L R15,=V(GETDATA) * Load address of program to get some data LA R1,PARAMLST * provide address to store that data. BALR R14,R15 * Call the external program. L R15,=A(TESTDATA) * Load the address of the edit rtn. LA R1,PARAMLST * Load address of the parameter list BALR R14,R15 * go execute the data test rtn. SR R1,R1 * Zero 3 high bytes of work register IC R1,RETCODE * Load the return code, and use it as * * as an index into the RETLIST table. L R15,RETLIST(R1) * Load addr of proper error handling rtn. BALR R14,R15 * Go execute error rtn * * Or fall through if there was no error. NORMAL DS 0H * Continue normal execution. ... PARAMLST DC A(DATA) * Address of data area. DC A(RETCODE) * Place for SUBRTN to put the return code. * DATA DC CL132' ' * Data RETCODE DC X'00' * One byte return code * RETLIST DC A(NORMAL) * This addr is used if there was no err. DC A(ERROR) * This rtn handles errors. DC A(NOTFOUND) * This rtn takes care of "no data" ...
To the Opcodes Overview.
To the English Homepage for Hlasm.com.
To the General Homepage for Bixoft and Hlasm.com.
This site is a member of WebRing. You are invited to browse the list of mainframe-loving sites. |
Dinos are not dead. They are alive and well and living in data centers all around you. They speak in tongues and work strange magics with computers. Beware the dino! And just in case you're waiting for the final demise of these dino's: remember that dinos ruled the world for 155-million years! | |
[ Join Now | Ring Hub | Random | | ] |
Below you find the logo of our sponsor and logos of the web-standards that this page adheres to.