Codes
The NVT usually requires that characters be transmitted in an eight bit ASCII code. Since the TELNET command is written to process EBCDIC codes ASCII codes received are translated into ASCII before being sent to a serving site. Figure 2 gives the complete definition of EBCDIC indicating the EBCDIC controls and EBCDIC graphics. Figure 3 gives the codes for the ASCII controls and graphics. The complete mapping between 8-bit EBCDIC codes and 8-bit network ASCII codes is shown in Figure 4. The EBCDIC newline code (NL) is mapped into the ASCII codes for the pair of characters CR-IF.
The following ASCII/EBCDIC mapping is used for the non-EBCDIC graphics:
ASCII EBCDIC
TILDE (7E) = (A1) NOT
BAR (7C) = (6A) OR
BACK SLASH (5C) = (EO)
CARAT (5E) = (71)
GRAVE (6O) = (79)
LEFT BRACE (7B) = (8B)
RIGHT BRACE (7D) = (9B)
LEFT BRACKET (5B) = (AD)
RIGHT BRACKET (5D) = (BD)
The ASCII control DC3 (X' 13') maps to the EBCDIC control TM (X'13'). The ASCII control NUL (X' oo') is sent to the terminal as the EBCDIC code for NULL (X' oo') and is not mapped into an IDLE (X'17').
The TELNET control hide-your-input is mapped into the EBCDIC code for bypass (print suppress) and the TELNET control noecho is mapped into the EBCDIC code for restore (print restore). If the TELNET control for echo is received, a message is printed and it is mapped into an IDLE. Similarly, if the TELNET control for break is received, a message is printed and it is mapped into an IDLE unless operation is in EBCDIC HALFDUP mode in which case the break is used to indicate that any received characters should be printed and the keyboard unlocked for input. If a data mark or an interrupt is received, no action is taken except to print a message to notify the user of this occurrence.