* $Source: /commtar/monoBANK/RTS/tKconvts.a,v $ * $Revision: 1.1 $ $Date: 88/02/29 17:04:46 $ $Author: callen $ PUNCH ' ALIAS #EBCE2AS,#EBCA2ES' *********************************************************************** * * * This module contains the routines that are called by * * the ebcdic package for the ascii to ebcdic and ebcdic * * to ascii conversion routines. * * * *********************************************************************** #CONVTS ADASTART 'Ebcdic/ascii conversion routines',CICS=NO SPACE #EBCE2AS ADAENTRY 0,EXIT *********************************************************************** * * * Procedure E2A (in EC : Estring; out AC : String) * * * * --| Convert ebcdic string to ascii string. * * * *********************************************************************** BAL R10,COMMON do common stuff L R15,=V(#TOASCI) addr of conversion routine BALR R14,R15 do the conversion B EXIT #EBCA2ES ADAENTRY 0,EXIT *********************************************************************** * * * Procedure A2E (in AC : String; out EC : Estring) * * * * --| Convert ascii string to ebcdic string. * * * *********************************************************************** BAL R10,COMMON do common stuff L R15,=V(#TOEBCI) addr of conversion routine BALR R14,R15 do the conversion *********************************************************************** EXIT ADARTN *********************************************************************** * * * Common area that sets up the calls to the conversion * * routines. Registers for calls are set up as follows: * * * * R1 -> address of string to convert in place * * R11 -> length of string * * * * The host string, PR1, is first moved to the target * * string PR3, and then the conversion routine is called. * * * *********************************************************************** COMMON DS 0H LR R8,PR2 save address of dope LR R1,PR3 set R1 for conversion call L R7,PR2STO load PR2 storage area address L PR2,4(R7) load dope upper bound L R7,0(R7) load dope lower bound SR PR2,R7 get length (actually len-1) LA PR2,1(,PR2) correct length for move LR R7,PR2 save length for use LR R11,PR2 set up R11 for conversion call MVCL PR3,PR1 move the string *********************************************************************** * * * String is now ready to be converted ----------- * * Since string is converted in place, the return values are * * set up here before the actual convertion takes place. * * * *********************************************************************** ST R1,PR3STO store addr of string on stack ST R8,RETDOPE store addr of dope on stack BR R10 *********************************************************************** ADAGLOBL EJECT ADAUDA EJECT ADAPSTAK RETDOPE DS F STKLOCAL EQU * ADAPSTKE ADAEND SPACE END * $Cprt start$ * * Copyright (C) 1988 by Intermetrics, Inc. * * This material may be used duplicated or disclosed by or for the * U.S. Government pursuant to the copyright license under DAR clause * 7-104.9(a) (May 1981). * * This project was spnsored by the STARS Foundation * Naval Research Laboratory, Washington DC * * $Cprt end$