Envoy Application Programming Manual
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Application Programming With Envoy
- 7 ADM-2 Multipoint Supervisor Protocol
- 8 TINET Multipoint Supervisor Protocol
- 9 Burroughs Point-To-Point Protocol
- 10 Asynchronous Line Supervisor Protocol
- A ASCII Character Set
- B ASCII to EBCDIC Code Conversion
- C File-System Procedures
- D Statistics Messages
- E S-Series Changes to Envoy
- NonStop™ Himalaya S-Series Server Architecture
- G-Series Migration Considerations
- CBSENSEON and CFSENSEON Modifiers
- LEOTRESYN and NOLEOTRESYN Modifiers
- Treatment of Characters After the Termination Character
- Number of SYN Characters
- DTR Drop
- Reporting of Parity Error
- Half-Duplex Support for Asynchronous Lines
- Controller Replacement
- SYSGEN and COUP
- Unit Numbers
- FDX Line Changes
- No Support for Auto-Call Unit
- Glossary
- Index
BISYNC Point-To-Point Protocol
Envoy Application Programming Manual—427159-001
3-45
Line Bid
Example 3-18. Program Code for read^text and write^text (Page 1 of 5)
INT termfnum, ! data declarations.
linefnum, !
opfnum, !
lerror, !
linestate, ! line state: 0 = cntl,
.termbuf[0:35]; ! 1 = read, 2 = write.
LITERAL
STX = 2,
ETX = 3,
DLE = %20,
max^line = 40,
readcnt = max^line * 2,
cntlstate = 0,
readstate = 1,
writestate = 2,
timeout = 162,
eot^rcvd = 163;
! end of global declarations.
! This procedure is used to read a message from the remote
! station. The message is returned to the caller with line
! control characters deleted. The file-system error
! number associated with the line is returned.
INT PROC read^text ( text , text^len );
INT .text, .text^len;
BEGIN
INT .linebuf[-1:max^line-1], ! data declarations.
cnt^read, !
lerror; !
STRING
.slinebuf := @linebuf '<<' 1;
! issue a read for the line.
CALL READ (linefnum , linebuf[-1], readcnt , cnt^read );
IF = THEN ! text read from remote.
BEGIN
linestate := readstate;
text^len := cnt^read - 5;
! move the text part of the message to the text
! buffer.
text ':=' linebuf[1] FOR ((text^len + 1) / 2);
RETURN 0;
END;
CALL FILEINFO ( linefnum , lerror );
RETURN lerror;
END; ! read^text.