* $Source: /commtar/monoBANK/RTS/tKtoasci.a,v $ * $Revision: 1.2 $ $Date: 88/02/29 17:23:14 $ $Author: callen $ PUNCH ' ALIAS #TOASCI' #TOASCI TITLE 'MVS/Ada Run-time support - EBCDIC to ASCII (internal)' #TOASCI START SPACE 1 * Called via: * r1 -> EBCDIC string to be converted in place to ASCII * r11 = Length of string * BALR 14,15 SPACE 1 R1 EQU 1 R11 EQU 11 R14 EQU 14 R15 EQU 15 SPACE 1 USING *,R15 CHKLEN LTR R11,R11 If length of string = 0, BZR R14 Return at once CH R11,=H'256' If length of string <= 256 BNH DOTR Go do Final Translation TR 0(256,R1),TOASCTB Translate the next 256 chars LA R1,256(,R1) Bump string pointer SH R11,=H'256' and decrement length B CHKLEN Go check again SPACE 1 DOTR BCTR R11,0 Last block of chars EX R11,TRANSLAT BR R14 SPACE 2 TRANSLAT TR 0(0,R1),TOASCTB * * This is the EBCDIC to ASCII translate table * TOASCTB DC X'00' NUL DC X'01' SOH DC X'02' STX DC X'03' ETX DC X'00' SEL DC X'09' HT DC X'00' RNL DC X'7F' DEL DC 3X'00' GE,SPS,RPT DC X'0B' VT DC X'0C' FF DC X'0D' CR DC X'0E' SO DC X'0F' SI DC X'10' DLE DC X'11' DC1 DC X'12' DC2 DC X'13' DC3 DC X'00' RES/ENP DC X'10' NL (ASCII LF - this is non-standard) DC X'08' BS DC X'00' POC DC X'18' CAN DC X'19' EM DC 2X'00' UBS,CU1 DC X'1C' IFS DC X'1D' IGS DC X'1E' IRS DC X'1F' ITB/IUS DC 2X'00' DS,SOS DC X'1C' FS DC 2X'00' WUS,BYP/INP DC X'0A' LF DC X'17' ETB DC X'1B' ESC DC 5X'00' SA,SFE,SM/SW,CSP,MFA DC X'05' ENQ DC X'06' ACK DC X'07' BEL DC 2X'00' unassigned DC X'16' SYN DC 4X'00' IR,PP,TRN,NBS DC X'04' EOT DC 4X'00' SBS,IT,RFF,CU3 DC X'14' DC4 DC X'15' NAK DC X'00' unassigned DC X'1A' SUB * end of control characters DC X'20' Space DC X'00' RSP DC 8X'0' unassigned (42-49) DC X'7C' cent sign DC X'2E' . DC X'3C' < DC X'28' ( DC X'2B' + DC X'7C' | DC X'26' & DC 9X'0' unassigned (51-59) DC X'21' ! DC X'24' $ DC X'2A' * DC X'29' ) DC X'3B' ; DC X'5E' ~ (Not sign) DC X'2D' - (minus sign) DC X'2F' / DC 8X'0' unassigned (62 - 69) DC X'7C' | (broken vertical bar) DC X'2C' , DC X'25' % DC X'5F' _ (underscore) DC X'3E' > DC X'3F' ? DC 9X'0' unassigned (70 - 78) DC X'60' * (back tick) DC X'3A' : DC X'23' # DC X'40' @ DC X'27' ' DC X'3D' = DC X'22' " DC X'0' unassigned (80) DC X'61' a (lower) DC X'62' b (lower) DC X'63' c (lower) DC X'64' d (lower) DC X'65' e (lower) DC X'66' f (lower) DC X'67' g (lower) DC X'68' h (lower) DC X'69' i (lower) DC X'0' unassigned (8A) DC X'7B' { (left curly brace) DC 5X'0' graphics not in ASCII + unassigned (8C - 90) DC X'6A' j (lower) DC X'6B' k (lower) DC X'6C' l (lower) DC X'6D' m (lower) DC X'6E' n (lower) DC X'6F' o (lower) DC X'70' p (lower) DC X'71' q (lower) DC X'72' r (lower) DC X'0' unassigned (9a) DC X'7D' } (right curly brace) DC 5X'0' wierd graphics (9C - A0) DC X'7E' ~ (tilde) DC X'73' s (lower) DC X'74' t (lower) DC X'75' u (lower) DC X'76' v (lower) DC X'77' w (lower) DC X'78' x (lower) DC X'79' y (lower) DC X'7A' z (lower) DC 3X'0' unassigned + wierd graphics (AA - AC) DC X'5B' [ (left square bracket) DC 15X'0' superscripts, etc. (AE - BC) DC X'5D' ] (right square bracket) DC X'5E' ~ (circumflex) DC X'00' graphics not in ASCII (BF) DC X'7B' { (left curly brace) DC X'41' A DC X'42' B DC X'43' C DC X'44' D DC X'45' E DC X'46' F DC X'47' G DC X'48' H DC X'49' I DC 6X'0' graphics not in ASCII + unasssigned (CA - CF) DC X'7D' } (right curly bracket) DC X'4A' J DC X'4B' K DC X'4C' L DC X'4D' M DC X'4E' N DC X'4F' O DC X'50' P DC X'51' Q DC X'52' R DC 6X'0' unassigned (DA - DF) DC X'5C' \ (backslash) DC X'0' NSP DC X'53' S DC X'54' T DC X'55' U DC X'56' V DC X'57' W DC X'58' X DC X'59' Y DC X'5A' Z DC 6X'0' unassigned (EA - EF) DC X'30' 0 DC X'31' 1 DC X'32' 2 DC X'33' 3 DC X'34' 4 DC X'35' 5 DC X'36' 6 DC X'37' 7 DC X'38' 8 DC X'39' 9 DC X'7C' vertical bar DC 5X'0' unassigned + E0 (FB - FF) * ETBL EQU * 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$