• Aucun résultat trouvé

DATA RBK

Dans le document Manual Call (Page 167-173)

(MaIER LlIJrnIDJ lEI

DATA 80 DATA RBK

The reply block is coded as follows:

RBK DATA REPLY

DATA 80 DATA 0

WRITE RECORD TO TERMINAL ASSIGNED TO LUNO >4C INITIATE MODE AND

WRITE WITH REPLY.

REPLY BUFFER ADDRESS MAXIMUM LENGTH OF REPLY REPLY CHARACTER COUNT

6.4.2.9 Write EOF. The Write EOF operation (sub-opcode >OD) performs three line feed oper-ations on a 733 ASR data terminal.

The following fields of the basic supervisor call block apply to a Write EOF operation:

SVCcode - 0

Return code

Sub-opcode - >OD

Logical unit number (LUNO)

System flags

User flags

The following system flags apply to a Write EOF operation:

2279507

6·60

Bit 0 - Busy flag. Set by system as follows:

1 - Busy.

o -

Operation completed.

Bit 1 - Error flag. Set by system as follows:

1 - Error.

0 - No error.

2270507·9701

~

733 ASR Data Terminal 6.4

The following user flags apply to a Write EOF operation:

2279508

Bit 0 - Initiate flag. Set as follows:

1 - System initiates the operation and returns control to the calling task.

0 - System suspends the calling task until the operation has completed.

The logical unit number (LUNO) field contains the LUNO assigned to the terminal to which a record is to be written.

The following is an example of the source code for a supervisor call block for a Write ASCII operation:

WEHCT DATA 0 BYTE >D,>4C BYTE 0,>80 DATA 0 DATA 0 DATA 0

WRITE EOF TO TERMINAL ASSIGNED TO LUNO >4C INITIATE MODE.

6.4.3 733 ASR Data Terminal Resource-Specific 1/0

Most of the resource-specific 1/0 operations use an extended supervisor call block. The sub-opcodes for the resource-independent operations apply, but the operations are modified by the states of flags in the extended user flags field. Sub-opcode >OA (Read Direct operation) does not apply to the 733 ASR data terminal. DNOS returns an error code when the Read Direct operation is specified for a 733 ASR.

The extended call flag in the user flag field (byte 5) of the supervisor call block must be set to one for resource-specific 1/0 operations. Otherwise, the system does not use the extensions to the supervisor call block. The flags in the user flag field that apply to resource-specific 1/0 operations are:

2279509

Bit 1 - Reply flag. When the character validation flag is set to zero, set the reply flag to one for a Write with Reply, Remote Get Event Character, or Read with Validation opera-tion, or set the reply flag to zero when a previously supplied validation table applies.

Bit 6 - Extended call flag. Set as follows:

1 - Extended call block (required for resource-specific 1/0).

0 - Basic supervisor call block (used for resource-independent 1/0).

2270507-9701 6-61

6.4 733 ASR Data Termina/1I0

The extension to the basic supervisor call block is as follows:

DEC HEX

12 C VALIDATION TABLE/REPLY BLOCK ADDRESS

14 E EXTENDED USER FLAGS

16 10 [RESERVED]

I

< EVENT BYTE>

18 12 [RESERVED]

20 14 [RESERVED]

2279510

The extension to the call block contains the following:

Byte 12-13

14-15

16

17

18-19

20-21

6·62

Contents

Character validation table address (when character validation is speci-fied in the extended user flags). The address of a table of character vali-dation data. Reply block address (when the reply flag is set to one). The address of a block containing the address and count fields for a Write with Reply operation.

Extended user flags field. Contains sixteen flags that apply to all or some of the terminal operations as described in succeeding paragraphs.

[Reserved]. 733 ASR data terminal 1/0 ignores any data in this field, which allows an extended call block to be used for either VOT or 733 ASR data terminal 1/0.

<

Event byte>. The system stores an event character in this field when the terminal has bE~en opened in the event mode and an event key is pressed.

[Reserved]. 733 ASR: data terminal 1/0 ignores any data in this field, which allows an extended call block to be used for either VOT or 733 ASR data terminal 1/0.

[Reserved]. 733 ASR data terminal 1/0 ignores any data in this field, which allows an extended call block to be used for either VOT or 733 ASR data terminal 1/0.

2270507·9701

733 ASR Data Terminal 6.4

The extended user flags are:

2279511

The following lists the flags and the 1/0 operations in which they are effective. Detailed descrip-tions of the uses of the flags follow in subsequent paragraphs.

Bit 4 5 12 13 14

Definition Eight-bit ASCII Task edit No echo

Character validation Validation error mode

Used in Operations Read ASCII and Write ASCII Read

Read ASCII Read Read

6.4.3.1 Eight·Bit ASCII. This flag, when set to one, forces a line feed and carriage return at the end of a record during a Read ASCII or Write ASCII operation. This flag does not apply to terminals using JISCII.

6.4.3.2 Task Edit. This flag, when set to one, causes any of the task edit characters listed in Table 6-3 that are entered during an input operation to terminate the operation and to be returned in byte 17 (event byte field) of the extended call block. When the flag is set to zero, the device ser-vice routine (DSR) ignores these characters.

6.4.3.3 No Echo. This flag, when set to one, inhibits the printing of characters entered at the keyboard. When a key is pressed, a blank is printed. When the flag is set to zero, each character is printed as it is entered. This flag applies only to Read ASCII operations.

6.4.3.4 Character Validation. This flag, when set to one, enables character validation of the field being read by a Read ASCII operation. Character validation is discussed in greater detail in the character validation paragraph of this section. When the character validation flag is set to zero, no character validation is performed. Refer to the description of the Write ASCII operation for the use of the reply flag when the character validation flag is set to zero.

6.4.3.5 Validation Error Mode. The validation error mode flag, when set to one, enables correc-tion of errors detected during validacorrec-tion of field contents by the task. The Validacorrec-tion Error Mode operation is effectively a Reread operation; the flags that apply to a Read apply in the same way to this operation. When the user reenters one or more characters in the field, the system sets the vali-dation error mode flag to zero. When the calling task sets the valivali-dation error mode flag to zero, the operation is performed in the normal mode.

2270507 -9701 6·63

6.4 733 ASR Data Term ina/ 110

6.4.3.6 Read ASCII Example. When a terminal has been opened in the event key mode and task edit keys are also enabled (carriage control flag set to one), either an event key or a task edit key may terminate a Read operation. The task edit character is always returned in the event byte of the extended call block, and the event character iis also returned in that byte in resource-specific 1/0.

The state of the event key flag in the system flag field indicates which type of character is in the event byte when both are enabled. The task accesses and decodes the character and performs the function corresponding to the key.

The following is an example of the code for a Read ASCII operation with event key termination enabled by the previous Open operation and t~sk edit key termination enabled for the Read

operation: .

REHC SYSFL

DATA 0 BYTE 9,>3F BYTE 0 BYTE >02 DATA RBUFF DATA 15 DATA 0 DATA 0 DATA >0400 DATA 0 DATA 0 DATA 0

READ FIELD OF TERMINAL AT LUNO >3F.

FIELD SIZE IS 15 CHARACTERS.

EVENT KEYS AND TASK EDIT KEYS ENABLED.

6.4.3.7 Character Validation Operation. A Read ASCII operation may specify character valida-tion. The characters of the field being read by the operation that are not within the range or ranges applicable to the operation are not acceptecl. Characters that are within the range or ranges are stored in the read buffer specified for the operation. The character validation flag in the extended user flags field is set to one for a Read with validation operation.

Each Read operation with character validation must specify a validation table. Specifying a valida-tion table requires:

6·64

Setting the character validation flag to one Supplying a validation table

Placing the address of the table in the character validation table address field of the extended call block

2270507 ·9701

733 ASR Data Terminal 6.4

The validation table contains one or more ranges Of characters that define the valid characters for the field. The table may define the valid characters by specifying ranges of characters that are not valid, or by specifying ranges of characters that are valid. Each range in the table requires two bytes, and the table contains two bytes of overhead. Thus the length of the table in bytes is two times the number of ranges, plus two. The format of the table is as follows:

DEC HEX

o

0 LENGTH FLAGS

2 2 RANGE 1 Low CHAR. RANGE 1 HIGH CHAR.

,.lJ ,..LJ

" " J

2N 2N RANGE n Low CHAR.

I

RANGE n HIGH CHAR.

2279512

The validation table contains the following:

Byte Contents

o

Length - Length of the validation table in bytes (2n + 2).

1 Flags:

Bit 0 - Validation flag. Set as follows:

1 - Invalid ranges. Characters greater than or equal to the low char-acter and less than or equal to the high charchar-acter are invalid.

o -

Valid ranges. Characters greater than or equal to the low char-acter and less than or equal to the high charchar-acter are valid.

Bits 1-7 - Reserved.

2 Low character for range 1.

3 High character for range 1.

Character pairs for additional ranges.

2n Low character for range n.

2n

+

1 High character for range n.

Character validation is performed after each character is entered in the field.

2270507-9701 6·65

6.4 733 ASR Data Terminal 110

The user must press one of the following correction keys when the last character entered is invalid:

• (CTRL) H or BACKSPACE

• RUB OUT

• (CTRL) N

• (CTRL) T

Next, the user enters the data correctly.

An example Read with Validation operation performs the following:

• Reads a 10-character field.

• Validates the field as an alphanumeric field with no lowercase letters.

The following is an example of the code for the supervisor call block and validation table for the example operation:

RVAL

FLG1

FLG2

TABL

DATA 0 BYTE 9,>2B BYTE 0 BYTE >02 DATA BUFF DATA 10 DATA 0 DATA TABL DATA >0004 BSS 6

EVEN BYTE 6 BYTE 0 DATA >3039 DATA >415A

READ FIELD OF TERMINAL AT"LUNO >2B, VALIDATING PER TABL. FIELD

SIZE IS 10 CHARACTERS. READ BUFFER IS BUFF.

LENGTH OF TABLE VALID RANGES

RANGE 1 - NUMERALS

Dans le document Manual Call (Page 167-173)

Documents relatifs