• Keine Ergebnisse gefunden

Write-Type Commands

Im Dokument anu I mulation I (Seite 73-77)

(

(

(

~l Commands and Orders

Link header

---"1'

Start of Heading character

-STX Start of Text character

SBA Set Buffer Address order } Attribute character address + 1 TEXT Alphanumeric data

Link trailer

Test Request Read heading

First modified data field*

(nulls suppressed)

Second modified data field (nulls suppressed)

9

Remaining modified data fields (nulls suppressed)

* Note: For an unformatted screen the SBA order and attribute character address + 1 are not obtained. Instead, all text in the buffer (nulls suppressed) follows STX.

Fig. 5. Message from the terminal issued in connection with a test request attention

Write-Type Commands

The write-type commands which the terminal system can execute are Write, Erase/Write and Erase/Write Alternate. The computer uses these commands to format and load buffer data into a selected terminal and to initiate certain terminal oper-tions such as starting the printer, unlocking the keyboard and sounding the audible alarm. The Erase/Write command erases the entire buffer before the write operation commences and this command is thus suitable for use initiate certain fer, i.e. when the entire buffer area is to be loaded with new data. To modify existing buffer data, the Write command is used instead. The third write-type command, Erase/Write Alternate, carries out an erase/write function. It is also used to switch the display unit into the large screen mode. With the exception of the erasing function and screen size switching, the three commands that a Write, Erase/Write or Erase/Write Alternate command which starts the printer must be the last command on the chain, i.e. further chaining is not permitted.

10 Commands and Orders

Buffer Addressing

The text part of the message following a write-type command can com-prise both buffer data and orders. The writing of buffer data can start at any specified position in the buffer area and the data characters are then stored successively in the following positions until a new positioning order is obtained (Set Buffer Address order) or until all data has been stored. In connection with a write-type operation, the buffer address is incremented by one for each character that is stored.

In connection with a Write command, the buffer position at which the write operation is to start is determined as follows

• A Set Buffer Address order (SBA) specifies the start position

• When the command is chained to a Read command or to another Write command, the current buffer address is used as the start position

• In other situations, i.e. when an SBA order is lacking or when the command is unchained or chained to a control or Sense command, the cursor indicates the start position to be used, i.e. the buffer address is set equal to the cursor address.

In connection with an Erase/Write or Erase/Write Alternate command, both the cursor and buffer addresses are reset to 0 after an erase operation so that a write-type operation will start at the first position in the first line.

An invalid buffer address specified within a buffer control order is con-verted to a valid buffer address.

Write Control Character,

wce

Each write-type command is followed by a write control character, WCC, which can define the terminal function both before and after the operation specified by the command. Table 3 presents the bit assignments for

wee

and explains the functions of these bits. The first byte following the command byte is always interpreted as a

weco

(

(

('

[~I Commands and Orders 11

Table 3. Write control character, WCC, bit definitions Bit* Function

7, 6 Determined by bits 0-5, see Appendix 1 for translation to EBCDIC.

5,4 Printout Format. Defines the printout format as follows

00 - NL and EM ordersin the text determine the printout format.

Defaults to a line of a length defined when customizing when these orders (NL, EM) are not present.

01 - Specifies 40-character print line 10- Specifies 64-character print line 11 - Specifies aO-character print line

3 Start Printer. When this bit is set to 1, it indicates that the printout operation shall be started when the write-type operation in the buffer has been completed.

2 Sound Alarm. When this bit is set to 1, the audible alarm is sounded in the selected display unit when the write-type operation has been completed.

1 Keyboard Restore. When this bit is set to 1, the keyboard is restored (unlocked) when the write-type operation has been completed.

0 Reset MDT bits. When this bit is set to 1, all MDT (Modified Data Tag) bits in the selected terminal's buffer data are reset. Resetting is carried out before the write-type operation is started.

* Note: IBM designates the most significant bit (Bit No.7) as No. O.

Write Command

The Write command is used by the computer to modify existing data in the buffer in a selected terminal. A write-type message sent to a terminal comprises a command code (CMD), write control character (WCC), orders and the data that will modify the buffer content. For a remote operation, it also includes the necessary BSC or SDLC part of the trans-mission.

Link header

CMD Command code, see Table 1 * WCC Write control character, see Table 3 TEXT Orders and alphanumeric data

Link trailer

* Note: in local operation, the command code is included in the link header and distributed via the CCW.

Fig. 6. Write, Erase/Write and Erase/Write Alternate commands, message layout

12 Commands and Orders

Erase/Write Command

The Erase/Write command is used by the computer when the entire buffer area in a selected terminal is to be loaded with new data. This command causes two different operations to be carried out in the terminal - an erasing operation followed by a write operation. The erasing operation erases the entire buffer (fills it with null characters), positions the cursor at the first position in the first Ilne and resets the buffer address to O. The write operation is then carried out in exactly the same way as for a Write command. If WCC is not sent, only the erasing operation is carried out.

Erase/Write Alternate Command

The purpose of this command is to permit existing host computer soItware to be used. Display units and printers having 960-character buffers func-tion as 480-character devices on a default basis. Display units and printers having 1920-, 2560- or 3440 character buffers function as 1920-character devices on a default basis. The Erase/Write Alternate Command can be used to specify the non-default buffer utilization capacities set forth in the table below. Host application programs written for display units and printers having 480- or 1920-character buffers can thus be used without alteration for 960-, 1920-, 2560- and 3440-character display units and printers.

The following default and alternate buffer utilization capacities can be selected when the system is set up and customized.

Default character capacity

480 1920 1920 1920

Alternate character capacity

960 1920 2560 3440

The Erase/Write Alternate command also operates as an Erase/Write command. Once the display unit or printer is placed in alternate mode, operation continues in the alternate mode until the operator depresses the CLEAR, or SYREQ key or until an Erase/Write command is received, power fails at the display unit, or printer or, in locally attached systems, a system reset sequence occurs. Only these conditions return the display unit or printer to the default-value screen-size or character print capacity.

)

(

(

(

Commands and Orders 13

Im Dokument anu I mulation I (Seite 73-77)