From pa.dec.com!decwrl!uunet!sparky!kent Sun Aug 11 15:53:20 PDT 1991
Article: 2594 of comp.sources.misc
Newsgroups: comp.sources.misc
Path: pa.dec.com!decwrl!uunet!sparky!kent
From: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
Subject:  v21i084:  ecu - ECU async comm package rev 3.10, Part32/37
Message-ID: <1991Aug5.211941.8351@sparky.IMD.Sterling.COM>
X-Md4-Signature: f9f83d316647c4002330df21619c6984
Sender: kent@sparky.IMD.Sterling.COM (Kent Landfield)
Organization: Sterling Software, IMD
References: <csm-v21i053=ecu.215539@sparky.imd.sterling.com>
Date: Mon, 5 Aug 1991 21:19:41 GMT
Approved: kent@sparky.imd.sterling.com
Lines: 1384

Submitted-by: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
Posting-number: Volume 21, Issue 84
Archive-name: ecu/part32
Environment: SCO, XENIX, ISC
Supersedes: ecu3: Volume 16, Issue 25-59

---- Cut Here and feed the following to sh ----
#!/bin/sh
# this is ecu310.32 (part 32 of ecu310)
# do not concatenate these parts, unpack them in order with /bin/sh
# file xsel386/select.txt continued
#
if touch 2>&1 | fgrep 'amc' > /dev/null
 then TOUCH=touch
 else TOUCH=true
fi
if test ! -r _shar_seq_.tmp; then
	echo 'Please unpack part 1 first!'
	exit 1
fi
(read Scheck
 if test "$Scheck" != 32; then
	echo Please unpack part "$Scheck" next!
	exit 1
 else
	exit 0
 fi
) < _shar_seq_.tmp || exit 1
if test ! -f _shar_wnt_.tmp; then
	echo 'x - still skipping xsel386/select.txt'
else
echo 'x - continuing file xsel386/select.txt'
sed 's/^X//' << 'SHAR_EOF' >> 'xsel386/select.txt' &&
X}
X
Xsy_ret is the type return of the value this system call returns.  `0'
Xseems to be INT and `6' is probably void.
X
Xsy_arg386 is the number of words the arguments for this system call
Xtake on the stack.
X
Xsy_nlarg286 and sy_nmarg286 are similar to sy_arg386 but used for
Xdoing 286 stuff.  I don't plan on mentioning the 286 stuff in this
Xarticle that much, it just isn't interesting to me.
X
Xsy_argmask is the type of args on the stack using the following table:
X
XNUM | SYMBOL  | 386 | 286L | EXPLANATION
X 0  |         |     |      | Arg not used.
X 1  | DATAP   |	 2  |  1   | Arg is a data pointer; seg + address
X 2  | TEXTP   |	 2  |  1   | Arg is a text pointer; seg + address
X 3  | CONST   |	 1  |  1   | Arg is an int-sized constant 
X 4  | UCONST  |	 1  |  1   | Arg is an unsigned int-sized constant
X 5  | LCONST  |  1  |  1   | Arg is a long-sized constant
X 6  | FDATAP  |	 1  |  1   | Arg is FAR data pointer.
X 7  | SODATAP |  2  |      | 386: 32-bit offset.
X    |         |     |  1   | 286: low word is 16 bit data pointer offset,
X    |         |	    |      |	  high word is 16 bit selector.
X 8  | SOTEXTP |  2  |      | 386: 32-bit offset.
X    |         |     |  1   | 286: low word is 16 bit text pointer offset,
X    |         |	    |      |	  high word is 16 bit selector.
X
XEach nybble in sy_argmask represents one argument passed to the system
Xcall.  Bits 0-3 represent arg one; 4-7 arg two; 8-12 arg three; etc.
XA total of eight arguments (4 bits times 8 args = 32 bits in an int)
Xcan be passed to a function (although MASK, a macro used to make
Xsysent's sy_argmask field is limited to six arguments).
X
XNUM is the number (put in each nybble) represented by the SYMBOL (in
X<sys/systm.h>) that corresponds to the arg type EXPLANATION and takes
X[386|286] (depending on the model you are using) words on the user
Xstack.
X
XSo, for the open() system call: sy_argmask is 0x00000331 and sy_arg386
Xis 0x04.
X
X	open(char *path, int oflag, int mode);
X             ^^^^^^      ^^^        ^^^
X             DATAP       CONST      CONST
X
Xsy_call is the pointer to the function in kernel memory that should
Xhandle this system call request.
X
XThe sysent table on my system looks something like:
X
XSyscal Num | ret| 386| L  | SM |    Arg Types    | System Call 
Xsysent:
X    00     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _nosys
X    01     | 00 | 02 | 01 | 05 | 0 0 0 0 0 0 0 1 | _rexit
X    02     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _fork	
X    03     | 00 | 04 | 03 | 03 | 0 0 0 0 0 4 1 3 | _read	
X    04     | 00 | 04 | 03 | 03 | 0 0 0 0 0 4 1 3 | _write
X    05     | 00 | 04 | 03 | 03 | 0 0 0 0 0 3 3 1 | _open	
X    06     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _close
X    07     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _wait	
X    08     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 1 | _creat	
X    09     | 00 | 04 | 02 | 03 | 0 0 0 0 0 0 1 1 | _link	
X    0a     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _unlink	
X    0b     | 00 | 04 | 02 | 03 | 0 0 0 0 0 0 1 1 | _exec
X    0c     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _chdir	
X    0d     | 00 | 00 | 00 | 05 | 0 0 0 0 0 0 0 0 | _gtime
X    0e     | 00 | 04 | 03 | 03 | 0 0 0 0 0 3 3 1 | _mknod       
X    0f     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 1 | _chmod       
X    10     | 00 | 04 | 03 | 03 | 0 0 0 0 0 3 3 1 | _chown       
X    11     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 7 | _brk
X    12     | 00 | 04 | 02 | 03 | 0 0 0 0 0 0 1 1 | _stat
X    13     | 00 | 04 | 03 | 05 | 0 0 0 0 0 3 5 3 | _seek 
X    14     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _getpid      
X    15     | 00 | 05 | 03 | 03 | 0 0 0 0 0 3 1 1 | _smount      
X    16     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _sumount     
X    17     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 4 | _setuid      
X    18     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _getuid      
X    19     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 5 | _stime       
X    1a     | 00 | 05 | 04 | 03 | 0 0 0 0 3 1 3 3 | _ptrace      
X    1b     | 00 | 01 | 01 | 04 | 0 0 0 0 0 0 0 3 | _alarm       
X    1c     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 1 3 | _fstat       
X    1d     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _pause       
X    1e     | 00 | 04 | 02 | 03 | 0 0 0 0 0 0 1 1 | _utime       
X    1f     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 1 3 | _stty        
X    20     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 1 3 | _gtty        
X    21     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 1 | _saccess     
X    22     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _nice        
X    23     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 |
X    24     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _sync        
X    25     | 00 | 02 | 02 | 03 | 0 0 0 0 0 0 3 3 | _kill        
X    26     | 00 | 00 | 01 | 00 | 0 0 0 0 0 0 0 0 |              
X    27     | 00 | 00 | 02 | 00 | 0 0 0 0 0 0 0 0 |              
X    28     | 00 | 00 | 03 | 00 | 0 0 0 0 0 0 0 0 |              
X    29     | 00 | 02 | 02 | 03 | 0 0 0 0 0 0 3 3 | _dup         
X    2a     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _pipe        
X    2b     | 00 | 02 | 01 | 05 | 0 0 0 0 0 0 0 1 | _times       
X    2c     | 06 | 08 | 05 | 03 | 0 0 0 1 4 8 4 1 | _profil      
X    2d     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _lock        
X    2e     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 4 | _setgid      
X    2f     | 00 | 00 | 00 | 03 | 0 0 0 0 0 0 0 0 | _getgid      
X    30     | 00 | 03 | 02 | 02 | 0 0 0 0 0 0 2 3 | _ssig        
X    31     | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 3 | _msgsys      
X    32     | 06 | 07 | 04 | 03 | 0 0 0 0 5 5 1 3 | _sysi86      
X    33     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _sysacct     
X    34     | 00 | 00 | 01 | 06 | 0 0 0 0 0 0 0 3 | _shmsys      
X    35     | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 3 | _semsys      
X    36     | 00 | 04 | 03 | 03 | 0 0 0 0 0 7 3 3 | _ioctl       
X    37     | 00 | 00 | 04 | 00 | 0 0 0 0 0 0 0 0 |              
X    38     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    39     | 00 | 00 | 05 | 00 | 0 0 0 0 0 0 0 0 |              
X    3a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    3b     | 00 | 06 | 03 | 03 | 0 0 0 0 0 1 1 1 | _exece       
X    3c     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _umask       
X    3d     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _chroot      
X    3e     | 00 | 00 | 06 | 00 | 0 0 0 0 0 0 0 0 |              
X    3f     | 00 | 00 | 07 | 00 | 0 0 0 0 0 0 0 0 |              
X    40     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    41     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    42     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    43     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    44     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    45     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    46     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    47     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    48     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    49     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    4a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    4b     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    4c     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    4d     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    4e     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    4f     | 00 | 00 | 08 | 00 | 0 0 0 0 0 0 0 0 |              
X    50     | 00 | 00 | 09 | 00 | 0 0 0 0 0 0 0 0 |              
X    51     | 00 | 04 | 03 | 03 | 0 0 0 0 0 4 1 3 | _getdents    
X    52     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    53     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    54     | 00 | 00 | 0a | 00 | 0 0 0 0 0 0 0 0 |              
X    55     | 00 | 06 | 04 | 03 | 0 0 0 0 3 1 1 3 | _getmsg      
X    56     | 00 | 06 | 04 | 03 | 0 0 0 0 3 1 1 3 | _putmsg      
X    57     | 00 | 05 | 03 | 03 | 0 0 0 0 0 3 5 1 | _poll        
X    58     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    59     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    5a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    5b     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    5c     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    5d     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    5e     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    5f     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    60     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    61     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    62     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    63     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys       
X    64     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys
X    65     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    66     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    67     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    68     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    69     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    6a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    6b     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    6c     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    6d     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    6e     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    6f     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    70     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    71     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    72     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    73     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    74     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    75     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    76     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    77     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    78     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    79     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    7a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    7b     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    7c     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    7d     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    7e     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys      
X    7f     | 00 | 05 | 05 | 0a | 0 0 0 0 0 0 0 0 | _clocal     
X
X_v7sysent:
X
X    00     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 |
X    01     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _ftime   
X    02     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
X    03     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nullsys 
X    04     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
X    05     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
X    06     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
X    07     | 00 | 05 | 05 | 0a | 0 0 0 0 0 0 0 0 | _clocal  
X    08     | 00 | 00 | 00 | 08 | 0 0 0 0 0 0 0 0 | _cxenix  
X    09     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
X    0a     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
X    0b     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
X    
X_s3sysent:
X    01     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 |
X    02     | 00 | 06 | 04 | 03 | 0 0 0 0 3 3 1 1 | _statfs   
X    03     | 00 | 05 | 04 | 03 | 0 0 0 0 3 3 1 3 | _fstatfs  
X    04     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _setpgrp  
X    05     | 00 | 00 | 00 | 08 | 0 0 0 0 0 0 0 0 | _cxenix   
X    06     | 00 | 04 | 03 | 03 | 0 0 0 0 0 1 3 3 | _uadmin   
X    07     | 00 | 00 | 00 | 09 | 0 0 0 0 0 0 0 0 | _utssys   
X    08     | 00 | 03 | 03 | 03 | 0 0 0 0 0 3 3 3 | _fcntl    
X    09     | 00 | 03 | 02 | 05 | 0 0 0 0 0 0 5 3 | _ulimit   
X    0a     | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 1 | _rmdir    
X    0b     | 00 | 00 | 02 | 03 | 0 0 0 0 0 0 3 1 | _mkdir    
X    0c     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys    
X    
X_svidsysent:
X
X    01     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 |
X    02     | 00 | 06 | 04 | 03 | 0 0 0 0 3 3 1 1 | _statfs  
X    03     | 00 | 05 | 04 | 03 | 0 0 0 0 3 3 1 3 | _fstatfs 
X    04     | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 3 | _setpgrp 
X    05     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys   
X    06     | 00 | 00 | 03 | 03 | 0 0 0 0 0 1 3 3 | _uadmin  
X    07     | 00 | 00 | 00 | 09 | 0 0 0 0 0 0 0 0 | _utssys  
X    08     | 00 | 00 | 03 | 03 | 0 0 0 0 0 3 3 3 | _fcntl   
X    09     | 00 | 00 | 02 | 05 | 0 0 0 0 0 0 5 3 | _ulimit  
X    0a     | 00 | 00 | 01 | 03 | 0 0 0 0 0 0 0 1 | _rmdir   
X    0b     | 00 | 00 | 02 | 03 | 0 0 0 0 0 0 3 1 | _mkdir   
X    0c     | 00 | 00 | 03 | 03 | 0 0 0 0 0 0 0 0 | _nosys   
X
X_clentry: used for oem CLOCAL routines.  Empty on my system.
X
X_cxentry: used for SCO added stuff.
X
X    00     | 00 | 05 | 03 | 03 | 0 0 0 0 0 4 7 1 | _shutdown
X    01     | 00 | 04 | 03 | 03 | 0 0 0 0 0 7 3 3 | _locking
X    02     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 1 | _creatsem
X    03     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _opensem
X    04     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _sigsem
X    05     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _waitsem
X    06     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _nbwaitsem
X    07     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 3 | _rdchk
X    08     | 00 | 01 | 01 | 03 | 0 0 0 0 0 0 0 4 | _stkgrow
X    09     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys
X    0a     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 5 3 | _chsize
X    0b     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 1 | _ftime
X    0c     | 00 | 02 | 01 | 05 | 0 0 0 0 0 0 0 5 | _nap
X    0d     | 00 | 05 | 04 | 01 | 0 0 0 0 3 4 3 1 | _sdget
X    0e     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 7 | _sdfree
X    0f     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 7 | _sdenter
X    10     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 7 | _sdleave
X    11     | 00 | 02 | 01 | 03 | 0 0 0 0 0 0 0 7 | _sdgetv
X    12     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 7 | _sdwaitv
X    13     | 00 | 05 | 03 | 01 | 0 0 0 0 0 7 5 3 | _brkctl
X    14     | 00 | 00 | 00 | 00 | 0 0 0 0 0 0 0 0 | _nosys
X    15     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 1 3 | _nfs_sys
X    16     | 00 | 04 | 03 | 03 | 0 0 0 0 0 1 3 3 | _msgctl
X    17     | 00 | 03 | 02 | 03 | 0 0 0 0 0 0 3 5 | _msgget
X    18     | 00 | 05 | 04 | 03 | 0 0 0 0 3 3 1 3 | _msgsnd
X    19     | 06 | 07 | 05 | 03 | 0 0 0 3 5 3 1 3 | _msgrcv
X    1a     | 00 | 05 | 04 | 03 | 0 0 0 0 7 3 4 3 | _semctl
X    1b     | 00 | 04 | 03 | 03 | 0 0 0 0 0 3 3 5 | _semget
X    1c     | 00 | 04 | 03 | 03 | 0 0 0 0 0 4 1 3 | _semop
X    1d     | 00 | 04 | 03 | 03 | 0 0 0 0 0 1 3 3 | _shmctl
X    1e     | 00 | 04 | 03 | 03 | 0 0 0 0 0 3 4 5 | _shmget
X    1f     | 00 | 04 | 03 | 06 | 0 0 0 0 0 3 7 3 | _shmat
X    20     | 00 | 04 | 03 | 03 | 0 0 0 0 0 1 3 3 | _proctl
X    21     | 00 | 03 | 00 | 06 | 0 0 0 0 0 0 3 7 | _execseg
X    22     | 00 | 02 | 00 | 03 | 0 0 0 0 0 0 0 7 | _unexecseg
X    23     | 00 | 00 | 03 | 03 | 0 0 0 0 0 5 5 1 | _swapon
X    24     | 00 | 09 | 05 | 03 | 0 0 0 1 1 1 1 3 | _select
X
XI couldn't really figure out how uadmin() was accessed.  libc's
Xuadmin.o links in a routine that calls system call 0x37.  Hmmm...
X
XThe _cxentry is accessed by (documented in the programmer's reference
Xunder System Calls) setting a bit in the system call number.  It seems
Xas though it actually shifts the system call number up half a word and
Xputs 0x28 in the low order halfword.
X
XNow we see that select() exists as a cxenix function (number 0x24),
X
XThere is also poll(), putmsg(), and getmsg() -- streams stuff.
XSince the tty device is not a streams device (actually it looks as if
Xthe streams stuff has been nulled out -- look at the master file for
Xmore information) it is highly unlikely that these routines will do
Xanything useful.  Infact, they don't.  Change the SYSNUM (and symbols)
Xin the example open.s above to their appropriate values to try out the
Xstreams routines.
X
Xselect.s looks something like:
X
X; select
X;
X;
X;
X
X	title	select
X
X	.386
X
XSYSNUM	equ 	2428h
X
Xextrn	_errno:dword
X
Xpublic  _select
X
X_TEXT	segment  dword use32 public 'CODE'
X	assume   cs: _TEXT
X_select	proc near
X	mov	eax, SYSNUM		; Get system call number.
X
X	;
X	; I don't even pretend to understand masm syntax.  I tried
X	; the following line (and variations) without any success.
X	;
X
X;	call    far 7:0			; Switch to kernel and call SYSNUM.
X
X	;
X	; Don't laugh, it works.
X	;
X
X	db 9ah
X	dw 0,0
X	dw 7
X
X	jb	short _cerror		; below == error.
X
X	xor	eax, eax		; zero return value (no error).
X	ret				; done.
X
X_cerror:
X	mov	_errno, eax		; Save error code in _errno.
X	mov	eax, -1			; Return -1 (as error).
X	ret				; done.
X
X_select	endp
X
X_TEXT	ends
X
X	end
X
XThere is a header file you'll need in <sys/select.h> which has some
Xinformation in it.
X
XA Synopsis of the SCO XENIX implementation:
X
X	#include <sys/select.h>
X
X	nfds = select(width readfds, writefds, exceptfds, timeout)
X	int width, *readfds, *writefds, *exceptfds;
X	struct timeval *timeout;  /* timeval is a pointer to a structure */
X
XI tested select() and found it to be half way implemented.  It seems
Xas if there must be some extra field in struct cdevsw <sys/conf.h>.
X
XSo, I guess I wait 'til 3.2.
X
XPax, Keith
X
XPs, FYI.
X
XPps, if I made a mistake in my description of system call handling on
XSCO XENIX or what not, please correct me.
X
XPpps, `call far 7:0' seems really reasonable to me.
X-- 
Xag@elgar.CTS.COM         Keith Gabryelski          ...!{ucsd, crash}!elgar!ag
X
X
SHAR_EOF
echo 'File xsel386/select.txt is complete' &&
$TOUCH -am 0429171591 'xsel386/select.txt' &&
chmod 0644 xsel386/select.txt ||
echo 'restore of xsel386/select.txt failed'
Wc_c="`wc -c < 'xsel386/select.txt'`"
test 21402 -eq "$Wc_c" ||
	echo 'xsel386/select.txt: original size 21402, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= xsel386/ttiocom.c ==============
if test -f 'xsel386/ttiocom.c' -a X"$1" != X"-c"; then
	echo 'x - skipping xsel386/ttiocom.c (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting xsel386/ttiocom.c (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'xsel386/ttiocom.c' &&
X
X#include <sys/types.h>
X#include <sys/tty.h>
X#include <sys/select.h>
X
Xttiocom(ttyp, com, arg, flag)
Xstruct tty *ttyp;
Xint com, arg, flag;     /* there should be better types for this :-) */
X{
X        if (com == IOC_SELECT)
X        {
X                ttselect(ttyp, flag);
X                return(0);      /*** THIS IS IMPORTANT ***/
X        }
X        return(Ttiocom(ttyp, com ,arg, flag));
X}
X
SHAR_EOF
$TOUCH -am 0725125991 'xsel386/ttiocom.c' &&
chmod 0644 xsel386/ttiocom.c ||
echo 'restore of xsel386/ttiocom.c failed'
Wc_c="`wc -c < 'xsel386/ttiocom.c'`"
test 391 -eq "$Wc_c" ||
	echo 'xsel386/ttiocom.c: original size 391, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= doc/__rtscts.txt ==============
if test ! -d 'doc'; then
    echo 'x - creating directory doc'
    mkdir 'doc'
fi
if test -f 'doc/__rtscts.txt' -a X"$1" != X"-c"; then
	echo 'x - skipping doc/__rtscts.txt (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting doc/__rtscts.txt (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'doc/__rtscts.txt' &&
XAs of this writing,  SCO's driver
Xdoes half duplex (traditional, brain damaged) flow control if RTSFLOW is
Xenabled.  FAS does hardware flow control based on the device magic
Xnumber, but if you use a device number specifying no hardware flow
Xcontrol, RTSFLOW and CTSFLOW can be used to specify SCO-style flow
Xcontrol.  Advice: use rts on or off for SCO, use appropriate magic
Xnumbered device for FAS.
X
X.DS I
Xargument | RTSFLOW | CTSFLOW   argument | RTSFLOW | CTSFLOW
X---------+---------+---------  ---------+---------+---------
X  off    |   0     |   0         0      |   0     |   0
X  on     |   0     |   1         1      |   0     |   1
X  no     |   0     |   0         2      |   1     |   0
X  yes    |   1     |   1         3      |   1     |   1
X.DE
SHAR_EOF
$TOUCH -am 0718163291 'doc/__rtscts.txt' &&
chmod 0644 doc/__rtscts.txt ||
echo 'restore of doc/__rtscts.txt failed'
Wc_c="`wc -c < 'doc/__rtscts.txt'`"
test 756 -eq "$Wc_c" ||
	echo 'doc/__rtscts.txt: original size 756, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= doc/_basic.txt ==============
if test -f 'doc/_basic.txt' -a X"$1" != X"-c"; then
	echo 'x - skipping doc/_basic.txt (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting doc/_basic.txt (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'doc/_basic.txt' &&
X.*s 1 "Basic Organization"
X
XECU forks to run as two separate
Xprocesses, a transmitter (XMTR) and a receiver (RCVR).
XThe two processes
Xcommunicate via signals and a System V shared memory segment.
XXMTR controls RCVR and terminates it under certain circumstances,
Xcalled here auxiliary operations.  After an auxiliary operation
Xcompletes, XMTR forks again to recreate RCVR.
X
X.*s 2 "Transmitter Process (XMTR)"
X
XXMTR
Xaccepts user input from the computer keyboard; input is recognized
Xas belonging to one of two types: 1) transmit data and 2)
XECU commands.  Keyboard input
Xis passed to the serial line driver until an ECU command
Xis detected.  Commands are prefixed with a 
X.B HOME
Xkey which causes ECU to accept keyboard data up to the next ENTER
Xkey as command text.  After a command has been processed,
Xkeyed data is again routed to the serial line.
X
X.*s 3 "Keyboard Interface"
X
XThe keyboard driver is set into the raw mode.
XXMTR reads characters one at a time from the driver.
XNormally, characters read from the keyboard are passed directly to
Xthe serial line driver.  The
XASCII ESC ("escape") character is handled as a special case.
XWhen a function key is pressed, the keyboard generates
Xto XMTR an ESC character,
Xfollowed by more characters describing which function key has
Xbeen pressed.
XPressing the ESC key also causes XMTR to see an ESC character,
Xbut with no subsequent function key "suffix".
X
XWhen an ESC character is read, XMTR delays transmission of the
Xcharacter to the line for a short period to determine whether
Xthe ESC key has been pressed or a function key has been pressed.
XIf no "suffix" is detected, the ESC is passed to the line, having
Xsuffered an insignificant delay given human typing speeds.
X
XIf a function key "suffix" is detected, the function key type
Xis decoded.  The
X.B HOME
Xkey indicates an ECU command follows.  Any
Xother function key is passed to the function key mapping feature
X(described later).
X
X.*s 3 "ECU Command Assembly"
X
XAfter 
X.B HOME
Xhas been pressed, XMTR presents a reverse video prompt on the
Xdisplay, indicating its readiness to accept a command.  During
Xinput, the command may be edited using the same control keys
Xspecified with stty(C).  Additonal editing
Xusing the left and right arrow keys and the
XIns(ert) key are usually available.
XCommand input may be aborted by pressing ESC.
XWhen a command string has been assembled, it is passed to the
Xcommand processor, which breaks the command arguments into a token
Xarray similar to the argc/argv array.  When the command handler
Xreturns, XMTR returns to its normal mode of copying keyboard data to
Xthe serial line.
X
XFurther information on XMTR command line processing may be found in 
Xlater sections titled Line Editing and Interactive Command History.
X
X.*s 3 "Function Key Mapping"
X
XWhile in tty-to-line mode, function keys other than 
X.B HOME
Xare available to be mapped
Xto transmit short keystroke sequences on a connection by
Xconnection basis.  Under control of the dialing command ("Dial"
Xdescribed below)  or the function key control command ("FK"),
Xpredefined function key maps may be loaded.
X
XFunction keys which may be mapped are
X.B F1
Xthrough
X.B F12 ,
X.B PgUp ,
X.B PgDn ,
X.B End ,
X.B Ins ,
X.B Del ,
Xand
Xthe cursor control keys.
X
XThe unshifted keypad '5' key is permanently mapped to
Xproduce a screen snapshot when it is pressed and XMTR is
Xreading from the keyboard.
X
XThhe BackTab (shift Tab) key is mpermanently mapped to a screen
Xredisplay feature.
X
X.*s 3 "Auxiliary Operation Control"
X
XCertain commands cause ECU to perform what is called an
Xauxiliary operation, requiring temporary termination of the
XRCVR process.  Such operations are not as useful
Xwith
X.B cu(C) ,
Xbecause cu does NOT kill its receiver process at any time.
XAs a result, it impossible to run a modern file transfer
Xprotocol since the cu receiver process eats some of the
Xcharacters sent by the remote protocol program.
X
XThere are two types of auxiliary operations:
X1) internal interactive command or procedure
Xexecution and 2) external program execution.
XCertain
X.B internal
X.B commands
Xrequire tight control over the serial line.
XFor instance, the
X.B dial
Xcommand requires transmitting modem command
Xstrings and receiving modem response codes.  Such functions
Xare best accomplished by single-process control of the line.
X.B External
X.B program
Xexecution is of two kinds, file transfer invocation
Xand local shell/command execution.
X
XThe RCVR process is terminated in any of these cases either to
Xavoid the RCVR swallowing characters intended for other
Xtargets (the modem handler in XMTR or the file transfer protocol)
Xor to avoid having remote data interspersed with the output of
Xlocal programs.
X
X.*s 2 "Receiver Process (RCVR)"
X
XThe receiver process reads the incoming serial data stream and
Xpasses it to the user terminal driver through a filter which
Xscans for events such as the occurrence of ASCII BEL (bell)
Xcharacters or terminal control sequences.  RCVR also handles
Xthe session logging and ANSI filter functions.
X
X.*s 3 "ANSI Filter"
X
XSince the term "ANSI" is used to describe
X.B many
Xvariations on the ANSI X3.64 recommendations for terminal control (read
X"IBM pseudo-ANSI"), the ECU receiver process has an "ANSI filter" which
Xattempts to translate incompatible (read "MSDOS") ANSI-like control
Xsequences to sequences acceptable to the UNIX/XENIX display driver.
XThis includes support for the MS-DOS "save cursor" and "restore cursor"
Xsequences.
XMore information may be found later in "Terminal Model."
X
X.*s 3 "Session Logging"
X
XWhen directed by the user, the RCVR process logs incoming serial
Xdata to a file named on the log command line.  The default operation
Xis to filter unprintable characters (other than TAB and NL) from the
Xlog, but raw logging is available with a command option.  In a like
Xmanner, the default is for appending to an existing file, but a
Xcommand option may specify scratching any previous contents.
X
XLog files receive header lines each time the file is
Xopened, stating the logical system name, the telephone number
Xand the date/time.
X
SHAR_EOF
$TOUCH -am 0429171591 'doc/_basic.txt' &&
chmod 0644 doc/_basic.txt ||
echo 'restore of doc/_basic.txt failed'
Wc_c="`wc -c < 'doc/_basic.txt'`"
test 6049 -eq "$Wc_c" ||
	echo 'doc/_basic.txt: original size 6049, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= doc/_end.txt ==============
if test -f 'doc/_end.txt' -a X"$1" != X"-c"; then
	echo 'x - skipping doc/_end.txt (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting doc/_end.txt (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'doc/_end.txt' &&
X
X.br
X.nr si 0n
X.af % i
X.ls 1
X.TC 1 1 3
SHAR_EOF
$TOUCH -am 0429171591 'doc/_end.txt' &&
chmod 0644 doc/_end.txt ||
echo 'restore of doc/_end.txt failed'
Wc_c="`wc -c < 'doc/_end.txt'`"
test 39 -eq "$Wc_c" ||
	echo 'doc/_end.txt: original size 39, current size' "$Wc_c"
rm -f _shar_wnt_.tmp
fi
# ============= doc/_features.txt ==============
if test -f 'doc/_features.txt' -a X"$1" != X"-c"; then
	echo 'x - skipping doc/_features.txt (File already exists)'
	rm -f _shar_wnt_.tmp
else
> _shar_wnt_.tmp
echo 'x - extracting doc/_features.txt (Text)'
sed 's/^X//' << 'SHAR_EOF' > 'doc/_features.txt' &&
X.*s 2 "Supported Terminals"
X
XECU does not attempt to support terminal emulation in the classic
Xsense of the word.  It presents to the remote host an "ANSI-like"
Xterminal type as described earlier in the introduction and in 
Xthe section titled "ANSI Filter."
XHowever, it does support, with limitations, any LOCAL terminal
X(console) for which a valid termcap description exists. You MAY
Xbe able to use ECU with a remote terminal (calling into UNIX/XENIX
Xover a network or modem), but you may get unfavorable results with
Xfunction key usage if your modem is a "packetizing" type, such as
Xa Telebit or if ethernet or other networking chops up your keystroke
Xsequences.  ECU allows approximately 100 milliseconds after receiving
Xan ASCII ESC character for later characters of a function key sequence
Xto arrive.  If at least one character of the sequence has not been
Xreceived in that time, ECU treats the key as an ESCape, not a function key.
XThis typical problem of detecting ESC vs. function key is unfortunate, but
Xwe must live with it until paradigms change (say, in about 2010?).
X
XThe termcap entry for a console
XMUST contain a valid entry for the following database entries:
X
X.DS L
Xcl      clear screen
Xkl      cursor left
Xkr      cursor right
Xdc      delete character
Xdl      delete line
Xcd      clear to end of display
Xce      clear to end of line
Xic      insert character
Xal      insert line ("add" a "line")
Xcm      cursor motion
Xso      stand out (terminal specific attention getter)
Xse      stand end
X.DE
X
XThe above sequences MUST be present, valid and reasonably
Xefficient.  ECU does not use curses during it's primary mode of
Xoperation (keyboard send-receive). Unlike curses, ECU makes no
Xattempt to emulate missing terminal functionality.  Failure to
Xprovide valid entries will result in strange behavior with no
Xwarning.
X
XNote that the formal termcap description of "kl" and "kr" 
Xstate these are sequences generated by the terminal
X.B keyboard ,
Xbut ECU expects that these sequences also causes the desired
Xeffect when
X.B sent
Xto the
X.B screen .
X
XAdditionally, the following, optional, sequences will be used if
Xthey are detected.
X
X.DS L
Xmb      bold on ("XENIX" extension)
Xme      bold off ("XENIX" extension)
Xus      underscrore on
Xue      underscrore off
Xvb      visual bell
X.DE
X
XA future version of ECU may use terminfo instead of termcap.
XProblems with terminfo prevent its use at the present time.
XIn addition, early versions of XENIX do not support terminfo.
X
X.*s 2 "Function Key Recognition"
X
XECU recognizes 23 function keys as having special significance
Xto its operation.  They are (with their AT/"ANSI" character sequences):
X.DS I
XInternal  Description    AT/"ANSI" Char-
XName      or Key Label   acter Sequence
X--------  ------------   ---------------
XF1        F1                ESC [ M
XF2        F2                ESC [ N
XF3        F3                ESC [ O
XF4        F4                ESC [ P
XF5        F5                ESC [ Q
XF6        F6                ESC [ R
XF7        F7                ESC [ S
XF8        F8                ESC [ T
XF9        F9                ESC [ U
XF10       F10               ESC [ V
XF11       F11               ESC [ W
XF12       F12               ESC [ X
XHome      Home              ESC [ H
XEnd       End               ESC [ F
XPgUp      Page up           ESC [ I
XPgDn      Page down         ESC [ G
XCUU       Up arrow          ESC [ A
XCUD       Down arrow        ESC [ B
XCUL       Left arrow        ESC [ D
XCUR       Right arrow       ESC [ C
XCU5       "Cursor 5"        ESC [ E
XIns       Insert            ESC [ L
XBkTab     Back Tab          ESC [ Z
X.DE
X
XECU recognizes function keys entered by the user in
Xone of two ways, depending upon whether the terminal is
Xrecognized as an "ANSI" or "non-ANSI" terminal (see "Supported Terminals"
Xabove).
X
XIf an AT/"ANSI" terminal is in use, ECU expects the standard AT/"ANSI" sequences
Xto be generated by the keyboard according to the above table.
XThis means that no use of the setkey(C) program (or similar functionality)
Xmay be active.
X
XIf an "non-ANSI" terminal is in use, ECU matches a function key sequence
Xto an internal function key representation
Xby testing all keystroke sequences again an internal table loaded
Xat the beginning of execution from the file ~/.ecu/nonansikeys.
XNOTE that supported terminals MUST employ function keys which generate
Xsequences beginning with a character code between 0x01 and 0x1F, inclusive,
Xand containing no nulls.  Also, no sequence may begin with your end of line,
Xerase, interrupt, kill or other tty control character.
X
XThe program kbdtest3 (the source is provided in the distribution) can
Xassist you in determining what codes (if any) are delivered to ECU when
Xcertain keys are pressed.  kbdtest.c is a more primitive version of
Xthe same program.
X
XThe format of an file entry is shown below in the 'ansilike' example (used
Xto test ECU from the console by defining an 'test' terminal type
Xnevertheless equivalent to 'ansi').
X
XLines beginning with '#' are comments.
X
X.DS I
X#+------------------------------
X# ECU 3.0 nonansikeys
X#-------------------------------
Xansilike
Xansi
Xmsdos
Xdos
Xdosansi
Xtest
X    F1:F1:          esc [ M 
X    F2:F2:          esc [ N 
X    F3:F3:          esc [ O 
X    F4:F4:          esc [ P 
X    F5:F5:          esc [ Q 
X    F6:F6:          esc [ R 
X    F7:F7:          esc [ S 
X    F8:F8:          esc [ T 
X    F9:F9:          esc [ U 
X    F10:F10:        esc [ V 
X    F11:F11:        esc [ W 
X    F12:F12:        esc [ X 
X    Home:Home:      esc [ H 
X    End:End:        esc [ F 
X    PgUp:PgUp:      esc [ I 
X    PgDn:PgDn:      esc [ G 
X    CUU:CUU:        esc [ A 
X    CUL:CUL:        esc [ D 
X    CU5:CU5:        esc [ E 
X    CUR:CUR:        esc [ C 
X    CUD:CUD:        esc [ B 
X    Ins:Ins:        esc [ L
X    BkTab:BackTab:  esc [ Z
X.DE
X
XThe first line(s) in a terminal keyboard description begin in
Xcolumn 1 and contain the terminal types (a la $TERM) for which
Xthe keyboard description are valid.  The example entry contains
Xseveral references to terminal types containing the substring
X'ansi'.  These are included only as an example of one keyboard
Xdescription servicing multiple terminal types.
X
XECU determines whether a terminal meets the ansi vs.  ANSI
Xdistinction by searching for 'ansi' in the $TERM environment
Xvariable (without regard to case: 'AnSi' will match as well as
X'ansi').  If your keyboard matches the ANSI specification even
Xthough your $TERM environment variable does not contain 'ansi'
X(such as 'sun'), then you may add the terminal type to the 'ansilike'
Xentry rather than create a separate entry.
X
XFollowing the "first lines" are key definition entries, each
Xpreceded by at least one tab or space.  Each entry is composed of
Xthree fields delimited by commas.  The first field of an entry is
Xthe internal ECU function key name and must be chosen from the
Xfollowing strings (with no regard to case): "F1", "F2", "F3",
X"F4", "F5", "F6", "F7", "F8", "F9", "F10", "F11", "F12", "Home",
X"End", "PgUp", "PgDn", "CUU" (cursor up), "CUL" (cursor left),
X"CU5" (unshifted cursor pad 5), "CUR" (cursor right) and "CUD"
X(cursor down). The
Xsecond field contains the name of the key as it appears on the
Xnon-ANSI keyboard (such as "F16" for End on the Wyse 60).  The
Xthird field is a description of the character sequence generated
Xby the non-ANSI keyboard when the chosen key is pressed; it is a
Xstring of one or more tokens separated by spaces or tabs.
X
XNote that while ECU requires a function key sequence to begin with
Xan ASCII ESC (escape), each table entry must contain
Xan 'esc' as it's first sequence token.  This seemingly
Xsuperfluous requirement ensures compatibility
Xwith possible future support for function keys which do not
Xbegin with ESC.
X
XIn addition, function key sequences may not contain the NUL (0)
Xcharacter, nor may they exceed 10 characters, including the leading ESC.
X
XThe tokens are described in full in the following  sections titled
X"Function Key Recognition" and "Function Key Mapping."
X
XPLEASE NOTE: ECU does not have a reasonable way for you to terminate
Xit if there are no Home and End keys defined, so it refuses to proceed
Xif no definitions are found.  Even so, if you have incorrect definitions,
Xyou may not be able to get out of ECU without a kill -1 <pid> from
Xanother terminal or hanging up your connection with UNIX/XENIX
Xif using ECU from remote.
X
X.*s 2 "Function Key Mapping"
X
XECU recognizes function keys in a manner described in the above
Xsection titled "Function Key Recognition."
XThis section deals with how ECU behaves
Xonce a function key has been recognized as having been entered
Xat the keyboard. 
X
XAll function keys with the exception of the 
X.B Home ,
X.B BkTab
X(shift TAB),
Xand keypad unshifted 5 key can be programmed to emit selected strings.
XFor instance, when communicating with a Stratus computer,
Xdoing your best to emulate a VT100, a function key
Xmap might be constructed as follows:
X.DS L
X F1  F1     F2  F2         Home ecu cmd     PgUp  dispform
X F3  F3     F4  F4         End  enter       PgDn  cancel
X F5  F5     F6  F6         Ins  local shell CUR5  Screen dump
X F7  status F8  no status  BkTab restore receiver display
X F9         F10 redisp     CUR^ ^           CUR>  >
X F11        F12            CUR< <           CURv  v
X.DE
X
XFunction key mapping is placed in ~/.ecu/keys.  The Stratus example:
X.DS L
Xstratus
X    F1:F1:esc O q
X    F2:F2:esc O r
X    F3:F3:esc O s
X    F4:F4:esc O t
X    F5:F5:esc O u
X    F6:F6:esc O v
X    F7:F7:esc O w
X    F8:status:dc4
X    F9:no status:nl
X    F10:redisp:esc O y
X    F11:redisp:syn
X    PGDN:cancel:esc O Q
X    END:enter:esc O M
X    PGUP:dispform:esc O R
X    CUU:^:dle
X    CUD:v:so
X    CUL:<:stx
X    CUR:>:ack
X.DE
X
XIf you have installed the mapkey file (as described in the release directory
Xin mapkeys/README), then ALT-a through ALT-z causes the "silent"
Xexecution of procedures 'alt_a.ep' for ALT-a, 'alt_b.ep' for ALT-b, etc.
XThe models subdirectory contains an example alt_h.ep which will home
Xthe cursor when ALT-h is pressed.  This facility allows the execution
Xof 26 procedures without ECU itself changing the video display at all.
XAny changes to the display (short of procedure errors) will result
Xsolely from the action of the invoked procedure.
XIf the procedure matching the ALT-[a-z] key pressed cannot be found,
Xa short error message is printed and the terminal bell is rung.
X(Using back tab may be used to refresh the display in this event.)
X
XNOTE: ECU 3.10 CHANGES TO THE SINGLE KEY PROCEDURE FUNCTIONALITY
XMAKE IT NECESSARY FOR YOU TO REVIEW mapkeys/README IF YOU HAVE USED
XTHIS FEATURE IN PREVIOUS REVISIONS.
X
XThe strings used to represent "non-printable" characters are identical
Xto the formal ASCII names given them (without regard to case), viz:
X.DS I
X      NUL may not appear in a non-ANSI function key definition
X
X0x00 nul    0x10 dle 
X0x01 soh    0x11 dc1 
X0x02 stx    0x12 dc2 
X0x03 etx    0x13 dc3 
X0x04 eot    0x14 dc4 
X0x05 enq    0x15 nak 
X0x06 ack    0x16 syn 
X0x07 bel    0x17 etb 
X0x08 bs     0x18 can 
X0x09 ht     0x19 em  
X0x0A nl     0x1A sub 
X0x0B vt     0x1B esc 
X0x0C np     0x1C fs  
X0x0D cr     0x1D gs  
X0x0E so     0x1E rs  
X0x0F si     0x1F us  
X            0x20 sp  
X            0x7F del 
X.DE
X
X.*s 2 "Host Video Control Sequences"
X
X.*s 3 "All Local Terminals"
X
XThe following sequences are recieved over the line
Xby ECU and properly interpreted for all local terminal types
X(multiscreen, rlogin/xterm pseudotty, serial).
X
X.DS L
XSequence  | Description
X----------+-------------------------------
XESC [ @   | ICH
XESC [ A   | CUU
XESC [ B   | CUD
XESC [ C   | CUF
XESC [ D   | CUB
XESC [ E   | CNL       See ANSI X3.64,
XESC [ F   | CPL       screen(HW) and/or
XESC [ H   | CUP       MS-DOS Technical
XESC [ J   | ED        Reference Manual
XESC [ K   | EL
XESC [ L   | IL
XESC [ M   | DL
XESC [ P   | DCH
XESC [ S   | SU
XESC [ T   | SD
XESC [ X   | ECH
XESC [ `   | HPA
XESC [ a   | HPR
XESC [ d   | VPA
XESC [ e   | VPR
XESC [ f   | HVP
XESC [ ? m | SGR
XESC [ n   | DSR (see below)
XESC [ s   | save cursor MS-DOSism
XESC [ u   | restore cursor MS-DOSism
X.DE
X.DS L
XSGR Sequences for ALL TERMINALS
XSequence  | Description   |  Maps to termcap
X----------+---------------+-------------------------------
XESC [ 0 m | normal        |  "se"+"me"+"ue"
XESC [ 1 m | bold          |  "so"
XESC [ 4 m | underscore    |  "us"
XESC [ 5 m | blink         |  "mb" (XENIX extension)
XESC [ 7 m | reverse video |  "so"
X.DE
X
X.*s 3 "Multiscreen Local Terminals"
X
XIn addition to the above, if you are operating from a color
Xmultiscreen, additional (SCO and MS-DOS/ANSI.SYS) sequences
Xare supported (see screen(HW)):
X
X.DS L
XAdditional Multiscreen SGR Sequences
XSequence    | Description  (no termcap mapping)
X------------+-----------------------------------------------
XESC [ 8 m   | non-display
XESC [ 1 0 m | select primary font
XESC [ 1 1 m | select first alternate font (0x00-0x1F)
XESC [ 1 2 m | select second alternate font (0x80-0xFF)
XESC [ 3 0 m | black foreground
XESC [ 3 1 m | red foreground
XESC [ 3 2 m | green foreground
XESC [ 3 3 m | brown foreground
XESC [ 3 4 m | blue foreground
XESC [ 3 5 m | magenta foreground
XESC [ 3 6 m | cyan foreground
XESC [ 3 7 m | white foreground
XESC [ 3 8 m | enables underline option
XESC [ 3 9 m | disables underline option
XESC [ 4 0 m | black background
XESC [ 4 1 m | red background
XESC [ 4 2 m | green background
XESC [ 4 3 m | brown background
XESC [ 4 4 m | blue background
XESC [ 4 5 m | magenta background
XESC [ 4 6 m | cyan background
XESC [ 4 7 m | white background
X.DE
X
X.s 3 "MS-DOS 'SGR Gaggles'"
X
XECU also does it's best to interpret MS-DOS "SGR gaggles" such as
X.DS I
XESC [ 5 ; 3 4 ; 4 7 m
X.DE
Xwhich means "set the terminal to white background with
Xblue blinking foreground."
X
X.*s 3 "Character Mapping"
X
XThe PC ROM single ruling
Xcharacters from the following table are mapped after the fashion of:
X
X.DS L
X       .-----+--------.
X       |     |        |
X       |     +--------+
X       |     |        |
X       +-----+        |
X       |     |        |
X       `-----+--------'
X.DE
X.DS L
XMapped Characters (see pc_scr.h):
XHex  | Description
X-----+---------------------------
X0xDA | top left single rule
X0xBF | top right single rule
X0xC0 | bottom left single rule
X0xD9 | bottom right single rule
X0xC3 | left hand T
X0xB4 | right hand T
X0xB3 | vertical rule
X0xC4 | horizontal rule
X.DE
X
X(Due to momentary laziness on the part of the author, double
Xruling characters will appear as random druk, unless your terminal
Xhas joined the Church of the True-Blue ROM.
XOne day an X version of this program may appear and you can choose
Xto no longer accomplish real work, but may spend your days editing
X42Kb resource files which will give you TAC, Total Anal Control,
Xover all this.)
X
X.*s 2 "Line Editing"
X
XWhen you are entering a line of text for an ecu command or in
Xa field on a screen, you may edit it in a number of ways at any
Xtime prior to pressing Enter.  Cursor Left moves the cursofr left
Xby one character position, nondestructively.  Cursor Right moves
Xto the right.  Insert toggles insert mode.  Backspace (your
Xerase key as specified to stty in commands, the actual backspace key
Xin screens) deletes the character to the left of the cursor.
XYour line kill key (as specified to stty) in command mode or
Xthe ^U character in screen mode erases the entire line.  Esc
Xin command mode cancels the command.  Esc in screen mode usually
Xcancels the screen or subfunction in a screen.  ^L or ^R in
Xinteractive command mode shows the current state of Insert mode and
Xredisplays the edited string.
X
X.*s 2 "Screen Dump"
XWhen the "cursor 5" key is pressed, the screen contents are
Xdumped to a file.  By default, this file is named '~/.ecu/screen.dump'.
XThe
X.B sdname
Xinteractive command either displays or changes the current screen
Xdump file name, depending upon whether or not a argument
Xis supplied.
XThe
X.B scrdump
Xprocedure command can initiate a dump.
X
X.*s 3 "Multiscreen and Non-Multiscreen"
XNote that from multiscreens, screen dump produces a dump of the
Xactual screen contents, including ECU-generated output.  When
Xusing a non-multiscreen terminal, screen dump dumps only the 
Xshared memory virtual screen as received from the host.
XIf standard input is not a serial line (xterm o or /dev/null),
Xscreen dumps will be of the non-multiscreen type.
X
XIf, at a multiscreen, you wish a screen dump free of ECU output
X"pollution," use Shift-Tab (BkTab) to redraw the screen, then
Xperform the screen dump.
X
X.*s 3 "Multiscreen Bug"
XThere has been a bug in the multiscreen driver for some time
Xwherein a MEDIA COPY (screen dump) sequence ("ESC [ 2 i") leaves
Xthe "ESC [ 2" part "active".  When a screen dump (Cursor 5)
Xcommand is given, I do the sacreen dump, then send a "l" to the
Xscreen to work around the bug ("ESC 2 [ l" unlocks the keyboard,
Xessentially a no-op).  If and when it gets fixed, you'll see an
X"l" show up on your screen after a screen dump sequence.  To fix
Xthis, comment out the
X.DS I
X#define MULTISCREEN_DUMP_BUG
X.DE
Xat the top of ecuscrdump.c.
X
X.*s 2 "Interactive Command History"
X
XAfter pressing the Home key, pressing it again invokes the
Xinteractive command history function.  After the second
XHome key is pressed, the last interactive command is
Xredisplayed. Line editing may be performed on the command as described
Xin the previous section.
X
XAdditionally, using the Cursor Up key accesses less recent commands.
XThe Cursor Down key accesses more recent commands.  Pressing Enter causes
Xthe command to be executed.  Pressing Esc aborts command entry.
X
X.*s 2 "Dialing Directory"
X
XECU provides an on-line editable dialing directory.  Remote
Xsystems are defined as records using alphanumeric identifiers
Xas keys.  Other record fields include telephone number, baud
Xrate, parity and textual description.
X
XOther features include changing to alternate dialing directory
Xand a multi-number redial cycle function. Refer below to the description
Xof the interactive
X.B dial
Xcommand.
X
XEntering or editing a dialing directory entry is for the most part
Xstraightforward.  A note on the use of the "tty" field is useful, however.
XWhen prompted for a tty, you may choose
X.BL
X.LI
X"Any" line
X.LI
Xa tty line matching a Devices type
X.LI
Xa specific tty line (enter the tty name minus the "/dev/tty" portion)
X.LE
X
X"Any" matches any tty line in the /usr/lib/Devices file supporting
Xthe specified baud rate and whose Devices type begins with the
Xcharacters (case independent) "ACU".  This choice is provided to
Xbe compatible with earlier versions of ECU (prior to 3.10). 
X
XA more general choice for choosing a tty line based on Devices type
Xis the "Devices type matching" choice, invoked by prefixing the tty
Xfield with a slash or equals sign.
X
X.BL
X.LI
X/ prefix searches for a Devices type matching a regular expression (a
Xla sed or ed)
X.LI
X= prefix searches for an exact match on a Devices type
X.LE
X
X.DS L
XExamples:
X
X   =ACU        matches "ACU", fails on "acu" and "ACUx"
X   /.*tbit.*   matches "ACUtbit1", "tbit"
X.DE
X
XA specific tty line may also be specified.  This is the only means
Xof attaching a line not mentioned in the Devices file.
X
XThe following sample dialing directory screen shows an edit in
Xprogress.
X
XNOTE:  If the bell rings and you are not allowed to leave a field,
Xit is because you MUST enter acceptible data before you can leave
Xa field using other than the ESCape key.
X
X
X.DS L
X.--[ dialing directory ]-- /u1/wht/.ecu/phone --------- modified ---.
X| entry name | telephone number | tty | baud P | description        |
X| ......     | ........         |Any  | 2400 N | ...............    |
X| li.--[ entry: new ]--------------------------------------------.  |
X| ..|                                                            |  |
X| ..| telephone number  1(800)555-1212                           |  |
X| ..| device            =ACUtbit                                 |..|
X| ..| baud rate         19200                                    |..|
X| ..| parity            N                                        |  |
X| ..| description       don't call this_________________________ |..|
X| ..| debug level       0  (dialer -x value 0-9)                 | .|
X| ..|                                                            |  |
X| ..| Enter description                                          |..|
X| ..| ESC: finish  ^U: erase ^B: back  TAB: fwd                  |  |
X| ..`------------------------------------------------------------'  |
X| .....      | ..........       |2b   | 9600 N | ...................|
X| sco19      | 1(408)426-9525p  |2b   | 9600 N | SCO Tech Services  |
X| sco24      | 1(408)426-9495   |2b   | 2400 N | SCO Tech Services  |
X+-------------------------------------------------------------------+
X.DE
X
X.*s 2 "Online Command Dictionary"
X
XThe ECU help command presents a display of interactive commands.  The user
Xis then prompted to enter a command name for further, Unix-style
X"usage" information.
X
X.*s 2 "Multiscreen Event Alarm"
X
XBy using the 
X.B BN
X(bell notify) interactive command, an audible alert is sent to all
Xmultiscreens when an ASCII BEL (bell) is received or when a file
Xtransfer completes.  An additional option causes an alert when ANY
Xdata is received from the line.  This makes it simple to do work on
Xother multiscreen consoles and be alerted when attention to the
Xcommunications session is required.
X
XFor instance, the Berkeley 4.x Unix utility "talk" rings the bell when
Xanother user wishes an interactive chat mode.  BSD "biff" rings the bell
Xwhen incoming mail is received.  Scripts or commands at remote sites can
Xbe configured to ring the bell as in:
X.DS I
Xmake foo bar; bell; make more_stuff; bell;
X.DE
Xto call attention to the ECU user when work is being done
Xon other multiscreen consoles.
X
XThis feature is only available when you are running ECU from a multiscreen.
X
X.*s 2 "Built-in Modem Dialer"
X
XThe built-in ECU dialer supports modems which use the 
X.B
XHayes-style AT command set or most variants
X.R
X.B thereof .
XIt is used when HoneyDanBer UUCP is not installed or when there is no
Xentry in the /usr/lib/uucp/Devices file for the selected outgoing line.
X(For more information, see the later section titled "HoneyDanBer UUCP
XInterface".)
X
XThe built-in dialer uses files in the /usr/lib/ecu directory which
Xcontains modem initialization information.  Modem initialization
Xfilenames are made from concatenating the tty name with ".mi".  For
Xinstance, tty1a's initialization file is named "tty1a.mi".
X
XCommands for initializing the modem and for dialing may be specified in
Xa very flexible manner.  Separate init and dial strings for each legal
Xbaud rate, a single pair of strings for all baud rates or a combination
Xmay be specified.
X.DF L
X.hl
X.ce 1
XSample Modem Initialization Files
X
X#+-----------------------------------------------------------
X#  tty1a.mi - Microcom AX/9624c
X#------------------------------------------------------------
Xinit_>2400:ATS11=47X4S0=0S7=30\Q1\X1\N3   # baud rates > 2400
Xinit_default:ATS11=47X4S0=0S7=30\Q0\X0\N0 # other baud rates
Xdial_default:ATDT
X
X
X#+-----------------------------------------------------------
X#  tty2d.mi - USR Courier 2400
X#------------------------------------------------------------
Xinit_default:ATS11=47 X4 S0=0 S7=32
Xdial_default:ATDT
X
X.DE
X
X.*s 2 "File Transfer"
X
XECU supports numerous file transfer protocols: as of this writing,
XXMODEM, XMODEM/CRC, XMODEM-1K, YMODEM/CRC Batch, ZMODEM/CRC-16,
XZMODEM/CRC-32, and Kermit are supported.  Although a seamless interface
X(there's some yuppie marketing newspeak) is provided to the user,
Xtransfer is facilitated by executing external programs.
X
XAs of this writing SEAlink is not in the best of health (no one
Xhas complained :-).
X
XKermit support required you to obtain and patch C-Kermit 4E.
XThe patch information is available in the ckermit subdirectory
Xof the release.  As soon as C-Kermit 5 is stable and released by
XColumbia, a suitable patch will be developed for it.  It
Xis quite possible no patching will be necessary.
X
XXMODEM, YMODEM and ZMODEM transfers (thanks to modified public domain
Xprograms by Chuck Forsberg) present dynamic status displays similar to
SHAR_EOF
true || echo 'restore of doc/_features.txt failed'
fi
echo 'End of ecu310 part 32'
echo 'File doc/_features.txt is continued in part 33'
echo 33 > _shar_seq_.tmp
exit 0
--------------------------------------------------------------------
Warren Tucker, TuckerWare emory!n4hgf!wht or wht@n4hgf.Mt-Park.GA.US
Hacker Extraordinaire  d' async PADs,  pods,  proteins and protocols

exit 0 # Just in case...
-- 
Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
Sterling Software, IMD           UUCP:     uunet!sparky!kent
Phone:    (402) 291-8300         FAX:      (402) 291-4362
Please send comp.sources.misc-related mail to kent@uunet.uu.net.


