[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
making tops20 EMACS more efficient.
- To: BILLW @ SRI-KL
- Subject: making tops20 EMACS more efficient.
- From: Christopher C. Stacy <CSTACY @ MIT-MC>
- Date: 20 January 1984 01:08 EST
- Cc: bug-emacs @ MIT-XX, editor-people @ SU-SCORE
- In-reply-to: Msg of Thu 19 Jan 84 13:45:39-PST from William "Chops" Westfield <BILLW at SRI-KL.ARPA>
I don't know what people have been proposing for TOPS-20, but here is
the documentation for the system call that ITS provides to make TECO
ECHOIN: echo characters and store them in a buffer,
until a break character
arg 1 TTY channel number
arg 2 Byte pointer to buffer
arg 3 Number of characters left in buffer
arg 4 Address of break table
arg 5 Address of TECO buffer block (or zero)
The second and third arguments are counted out as characters
are stored. When the call returns due to a break character, the
count will still be greater than zero.
ECHOIN tells the system to echo characters and insert them in
the buffer specified by the second and third arguments without
requiring the user program to be executed. This is more
efficient and gets visibly faster response time. Echoing
stops when either the count is exhausted or a break character
is input. When this happens, the ECHOIN returns. If it returns
because of a break character, then the break character
is available for normal input. Non-break characters following
the break character are not handled.
Break characters are specified by the break table,
a four-word block pointed to by the fourth argument. Each of
the four words says, for 32 characters, whether they break
or not. In the first word, the sign bit is for SAIL code 0,
and bit 1.5 is for SAIL code 37. The sign bit of the second
word is for Space, and bit 1.5 is for ?. And so on.
Characters with Control or Meta set (including ASCII control
characters on non-Meta keyboards) are always break characters.
To prevent timing errors, ECHOIN will return immediately if
there are characters in the input buffer already.
For use by TECO, ECHOIN can update the block of counters which
TECO uses to remember the extent of the buffer. The fifth
argument should point to this block, the "Buffer block", which
is seven words long. When a character is inserted, the first
two words of the buffer block are not changed, the next four
are incremented, and th next one is decremented. Passing the
buffer block to ECHOIN allows ECHOIN to insert characters
directly into TECO's buffer as an indivisible operation.
Note that the insertion of the characters themselves is still
controlled by the byte pointer and count arguments.
However, in the future this may change; when ECHOIN is made
able to handle operations besides insertion, it will use the
buffer block for updating the buffer (which may involve deletion)
but will still insert all characters it processes down the byte
pointer. This way, TECO will have both an updated buffer and
a list of the commands which the user typed.