02/26/85 xmodem_io_ The xmodem_io_ I/O module is used to transfer files between a Multics process and a microcomputer that runs the XMODEM data transfer protocol. It performs 8-bit stream I/O over an asynchronous communications channel using the xmodem protocol. Entry points in this module are not called directly by users; rather the module is accessed through the I/O system. Attach Description: xmodem_io_ switch {-control_args} Arguments: switch is the name of the target I/O switch. The switch must be open for stream_input_output. The I/O module for the target switch must be supported by the timed_io_ module. The user is responsible for setting any modes required by the xmodem protocol. For example, modes for the user_i/o switch would be: "no_outp,8bit,breakall,^echoplex,rawi,^crecho,lfecho,^tabecho,rawo" Control arguments: -error_detecting_code STR, -edc STR specifies the error-detecting code to be used for the file transfer, where STR may be one of the following: check_sum, cs specifies that the checksum error-detecting code is to be used for the file transfer. cyclic_redundancy_code, crc specifies that the CRC-CCITT error-detecting code is to be used for the file transfer. Note, because it is the receiver that determines the type of error-detecting code, this control argument is incompatible with the stream_output opening mode. Default is check_sum. Open Operation: The xmodem_ I/O module supports the stream_input and stream_output opening modes. Close Operation: When opened for stream_output, the close entry transmits any remaining data in the internal buffer before closing the switch. If there are less than 128 bytes in the buffer, the buffer is filled with the NUL ASCII character, 000 (octal), before transmission. See Buffering below. Put Chars Operation: The put_chars entry splits the data to be written into 128-character blocks. The appropriate xmodem control characters are added to the beginning and end of each block. For further explanation of the put_chars entry, see the iox_$put_chars entry. Get Chars Operation: The get_chars entry reads and decodes xmodem blocks, removes the xmodem control characters, and returns the message text to the caller's buffer. For further explanation of the get_chars entry, see the iox_$get_chars entry. Get Line Operation: The get_line entry reads and decodes xmodem blocks, removes the control characters, and returns the message text to the caller's buffer. Characters are returned until either a newline character is placed in the buffer or the buffer is filled. For further explanation of the get_line entry, see the iox_$get_line entry. Control Operation: This operation is not supported. Modes Operation: This operation is not supported. Buffering: The xmodem protocol uses 128 data characters per packet. Data that is not a multiple of 128 characters is stored in an internal buffer by the xmodem_io_ I/O module. Thus, those users concerned with efficiency should provide a multiple of 128 data characters for I/O operations. Notes: No particular line speed is guaranteed when transferring data between Multics and a microcomputer. Line speed is dependent on the microcomputer and the load of the FNP and communication system for Multics. Due to the nature of the XMODEM protocol, files may not be successfully transferred to Multics over high-speed lines. The actual limit depends on the site configuration and current load. Definitions: 01(HEX) 01(OCT) 04(HEX) 04(OCT) 06(HEX) 06(OCT) 15(HEX) 25(OCT) Transmission Medium Level Protocol: Asynchronous, 8 data bits, no parity, one stop bit. There are no restrictions on the contents of the data being transmitted. Any kind of data may be sent: binary, ASCII, etc. No control characters are looked for in the 128-byte data messages. Message Block Level Protocol: The standard transmission portion of a message block is a 132 character block without framing characters. Each block of the transfer looks like: <255-blk #><..128 data bytes..> where: = 01 (Hex). = binary number, starts at 01 increments by 1 and wraps 0FF (Hex) to 00 (Hex). <255-blk #> = The one's complement of the block number. = A one-character checksum or two-character CRC-CCITT. The checksum is the sum of the data bytes only. The CRC-CCITT is a 16-bit remainder obtained by dividing 16 12 5 the data bit string by the polynomial X +X +X +1. File Level Protocol: When writing programs that implement the XMODEM protocol, users should follow the procedures listed below: In both sending and receiving programs, all errors should be retried ten times. The Receiving Program: The receiver should have a 10-second timeout and send a every time it times out. The first timeout that sends a signals the transmitter to start. Once into receiving a block, the receiver must go into a one-second timeout for each character and the checksum. If a valid block is received, the receiver must transmit an . For invalid blocks, a must be transmitted. The Sending Program The sender should start transmission upon receipt of a from the receiver. If the block is received successfully (i.e., the receiver sends an ), the next block should be sent. If the receiver responds with a , the transmission has failed, and the sender should retransmit the last block. When the sender has no more data, he should send an and await an . If it does not get one, the sending program should repeat the . ----------------------------------------------------------- Historical Background This edition of the Multics software materials and documentation is provided and donated to Massachusetts Institute of Technology by Group BULL including BULL HN Information Systems Inc. as a contribution to computer science knowledge. This donation is made also to give evidence of the common contributions of Massachusetts Institute of Technology, Bell Laboratories, General Electric, Honeywell Information Systems Inc., Honeywell BULL Inc., Groupe BULL and BULL HN Information Systems Inc. to the development of this operating system. Multics development was initiated by Massachusetts Institute of Technology Project MAC (1963-1970), renamed the MIT Laboratory for Computer Science and Artificial Intelligence in the mid 1970s, under the leadership of Professor Fernando Jose Corbato. Users consider that Multics provided the best software architecture for managing computer hardware properly and for executing programs. Many subsequent operating systems incorporated Multics principles. Multics was distributed in 1975 to 2000 by Group Bull in Europe , and in the U.S. by Bull HN Information Systems Inc., as successor in interest by change in name only to Honeywell Bull Inc. and Honeywell Information Systems Inc. . ----------------------------------------------------------- Permission to use, copy, modify, and distribute these programs and their documentation for any purpose and without fee is hereby granted,provided that the below copyright notice and historical background appear in all copies and that both the copyright notice and historical background and this permission notice appear in supporting documentation, and that the names of MIT, HIS, BULL or BULL HN not be used in advertising or publicity pertaining to distribution of the programs without specific prior written permission. Copyright 1972 by Massachusetts Institute of Technology and Honeywell Information Systems Inc. Copyright 2006 by BULL HN Information Systems Inc. Copyright 2006 by Bull SAS All Rights Reserved