• Aucun résultat trouvé

Orders and Attributes

Dans le document Reference Manual and Programming Guide (Page 143-146)

* RESET BIT PRIN FOR TOUT MAT START PRINT ALARM SOUND RESTORE KYBD RESET MDT

6.2.4 Orders and Attributes

Orders

Orders can be included in Write, Erase/Write, or Erase/Write Alternate command data streams, either alone or intermixed with display or print data. Two types of orders are available: printout format orders and buffer control orders. Printout format orders are initially stored in the buffer as data and are subsequently exe-cuted only during a print operation.

The following paragraphs describe buffer control orders, which are executed as they are received in the write data stream by the IBM 7171; these orders are not stored in the buffer. Seven buffer control orders (see following figure) are pro-vided to position, define, and format data being written into the buffer, to erase selected unprotected data in the buffer, and to reposition the cursor.

Start Field (SF) Order: This order implies that the next byte in the write data stream is an attribute character. The IBM 7171 then stores this attribute character at the current buffer address.

Note: The byte immediately following the SF order in the data stream is always stored as an attribute character, even when the byte is intended as an order or an alphameric data character.

During execution of a Read Buffer command, the IBM 7171 automatically inserts SF order codes in the read data stream immediately before each attribute character.

This permits identification of the attribute characters by the program and also permits correct storage of attribute characters in the buffer if the read data is used for subsequent write operations.

Graphic &cape (GE) Order: This order implies that the next byte in the write datastream is a 3278 APL character. The IBM 7171 stores this APL character at the current buffer address.

Note: The byte immediately following the GE order in the data stream is always stored as a 3278 APL character (assuming the IBM 7171 is in 3278 mode), even when the byte is intended as an order or an alphameric data character.

Set Buffer Address (SBA) Order: This three byte order specifies a new buffer address from which write operations are to start or continue. Set Buffer Address orders can be used to write data into various areas of the buffer. An SBA order can also precede another order in the data stream to specify the starting address for a PT, RA, or EUA order; to specify the address at which an attribute byte is to be stored by an SF, or to specify the address at which the cursor is to be repositioned by an Ie order.

6-8

IBM 7171 Reference Manual and Programming Guide

BYTE 1

ORDER EBCDIC BYTE 2 BYTE 3 BYTE 4

(HEX)

START FIELD (SF) 1D attribute character

GRAPHIC ESCAPE 08 character

(GE) to convert

Figure 6-7. Buffer Control Orders and Order Codes

If the SBA order specifies an invalid address, the write operation is terminated at this point.

When a Read Modified command is executed and an attribute character (initially sent to the device by writing an SF order) is detected with the MDT bit set, the IBM 7171 inserts, in place of the attribute, an SBA code followed by the two byte buffer address of the first character in the modified field (attribute address

+

1).

This permits identification by the control unit of fields that are modified.

Insert Cursor (IC) Order: This order repositions the cursor to the location specified by the current buffer address. Execution of this order does not change the current buffer address. For example, if Ie is issued when the current buffer address is 160 and the cursor is at location 80, the cursor is moved from location 80 and inserted at location 160. The current buffer address at the end of this operation would remain 160.

Program Tab (PT) Order: The PT order advances the current buffer address to the address of the first character position of the next unprotected field. If the PT is issued when the current buffer address is the location of an attribute byte of an unprotected field, the buffer address advances to the next location of that field (one location). In addition, if the PT order in the write data stream does not follow a control command, order, or order sequence such as a wee, Ie, or RA, nulls are inserted in the buffer from the current buffer address to the end of the field, regardless of the value of bit 2 (protected/unprotected) of the attribute character for the field. When the PT order follows a control command, order, or order sequence, the buffer content is not modified for that field.

The PT order stops its search at the last location in the buffer. If an attribute char-acter for an unprotected field is not found by this point, the buffer address is set to location O. (If the PT order finds an attribute character for an unprotected field in the last buffer location, the buffer address is also set to zero.)

Chapter 6. IBM 7171 I/O Interface to the Host System

6-9

To continue the search for an unprotected field, a second PT order must be issued immediately following the first one. Since the current buffer address was reset to 0 by the first PT order, the second PT order begins its search at buffer location

o.

If

the previous PT order was still inserting nulls in each character location when it terminated at the last buffer location, the new PT order will continue to insert nulls from buffer location 0 to the end of the current field.

Repeat to Address (RA) Order: The RA order stores a specified alphameric or null character in all buffer locations,· starting at the current buffer address and ending at (but not including) the specified stop address. This stop address and the character to be repeated are identified by the bytes immediately following the RA order in the write data stream, as follows:

BYTE

0 RA Order

1 Stop Address (byte 1) 2 Stop Address (byte 2) 3 Character to be repeated OR

0 RA Order

1 Stop Address (byte 1) 2 Stop Address (byte 2) 3 Graphic Escape

4 Character to be repeated

Figure 6-8. Repeat to Address (RA) Order Formats

The third character (fourth if the third is Graphic Escape) following the RA order is always interpreted as the character that will be repeated. If an invalid stop address is specified, the write operation is terminated at this point without storing the character, and error status is generated.

When the stop address is lower than the current buffer address, the RA operation wraps from the last position in the buffer to the first. When the stop address equals the current address, the specified character is stored in all buffer locations.

Attribute characters will be overwritten by the RA order if they occur before the RA order stop address.

Erase Unprotected to Address (EUA) Order: The EVA order inserts nulls in all unprotected buffer character locations, starting at the current buffer address and ending at, but not including, the specified stop address. This stop address is speci-fied by two address bytes which immediately follow the EVA order in the write data stream. If an invalid address is specified, the write operation is terminated at this point and error status is generated.

When the stop address is lower than the current buffer address, the EVA operation wraps from the last position the buffer to the first. When the stop address equals the current address, all unprotected character locations in the buffer are erased.

Attribute characters are not affected by the EVA order.

6-10

IBM 7171 Reference Manual and Programming Guide

Dans le document Reference Manual and Programming Guide (Page 143-146)