• Aucun résultat trouvé

DOW FUNCTIONS

Dans le document Xerox Real-Time Batch Monitor (RBM) Sigma (Page 67-70)

SERVICE ROUTINES

M: DOW FUNCTIONS

If the file to be used is currently active, M:DOW will wait until end-action-pending and will then clear the active file and the end-action-pending flags. The call will be translated to an equivalent call to M:WRITE which will be output the alarm. The buffer data are assumed to be EBCDIC.

M:COC (Character-Oriented Communications) M:COC performs input, output, and control operations on a specific communication line. The calling sequence is

LDX ADRLST Pointer to the argument list RCPYI Set the return address B M:COC Branch to the routi ne ADRLST is a pointer to the argument list, as follows:

word 0

I

Order

word 1 E [ Line number [ Prompt character

word 2 Buffer address

word 3

I

Byte count

word 4 EOM Receiver

o

78 11 12 15

where

Order (bits 12-15) is as follows:

Order Operation

o

Check status of line Write n bytes, no editing 2 Read n bytes, no editing

3 Send break character (long-space) 4 Check previous read or write

5 Write message of up to n bytes, edited 6 Read message of up to n bytes, edited

Order Operation

7 Disconnect line (turn off data set) 8 Connect line

where n = 0

<

n ~ 255.

E is 1 if an end-of-message (EOM) receiver is specified; is 0 if no EOM receiver is specified.

Prompt character is meaningful on duplex lines for orders 6 and 8. For order 6, it is the character (EBCDIC) to be output before input is requested.

This can be used to signal the operator that input can now begin. For order 8, it specifies the mode in which all communication will be handled on this line until it is disconnected, and it has the follow-ing form:

Bit Value Meaning

8 Echo a II input characters.

0 Do not echo.

9 Translate all input from 7-bit ANSClI to EBCDIC, and all output from EBCDIC to ANSClI.

0 Do not translate any codes.

10 Check parity on input and create parity on output (even parity).

0 Ignore parity

11-12 00- Device is Model 33/35 teletype.

01 Device is Model 37 teletype.

10 Device is keyboard/display.

11 Device is foreign device, and no editi ng or translation wi II be per-formed (overrides setti ng of bits 9 and 1 0) .

14-15 Communi cation Mode (for connect order)

00 Full deplex (echoing accepted) 11 Half duplex (echoing not accepted) 10 Simplex-receive

01 Simplex-send.

EOM Receiver is used like an AIO Receiver. When an input or output message is completed, the

Servi ce Routi nes 55

appropriate communications task will branch to the

Connect or Successful connection disconnect

Check status Connected line

Table 12. Completion Codes

Output prompt character and then switch to input

Input mode Inactive mode Message compl ete

The nine possible orders that can appear in the argument list, and the operation for each, are described below:

o

Check status of line. This operation allows the user to check both the logical condition of the line (which must be one of the unique codes in Table 14) and the physical condition of the line (which is reported just as it is received from the hardware).

Only the line number is needed in the argument list.

Write n bytes, no editi ng. If the byte count is odd, the first output transmission takes place from right of the first word, and the left of the first word is ignored. No end-of-message codes are added at the end of the message, and no trailing blanks or null characters are stripped off. Parity generation and translation from EBCDIC to ANSCIl are under the control of the specified options for this line.

2 Read n bytes, no editing. A read operation is initiated, with no editing for cancel or character-delete operations, but with a search for any ANSClI control character. Input is terminated if any control character is found or if the speci-fied byte count is exhausted. If any input bytes were received before this read request was given, these bytes are thrown away. The end-of-message character always remains in the user's input buf-fer, translated to EBCDIC, if specified. The same comments about parity apply for the write operations.

3 Send break character (long-space). If the line is in an inactive mode, the long-space is sent

immediately. If the line is in a write mode or a read mode, the operation is terminated and the long-space is then sent. In the argument list, only the line number is meaningful.

4 Check previous read or write. This operation is required for all read and write operations, whether or not an EOM receiver is specified. The user buffer remai ns busy unti I the previous operation is checked. The line is then set inactive and be-comes ready for subsequent use. This is the only way to determi ne break conditions. The return status is shown in Tables 11 and 12. Only the line number is meaningful in the argument list.

5 Write message of up to n bytes, edited. This op-erates like the write operation without editing except (1) that trailing blanks and trailing null characters are removed and (2) that appropriate control characters are added as the final charac-ters of the message.

6 Read message of up to n bytes, edited. This oper-ates like the read without editing, except that ignore, backspace, and cancel operations are in effect for the current line; when any of these special characters are encountered, the proper effect takes place on the line and the user's buf-fer is modified accordingly. (Note that the backspace is an editing, or destructive, backspace;

that is, the previous character is deleted from the user's buffer.) The prompt character, if nonzero, is output prior to the read operation. (See Table 15 for a summary of editing operations.)

Table 15. Summary of Editing Operations

Cod~s Used Operation

33/35 37 Character Display

User-generated end-of-message CR or LF or BREAK NL or BREAK N L or INTERRUPT character on input, edited

System-generated end-of- LF or CR (opposite of None for NL; None for NL; NL for INTERRUPT message character on input user input); NL for BREAK

CR and LF on BREAK

Attention code; used to BREAK BREAK INTERRUPT

terminate input or output

Ignore this character, except RUBOUT or DEL or DEL or

after ESC ESC,SPACE ESC,SPACE ESC,SPACE

System-generated characters CR, LF,RUBOUT NL,RUBOUT NL,5 - NULL

on output at end-of-message

Delete previous character ESC,RUBOUT ESC,DELETE ESC/DELETE or EM

(echo-) (echo\ ) operation

Delete current line ESC,X ESC,X ESC, X or CR/CAN

Service Routines 57

7 Disconnect line. The send and/or receive mod-ules of the line are turned off and the logical status is set to disconnect.

8 Connect line. The communication mode option for the line, simplex or duplex, is matched against the physical structure of the line and where the appropriate receiver is turned on. Conflicts are reg i stered as i nva lid Ii ne status. The log i ca I line mode is set to lIinactivell and the other options are initialized. The connected line is assumed to be a dedicated line Oi a line that has alieady dialed=

in. A user program can poll the I ines with a IIcheck statusll order to determine when a line has been connected.

58 Service Routines

Dans le document Xerox Real-Time Batch Monitor (RBM) Sigma (Page 67-70)