• Aucun résultat trouvé

VOT Resource·lndependent I/O

Dans le document Manual Call (Page 119-129)

5 Input/Output Operations

BYTE 5 TEXT 'LOCAL'

6.2 DEVICE UTILITY OPERATIONS

6.3.2 VOT Resource·lndependent I/O

The operations appropriate for the VDT are described in subsequent paragraphs. The following sub-opcodes, which do not apply to the VDT, produce the indicated results:

06 Ignored 07 Ignored 08 Error

OD Ignored for 911 OF Ignored

6.3.2.1 Open. Sub-opcode >00 specifies an Open operation. The Open operation is required for a VDT. However, DNOS does not validate the Open operation; that is, it does not detect a possible conflict with 1/0 to the same device by another task. An Open operation is not required prior to per-forming a Read Device Status operation.

The following fields of the basic supervisor catl block apply to an Open operation:

SVC code - 0

Return code

Sub-opcode - > 00

Logical unit number (LUNO)

User flags

Data buffer address

Read character count

The following user flags apply to an Open operation:

3-4 2279478

f

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.

Bits 3-4 - Access privilege flag. Set as follows:

00 - Exclusive write.

01 - Exclusive all.

10 - Shared.

11 - Read only.

Bit 7 - Event key mode flag. Set as follows:

1 - Enable event key mode.

o -

Disable event key mode.

2270507-9701 6-13

6.3 VDTIIO

The logical unit number (LUNO) field contains the LUNO assigned to the VDT to be opened.

The Open operation returns the device type code in the data buffer address field (bytes 6 and 7) of the supervisor call block. The device type code for the VDT is 5.

When the calling task places zero in the read character count field (bytes 8 and 9) of the supervisor call block, the Open operation returns the default logical record length for the device. The default logical record length for a VDT is > 56.

A VDT must be opened with the event key mode flag set to one if event keys are to be used as task programmable function keys.

To access an event key character, perform a Remote Get Event Character operation.

The following is an example of the source code for a supervisor call block to open a VDT:

OVDT DATA 0

BYTE 0,>24 DATA 0 DATA 0 DATA 0 DATA 0

OPEN VDT ASSIGNED TO LUNO >24.

TYPE DLRL

6.3.2.2 Close. Sub-opcode >01 specifies a Close operation. The Close operation ends I/O to a LUNO from the calling task. The LUNO remains assigned to the device, and may be opened again for additional I/O operations. When a task terminates, DNOS closes all LUNOs that have been opened by the task.

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

• SVCcode - 0

• Return code

• Sub-opcode - >01

• Logical unit number (LUNO)

• User flags

The following user flag applies to a Close operation:

2279479

6·14 2270507 ·9701

VDTIIO 6.3

Bit 0 - Initiate flag. Set as follows:

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

o -

System suspends the calling task until the operation has completed.

The logical unit number (LUNO) field contains the LUNO to be closed.

The following is an example of the source code for a supervisor call block to close a VDT:

CVDT DATA 0

BYTE 1,>24 DATA 0 DATA 0 DATA 0 DATA 0

CLOSE VDT ASSIGNED TO LUNO >24.

6.3.2.3 Close, Write EOF. The Close, Write EOF operation, sub-opcode > 02, is identical to the Close operation.

6.3.2.4 Open and Rewind. The Open and Rewind operation, sub-opcode >03, is an Open opera-tion followed by a Rewind operaopera-tion. For the VDT, the Rewind operaopera-tion consists of clearing the screen. Any previously entered characters that remain in the buffer are ignored.

6.3.2.5 Close and Unload. The Close and Unload operation, sub-opcode >04, is identical to the Close operation.

6.3.2.6 Read Device Status. Sub-opcode >05 specifies a Read Device Status operation. The Read Device Status operation returns device status information in a buffer.

The following fields of the basic supervisor call block apply to a Read Device Status operation:

SVCcode - 0

Return code

Sub-opcode - > 05

Logical unit number (LUNO)

User flags

Data buffer address

Read character count

< Actual read count>

2270507·9701 6·15

6.3 VDTIIO

The following user flag applies to a Read Device Status operation:

2279480

Bit 0 - Initiate flag. Set as follows:

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

o -

System suspends the calling task until the operation has completed.

The logical unit number (LUNO) field contains the LUNO assigned to the device for which status information is returned.

The data buffer address is the address of the buffer into which DNOS places the status information.

The read character count is the length of the buffer.

DNOS returns the number of characters stored in the buffer in the actual read count field. If the buffer is 4 characters, bytes 0 through 3 are returned. If the buffer is 18 characters, all bytes are returned.

The contents of the data buffer after a Read Device Status operation has returned the status of a VDT are:

Byte Contents

o

Maximum row address.

1 Maximum column address.

2-3 Number of characters currently stored in the input character queue.

4 Device Service Routine (DSR) type. * 5 Channel number. *

6-7 Communications Register Unit (CRU) address.

8-9 Auto Call Unit (ACU) CRU address. *

10 Interface Service Routine (ISR) type. * 11 Line Control *

12-13 Opcode 15, Edit flag 1.

* For more information concerning these items, see the resource specific information for the appropriate device.

6·16 2270507 ·9701

VDTIIO 6.3

Byte Contents

14-15 Opcode 15, Edit flag 2.

16-17 Reserved.

DNOS maintains an input character queue that stores characters input while the system is processing a previously-entered character or command. Bytes 2 and 3 contain the number of char-acters in the queue. The maximum size of this queue is specified when the system is generated.

The following is an example of the source code for a supervisor call block for a Read Device Status operation and code for the read buffer:

RDSVDT

MRA MCA CIQ

DATA 0 BYTE 5,>32 DATA 0 DATA MRA DATA 18 DATA 0 BSS 1 BSS 1 BSS 16

READ STATUS OF VDT ASSIGNED TO LUNO >32.

DEVICE STATUS BUFFER

6.3.2.7 Read ASCII. Sub-opcode >09 specifies a Read ASCII operation. The Read ASCII operation reads a record from the keyboard and stores the characters in the specified buffer, two characters per word.

The following fields of the basic supervisor call block apply to a Read ASCII operation:

SVC code - 0

Return code

Sub-opcode - >09

Logical unit number (LUNO)

< System flags>

User flags

Data buffer address

Read character count

<Actual read count>

2270507-9701 6·17

VDr I/O 6.3

Byte Contents

14-15 Opcode 15, Edit flag 2.

16-17 Reserved.

DNOS maintains an input character queue that stores characters input while the system is processing a previously-entered character or command. Bytes 2 and 3 contain the number of char-acters in the queue. The maximum size of this queue is specified when the system is generated.

The following is an example of the source code for a supervisor call block for a Read Device Status operation and code for the read buffer:

RDSVDT

MRA MCA

cia

DATA 0 BYTE 5,>32 DATA 0 DATA MRA DATA 18 DATA 0 BSS 1 BSS 1 BSS 16

READ STATUS OF VDT ASSIGNED TO LUNO >32.

DEVICE STATUS BUFFER

6.3.2.7 Read ASCII. Sub-opcode >09 specifies a Read ASCII operation. The Read ASCII operation reads a record from the keyboard and stores the characters in the specified buffer, two characters per word.

The following fields of the basic supervisor call block apply to a Read ASCII operation:

SVC code - 0

Return code

Sub-opcode - > 09

Logical unit number (LUNO)

< System flags>

User flags

Data buffer address

Read character count

<Actual read count>

2270507·9701 6·17

3 VDTIIO

'he following system flags apply to a Read ASCII operation:

I

0

11 1--

2

1

3

1

4

1

5

1

6

1

7

1

f f f t

2279481

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

1 - Busy.

0 -Operation completed.

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

1 - Error.

0 - No error.

Bit 2 - End-of-file. Set by system as follows:

1 - ENTER key terminated the operation.

o -

Operation terminated without the ENTER key being pressed.

Bit 3 - Event key flag. Set by system as follows:

1 - An event key terminated the, operation.

o -

Operation terminated without an event key being pressed.

The following user flags apply to a Read ASCII operation:

~I

2279482

Bit 0 - Initiate flag. Set as follows:

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

o -

System suspends the calling task until the operation has completed.

Bit 7 - Blank adjustment flag. Set as follows:

1 - Read with blank adjustment.

o -

Read without blank adjustment.

The logical unit number (LUNO) field contains the LUNO assigned to the VOT from which a record is to be read.

The data buffer address is the address of the buffer into which ONOS places the record.

The read character count is the length of the buffer.

ONOS returns the number of characters stor,ed in the buffer in the actual read count field.

6·18 2270507 ·9701

VDr I/O 6.3

The Read ASCII operation recognizes the characters listed in Appendix B for the VDT. The opera-tion stores the characters, packed one per byte. When the country code in effect is not >0200 (Japan), the most significant bit is set to zero. When the country code is >0200, the eight-bit JISCII code is stored. The operaton continues until the RETURN key is pressed, the buffer is full, an event key is pressed (if the VDT is in the event key mode), or a task edit key is pressed (if task edit is set).

When the ENTER key is pressed, the system sets the EOF flag in the system flags byte and termi-nates the operation.

Characters entered between Read operations are stored in a queue and read by the next Read operation. The maximum size of the queue is specified during system generation. When the queue has been filled, the audible tone sounds as each additional character is entered and the additional characters are ignored.

Errors can be corrected by pressing the left arrow key to backspace the cursor to the character in error. Entering the correct character replaces th~ incorrect character. Only characters being cor-rected need to be reentered.

When the RETURN key is pressed, the number of characters entered is stored in the actual read count field and the operation terminates.

When the VDT is opened in the event key mode and an event key is pressed, the system sets the event key flag in the system flags byte and terminates the operation. The event character may be accessed by performing a Remote Get Event Character operation.

When an event key is pressed between Read operations, the next Read operation performed after the pressing of the event key terminates with the event key flag set.

When blank adjustment is specified for variable length records, blanks are stored in the buffer to fill the record. That is, when the record length is less than the buffer size, the device service routine (DSR) supplies blanks (>20) to fill the buffer. The character count returned in bytes 10 and 11 includes the blanks supplied by the DSR.

The following is an example of the source code for a supervisor call block for a Read ASCII opera-tion and code for the read buffer:

RDVDT

RBUFF

2270507-9701

DATA 0 BYTE 9,>2B BYTE 0,>80 DATA RBUFF DATA 80 DATA 0 BSS 80

READ RECORD FROM VDT ASSIGNED TO LUNO >2B IN THE INITIATE I/O MODE

READ BUFFER

Change 1 6·19

6.3

vor

I/O

6.3.2.8 Write ASCII. Sub-opcode >OB spe,cifies a Write ASCII operation. The Write ASCII opera-tion transfers a record from the specified buffer to the screen of the VDT. DNOS supports a write with reply option, which is effectively a Write operation followed by a Read ASCII operation.

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

SVCcode - 0

Return code

Sub-opcode - >OB

LUNO

< System flags>

User flags

Data buffer add ress

Write character count

Reply block address (write with reply option) The following system flags apply to a Write ASCII operation:

~

3

141

5

I

6

I

7

I

2279483

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.

The following user flags apply to a Write ASCII operation:

~

3-4 15 16 1 7 1

~ f

2279484

6·20 2270507 -9701

VDTIIO 6.~

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.

Bit 1 - Reply flag. Set as follows:

1 - Write operation followed by a Read operation.

o -

All other operations.

Bit 7 - Blank adjustment flag. Set as follows:

1 - Write with blank adjustment.

o -

Write without blank adjustment.

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

The data buffer address is the address of the buffer which contains the record to be displayed.

The write character count is the number of characters to be displayed on the screen of the VOT.

The Write ASCII operation displays a record on the screen of a VOT. The record consists of ASCII characters or JISCII characters, as specified by the country code.

The Write ASCII operation allows repeat character compression in the data to be displayed.

Repeat character compression represents a string of identical characters (for example, underlines) as six hexadecimal digits. The first two digits are the hexadecimal representation of the ASCII code of the character to be repeated. The next two digits are> 7F and the last two digits are the hexadecimal number of identical characters. For example, >20, > 7F, >06 represents six blanks:

the blank specified by > 20 and five more. A count of zero characters is valid and allows entry of the OEL character that corresponds to > 7F. For example, >20, > 7F, >00 represents a blank followed by a DEL character. The character count in bytes 10 and 11 of the call block includes three for each of the examples, not the number of characters displayed as a result of the specified repetition.

When blank adjustment is specified, trailing blanks in the buffer are not written. The write charac-ter count in bytes 10 and 11 is not alcharac-tered.

A Write with Reply operation requires the following in addition to the requirements for a Write ASCII operation:

• The reply flag in the user flags byte set to one

• The extension to the supervisor call block

• The reply block

The Write with Reply option requires the following extension to the basic 1/0 supervisor call block:

DEC HEX

12

c

REPLY BLOCK ADDRESS

2279485

2270507-9701 6·21

~ VDrllO

1e reply block is a three-word block, containing addresses for the Read operation, as follows:

DEC

o

2 4

279486

HEX

o

2 4

DATA BUFFER ADDRESS READ CHARACTER COUNT

< ACTUAL READ COUNT>

'he three fields are identical to the corresponding fields of the supervisor call block for a Read

~SCII operation.

'he following is an example of the source code for a supervisor call block for a Write ASCII Iperation:

WAVDT DATA 0 BYTE >B,>4B BYTE 0,>80 DATA WRBUFF DATA 0

DATA 80

WRITE RECORD TO VDT ASSIGNED TO LUNa >4B INITIATE MODE.

The following is an example of the source Gode for a supervisor call block for a Write ASCII operation using the Write with Reply option:

WRVDT DATA 0 BYTE >8,>4B BYTE O,>CO DATA WRBUFF DATA 0

DATA 80

Dans le document Manual Call (Page 119-129)

Documents relatifs