08/25/87 hasp_workstation_ Syntax: hasp_workstation_ -control_args Function: The hasp_workstation_ I/O module performs record-oriented I/O to a single device of a remote terminal that supports the HASP communications protocol. Entry points in this module are not called directly by users; rather, the module is accessed through the I/O system. This module must be attached to a subchannel of a communications channel configured to use the HASP ring 0 multiplexer. (See the description of the HASP multiplexer in MAM Communications.) The module is designed primarily for use by the Multics I/O daemon. It expects output for the operator's console and line printers to have been properly formatted by the prt_conv_ module. Control arguments: The following control arguments are optional, with the exception of -comm, -device, and -tty; -comm hasp is required for compatibility with other I/O modules used by the I/O daemon. -device STR specifies the type of device for this attachment. STR must be one of "teleprinter", "reader", "printer", or "punch". The type specified by this control argument must match the type of device attached to the channel name defined by -tty. -ebcdic is accepted for compatibility with other I/O modules used by the I/O daemon, but is ignored by this I/O module. -forms STR specifies the type of forms to be used to print output directed through this attachment. STR is an arbitrary string of, at most, 32 characters whose interpretation is site dependent. This control argument is only permitted for a line printer. (Default is the null string.) -inside_page STR specifies the sequence of carriage control operations to be used to move to the top of the next "inside" page. An "inside" page is the page on which the I/O daemon prints head sheets. This control argument is only permitted for a line printer. The format of STR is described under "Carriage control specifications" below. (Default is "c1".) -no_block prevents going blocked on any IO with the channel. -outside_page STR specifies the sequence of carriage control operations to be used to move to the top of the next "outside" page. An "outside" page is the page on which the I/O daemon prints tail sheets. This control argument is only permitted for a line printer. The format of STR is described under "Carriage control specifications" below. (Default is "c1".) -physical_line_length N, -pll N is accepted for compatibility with other I/O modules used by the I/O daemon, but is ignored by this I/O module. -suppress_dial_manager suppresses calls to dial_manager_. -top_of_page STR specifies the sequence of carriage control operations to be used to move to the top of the next page. This control argument is only permitted for a line printer. The format of STR is described under "Carriage control specifications" below. (Default is "c1".) -terminal_type STR, -ttp STR is used to define the character set used by the remote terminal. STR must be the name of a terminal type defined in the site's Terminal Type Table (TTT). See "Character set specification" below for more information, including the default character set used if this control argument is omitted. -tty channel_name specifies the communications channel to be attached. The channel must be a subchannel of a HASP multiplexed channel (eg: a.h014.prt3). Open operation; The hasp_workstation_ I/O module supports the sequential_input, sequential_output, and sequential_input_output opening modes. Write record operation; The write_record entry converts the supplied data record from ASCII to the remote terminal's character set, converts the supplied slew control into the proper carriage control sequences for line printer attachments, performs data compression, and transmits the record to the HASP multiplexer. The structure and the referenced constants supplied to this I/O module are contained in the include file terminal_io_record.incl.pl1. Read record operation; The read_record entry returns a single record from the device, basically performing the inverse of the functions described for the write_record operation. The structure and the referenced constants this I/O module returns in the supplied buffer are contained in terminal_io_record.incl.pl1. List of control operations; This I/O module supports the following control operations; assign_to_user_process assigns channel to user identified by processid pointed to by info_ptr. The processid is a 36 bit aligned string. This is reserved for use by the Initializer process. detach_user_process takes channel away from user. The detachflag pointed to by info_ptr controls disposition of the channel. If 0, the channel is made available for other users. If not 0, the channel is placed in a hungup state. This is reserved for use by the Initializer process. end_write_mode ensures that all previously written data has been transmitted to the HASP multiplexer and then writes an end-of-file record for the device. get_channel_info get_channel_info returns the name of the attached channel and its hardcore device index. The info_ptr must point to the tty_get_channel_info structure defined in tty_get_channel_info.incl.pl1. hangup_proc is used to specify a procedure to be invoked when this attachment's channel is hung up. printer_off Nothing happens with this control order. An error code of zero is always returned. printer_on Nothing happens with this control order. An error code of zero is always returned. read_record_timeout performs a read_record operation, with a timeout specified. The info_ptr points to the input_timeout_info structure declared in io_timeout_info.incl.pl1. read_status determines whether or not there are any records waiting for a process to read. resetread flushes any pending input. resetwrite flushes any as-yet unprocessed output. runout ensures that all data has been transmitted to the HASP multiplexer from where it is guaranteed to be transmitted to the terminal. select_device and reset are ignored rather than rejected for compatibility with other I/O modules used by the I/O daemon. set_event_channel specifies the ipc_ event channel that receives wakeups for this attachment. Wakeups are received for input available, output completed, and state changes such as hangups and quits. The channel must be event wait. The info_pointer should point to a fixed bin(71) aligned quantity containing a valid ipc_ channel identifier. If this control order is not given before the opening of the switch, hasp_workstation_ attempts to allocate a fast event channel. Fast event channels cannot be converted to call channels and receive no associated message. If hasp_workstation_ cannot allocate a fast channel, an ordinary event wait channel is created and used. This control order is accepted while the switch is closed or open. If the switch is open, the new channel replaces the old one. set_forms changes the forms used for output on switch until the next "end_write_mode" control order is used. The info_ptr must point to the set_forms_info structure defined in hasp_set_forms_info.incl.pl1. set_line_type sets the line type associated with the terminal to the value supplied. The info_ptr should point to a fixed binary variable containing the new line type. Line types can be any of the named constants defined in the include file line_types.incl.pl1. set_term_type sets the terminal type associated with the channel to one of the types defined in the terminal type table. The info_ptr should point to the set_term_type_info structure declared in set_term_type_info.incl.pl1. Only the input and output translation tables for the specified terminal type are used. state returns the state of the channel as one of 4 values; 1 = hung up 2 = listening 5 = dialed up -1 = masked The info_ptr should point to a "fixed bin (17)" aligned variable. write_record_timeout performs a write_record operation, with a timeout specified. The info_ptr points to the output_timeout_info structure declared in io_timeout_info.incl.pl1. Modes operation; This module accepts all modes without error for compatibility with other I/O modules, but ignores them. Character set specification; This I/O module allows the specification of the character set used by the remote workstation through the -terminal_type attach option. If -terminal_type is given, the referenced terminal type must be defined in the site's TTT with both an input and output translation table. This module uses these translation tables to convert data from the remote workstation's character set to ASCII and vice versa. If -terminal_type is not given, the remote system is assumed to use EBCDIC as its character set. In this case, the subroutine ascii_to_ebcdic_ is used to convert data sent to the workstation; the subroutine ebcdic_to_ascii_ is used to convert data received from the remote system. Carriage control specifications; Multics I/O daemon software uses three special slew operations; skip to top of the next page, skip to top of the next inside page, and skip to the top of the next outside page. By default, this I/O module assumes that all of these slew operations can be simulated on the remote workstation's line printer by skipping to channel one. However, through use of the -top_of_page, -inside_page, and -outside_page control arguments, any sequence of carriage motions can be specified to simulate these slew operations. The format of this carriage control specification is Tn:Tn:Tn:... where n is a numeric value and T represents how to interpret that numeric value. T can be either c representing skip to channel n, or s representing slew n lines. For example, the string c7:s5:c12 means skip to channel seven, space five lines, and finally skip to channel 12. ----------------------------------------------------------- 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