Envoy ACP/XF Application Programming Manual

System Procedure Call Specifics for EnvoyACP/XF
EnvoyACP/XF Application Programming Manual132179
4-19
WRITE[X] Procedure
fnum is the one-word integer variable specified in the open call that opened the
communications line, and %1003 is an octal value that sets parameter-1.<0:15>,
specifying the following characteristics:
RS-232C line interface
Accept all addresses
Nonswitched lines
Half-duplex line facilities (two-way alternate operation)
Multipoint tributary station
WRITE[X] Procedure
Depending upon the content of the specified application buffer, a call to the WRITE[X]
procedure does either of the following:
Transmits data from the buffer to the remote station by way of a single I-frame
Transmits the unnumbered command or response specified by bits 3 through 7 of the
MCW
Use the WRITE procedure for 16-bit addresses; use WRITEX for 32-bit extended
addresses. The data buffer for WRITEX can be in either the caller’s stack segment or
any extended data segment.
The form of the WRITE[X] procedure is:
filenum input
INT:value (Use with WRITE and WRITEX)
is the number returned by the OPEN call that opened the line. In a WRITE[X] call,
you supply this variable to EnvoyACP/XF.
buffer input
INT:ref:* (Use with WRITE)
STRING .EXT:ref:* (Use with WRITEX)
is the name of the integer array within the application program from which the
outgoing data is to be retrieved. The buffer's first two bytes contain the MCW. In a
WRITE[X] call, the MCW specifies information from which EnvoyACP/XF builds
the address and control fields of the transmitted frame. (See “MCW format” below
for additional information on the MCW.)
CALL WRITE[X]( filenum !i
, buffer !i
, write-count !i
,[count-written] !o
,[ tag ]); !i