* $Source: /commtar/monoBANK/RTS/tKtoebci.a,v $ * $Revision: 1.1 $ $Date: 88/02/29 17:26:08 $ $Author: callen $ PUNCH ' ALIAS #TOEBCI' #TOEBCI TITLE 'MVS/Ada Run-time support - Ascii to EBCDIC (internal)' #TOEBCI START SPACE 1 * Called via: * r1 -> Ascii string to be converted in place * r11 = Length of string * BALR 14,15 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),TOEBCTB 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),TOEBCTB * * This is the ASCII to EBCDIC translate table * TOEBCTB DC X'00' NUL DC X'01' SOH DC X'02' STX DC X'03' ETX DC X'37' EOT DC X'2D' ENQ DC X'2E' ACK DC X'2F' BEL DC X'16' BS DC X'05' HT DC X'15' LF (EBCDIC NL - this is non-standard) 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'3C' DC4 DC X'3D' NAK DC X'32' SYN DC X'26' ETB DC X'18' CAN DC X'19' EM DC X'3F' SUB DC X'27' ESC DC X'22' FS DC X'1D' GS DC X'1E' RS DC X'1F' US DC C' !"#$%&&''()*+,-./' DC C'0123456789:;<=>?@' DC C'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`' DC C'abcdefghijklmnopqrstuvwxyz{' DC X'6A' DC C'}~' DC X'07' * * Repeat above with high order bit set * DC X'00' NUL DC X'01' SOH DC X'02' STX DC X'03' ETX DC X'37' EOT DC X'2D' ENQ DC X'2E' ACK DC X'2F' BEL DC X'16' BS DC X'05' HT DC X'15' LF (EBCDIC NL - this is non-standard) 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'3C' DC4 DC X'3D' NAK DC X'32' SYN DC X'26' ETB DC X'18' CAN DC X'19' EM DC X'3F' SUB DC X'27' ESC DC X'22' FS DC X'1D' GS DC X'1E' RS DC X'1F' US DC C' !"#$%&&''()*+,-./' DC C'0123456789:;<=>?@' DC C'ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`' DC C'abcdefghijklmnopqrstuvwxyz{' DC X'6A' DC C'}~' DC X'07' 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$