• Aucun résultat trouvé

READ, FREAD, WRITE, FWRITE Instructions

Dans le document CONTROL DATA (Page 23-26)

READ and WRITE instructions transfer data between the specified input/output device and core. The word count specified in the request determines the end of the transfer.

FREAD and FWRITE requests read or write records in a specific format as associated with each device.

The macro format for READ, FREAD, WRITE, and FWRITE requests (1, 2, 4, and 6) is shown in the following example. The parameter descriptions are the 3-1

same except for the n parameter. Refer to the description detailed description of each parameter follows immedi-ately after the calling sequence which is macro-generated.

lu -logical unit

c -completion address s -starting address

n -number of words to transfer m-mode

rp-request priority cp-completion priority

a -absolute/indirect indicator for logical unit x -relative/indirect indicator (affects parameters

c, s, and n)

d -part 1 request indicator (absolute parameter addresses)

MACRO CALLING SEQUENCE

The request codes are 1 (READ), 2 (WRITE), 4

Figure 3-1. Macro-Generated Calling Sequence

FIELD DESCRIPTIONS

The field descriptions for the calling sequence generated by READ/WRITE requests are:

RC-request code

thread-thread location; used to point to the next entry on the threaded list

v--error code; passed to the completion address in bits 15 through 13 of register Q and set in the request by the system at completion

PARAMETER DESCRIPTIONS

Detailed parameter descriptions for the requests are:

lu-This is the logical unit. It is an ordinal in the physical device table which may be modified by parameter a. library directory, indicating the program to be executed on completion of the requested 110 operation. Use of the (c) option by unprotected programs results in job termination.

Completion routines are operated by threading the 110 requests on the scheduler thread. A 3-bit code in the v field of the fourth word of the request indicates completion status. See table 3-2 for bit positions of the fourth word indicating completion status.

When control is returned to the completion these bits are set in similar positions in the Q register. If less than n words were transferred on a read, the location which follows the last word filled is placed in the last word of the user's buffer.

s-This signifies the starting address which is the address of the first block location to be trans-ferred (see parameter x).

n-The number of words to transfer is given by n.

(n}-The number of words to be transferred is determined by parameter x.

15

Table 3-2. Bit Positioll9

13 Description

0 No error condition detected by' driver; number of words requested read or written; device not ready 1 No error; requested number of words read or written;

device ready

0 No error; fewer words read than requested; device not ready

1 Fewer words read than requested; device ready 0 Error condition; requested words read; device not

ready

1 Error condition and/or end-of-tape; requested words read or written; device ready

0 Error condition and/or end-of-file; fewer words read than requested; device not ready

1 Error condition and/or file detected or end-of-tape detected; fewer words read than requested;

device ready

0-The mInimUm of information is trans-ferred (one word or one character), depending on the device.

NOTE

For FREAD and FWRITE, n cannot be zero. Some devices signal zero words as an illegal request.

m-This is the mode which determines the operating condition (binary/ASCII) of a driver.

Macro

A-Data is converted from ASCII to external form for output and from external form level at which the sequence of code specified by parameter c is executed. It is automatically one for unprotected requests.

a-This signifies the absolute/indirect indicator for the logical unit.

Macro

blank-The first parameter (Iu) specifies the logical unit.

R-Iu is a signed increment (-lFF16:5lu :5 1FF16) which is added to the address of the first word of the parameter list to obtain the core location containing the logical unit number.

I-Iu is the address of the core location which contains the logical unit the logical unit number.

x-The relative/indirect indicator parameter af-fects parameters c, s, and n as shown. Because of the wraparound feature, computed addresses may be located before or after the parameter list.

The x parameter affects the c parameter as follows:

• If (c) is indirect, x is meaningless; c represents an index to the system directory.

• If x is 0 or blank and c is direct, c is the completion address.

• If x is not 0 and is not blank and c is direct, c is a positive increment added to the address of the first word of the parameter list to form the completion address.

3-3

The x parameter affects the s parametert as location which contains the starting address.

If a request is made for mass memory, the mass memory address follows the core location which contains the starting address.

• If x is not 0 and is not blank and s is direct, s is a positive increment added to the address of the first word of the parameter list to form the starting address. If a request is made for mass memory, the mass memory address follows the request.

• If x is not 0 and is not blank and (s) is indirect, s is a positive increment added to the address of the parameter list to form the address of a location which contains another positive increment. If the request is for mass memory, the loction containing the second increment is immediately followed by two words which contain the mass memory address.

15 14

The mass memory address format is shown in figure 3-2.

o

Most-si nificant bits of MS address (msb) least-significant bits of MS address Usb) Figure 3-2. Mass Memory Address Format

The mass storage address specifies a mass memory word address (READ/WRITE) or a mass memory sector (96-word size) address (FREAD/FWRITE). Return is to the location following the mass storage address.

The x parameter affects the n parametert as follows:

• Ifn is direct, x is meaningless; n is the length of the block to be transferred.

• If x is 0 or blank and (n) is indirect, n is core location containing the block size.

• If x is not 0 and is not blank and (n) is indirect, n is a positive increment added to the address of the first word of the parameter list to obtain the address of the location con-taining the block size.

d-The part 1 request indicator parameter indicates that the request requires the use of 16-bit address arithmetic.

o

or blank-The preceding description of the

The INDIR request (16) allows indirect execution of any other request as determined by the parameter list

Parameter descriptions for the INDIR request are:

p-The address of the first word of the parameter list of any other request; p must not be enclosed in parentheses.

Figure 3-3. INDIR Macro Calling Seqnence (0 or Blank)

tIf bit 15 is set for (n) or (s). incrementation continues as indirect until bit 15 is not set.

3-4

Dans le document CONTROL DATA (Page 23-26)

Documents relatifs