• Aucun résultat trouvé

APPENDIX H CARRIAGE CONTROL

Dans le document The Michigan Terminal System (Page 167-173)

The term carriage control refers to the user’s ability to control the vertical spacing of output.

Carriage control is used mainly for output to a terminal or a printer. If the user has specified carriage control, the first character of every record (if output to a printer or a terminal) is interpreted as a carriage-control character. The carriage-control character determines the vertical positioning of the output page and is not part of the printed text. The control character is stripped from the output record and printing begins with the second character, rather than replacing the first character with a blank and starting the printing with the blank. If the first character is not one of the legal codes for the particular device being used, a default option of single space is assumed, and the first character is printed as part of the output text. The character codes are independent of the source language used by the programmer.

MTS supports two types of carriage control: logical and machine. Both are used in the manner described above, differing only in the legal carriage-control characters and their effects. Logical carriage control is the more common, and, in general, the user need not be concerned with machine carriage control. MTS supports machine carriage control because a few old programs (notably

*ASMG) produce it. The use of machine carriage control is discouraged. In most cases in which carriage control is desired (such as output to printers and terminals), logical carriage control is enabled by default. To select either machine carriage control or no carriage control, the appropriate modifier must be specified. For a description of the carriage-control modifiers, see Appendix A to this section.

Logical Carriage Control

The following table describes the logical carriage-control characters and their effects.

Exceptions Character Effect Before Printing Printer Terminals blank Single space

0 Double space

− Triple space

+ Overprint previous line ss1

(print without spacing first)

& Suppress carriage return undef2 after printing

9 Single space and suppress ss

overflow3

1 Skip to top of next page4 skip 35 (physical line 4)

2 Skip to next 1/2 page6 skip 3

4 Skip to next 1/4 page6 skip 3

6 Skip to next 1/6 page6 skip 3

8 Skip to logical bottom of skip 3

page (physical line 63)

; Skip to top of next physical undef

page (physical line 1)

: Skip to top of next sheet undef

(physical line 1)

< Skip to bottom of physical undef

page (physical line 66)

1ss = single space.

2undef = undefined, in which case spacing defaults to single space and the undefined character is printed as text.

3Normally, the printer automatically skips the first and last three lines of a page. A logical carriage-control character of “9” suppresses this skip, causing these top and bottom margins to be ignored.

4“Top” is physically three lines down from the perforation because of the automatic margin mentioned above.

5Skip 3 lines on the UMnet/Michnet Computer Network, and skip 3 lines on the IBM 3278 Display Station (may be modified by TOP device command, seeMTS Volume 4: Terminals and Networks in MTS, Reference R1004).

6The logical page is divided into two halves, four quarters, and six sixths. A logical carriage-control character of 4 will, for example, position the page at the next quarter block even if this may in fact be the top or the middle of a page.

Machine Carriage Control

Machine carriage control acts at a lower level than logical control. In fact, logical control characters must be converted to machine control characters by system routines. It is very device- and installation-dependent and its use is not recommended. The first byte (i.e., character) of the output record is interpreted as the command in the channel command word (CCW) for an IBM 1403- or 1443-compatible line printer. The following table describes the codes and their functions.

Function Byte Value (hex) Write and no space after printing 01 Write and space 1 line after printing 09 Write and space 2 lines after printing 11 Write and space 3 lines after printing 19 Write and skip to channel 1 after printing 89 Write and skip to channel 2 after printing 91 Write and skip to channel 3 after printing 99 Write and skip to channel 4 after printing A1 Write and skip to channel 5 after printing A9 Write and skip to channel 6 after printing B1 Write and skip to channel 7 after printing B9 Write and skip to channel 8 after printing C1 Write and skip to channel 10 after printing D1 Write and skip to channel 11 after printing D9

To obtain the corresponding carriage-control operations (space or skip to Channel N) without printing, increase the value of the low-order digit by hexadecimal 2, i.e.,

Space two lines 13

Skip to Channel 5 AB

Unlike logical carriage control, machine carriage control spacesafterprinting.

The printer has a 12-channel tape which moves synchronously with the paper. For each line on the page, there is a corresponding line on the tape which may have a hole punched in one of the 12 channels. Thus, a command such as “Skip to Channel 1” has the effect of moving the tape, and, consequently, the paper, until a hole in column 1 of the tape is located. For the tape used by MTS, the effect of this command is to position the paper at the logical top of the next page, i.e., 3 lines down from the physical top. With the present system, Channels 9 and 12 are not available. A complete description of the carriage-control tape for printers at the Computing Center, NUBS, and UNYN (but not necessarily for other remote batch stations) follows.

Carriage-Control Tape

Physical Line of Page Channel Punched 1 11

Devices Line Printers

The line printer uses 11-inch paper printing 6 lines per inch, and thus 66 lines per page. Printing is usually done in a subset, called a logical page, of this total number of lines. Since the first and last 3 lines of the physical page are skipped, the logical page consists of 60 lines. Thus, in both machine and logical modes, a request to skip to the top of the next page, or equivalently to skip to Channel 1, positions the paper at the fourth physical line.

┌──────────────────────────────┐

With logical carriage control, the printer automatically skips over the 3-line margin on both sides of the perforation (unless a “9” carriage control is used, in which case this automatic “overflow skip” is suppressed).

In the horizontal direction, the line printers at the Campus Computing Sites have 132 print positions per line. Other printers may vary, usually from 120 to 144 print positions per line.

Page Printers

The page printer uses only 8.5 by 11-inch paper. The images may be printed either in vertical (portrait) or horizontal (landscape) orientation. The number of lines and columns per page is dependent on the font package selected.

Only logical carriage control may be used with the page printer. The function of the carriage-control codes is the same as for the line printer except that the colon (:) control skips to the top of the next sheet, i.e., it skips to a new physical sheet of paper.

The page printer is described in further detail in Appendix F to this section.

Terminals

The terminals do not have the equivalent of a logical page. The paper is treated as a continuous sheet with no discrete physical pages. Hence, skipping to the top of a page results in merely skipping 3 lines.

Dans le document The Michigan Terminal System (Page 167-173)