Ut2 Features And Calling Sequences; Ut2 Read And Type Routines - RCA COSMAC Operator's Manual

Microkit
Hide thumbs Also See for COSMAC:
Table of Contents

Advertisement

UT2 FEATURES AND CALLING SEQUENCES
UT2 READ AND TYPE ROUTINES
These routines allow a calling program to read or type
a character from or to a terminal which is connected to
the Microkit through the Terminal Board.
Their main
function is to convert parallel 8-bit ASCII-coded bytes
to and from II-bit serial Teletype codes.
Auxiliary
functions allow the
u~er
to type a COSMAC byte as two
hex characters, or to assemble hex input characters
into a
COS~~C
register.
The routines are designed to allow adaptation to various
clock speeds and terminal speeds, and to whether or not
characters read in should be "echoed" (i.e., typed back
immediately).
For these purposes, a "sub-subroutine"
DELAY is included, which provides the necessary bit
timing delays to READ and TYPE.
A pointer to this routine
must be set up before READing and TYPEing.
A control
constant is assumed to be available in one specific
register, called AUX.*
This constant occupies the upper
half of AUX (AUX.l) and has two parts.
One bit, the least
significant, specifies echo or not (0 denotes echo, 1 de-
notes no echo).
For Teletypes connected in Full Duplex,
the bit should be O.
For Execuports, the bit should be 0
if Full Duplex operation is employed, and 1 for Half Duplex.
The remainder of AUX.l constitutes a timing parameter.
It
is calculated as follows:
TP=2X(interval between two serial bitS)
**
320x(COS~~C
clock period)
,
where the fraction is rounded to the nearest integer.
For
example, a Teletype
operat~s
at 10 char/sec and 11 bits/char,
so for the kit running from the supplied 1.95 MHz clock,
(
1 sec
x
1 char
TP=2x
10
char
11
bltS )
320
x
1
sec
L95x10
6
=2x[53.6 (rounded to 54)]
=108.
*
**
See Tables 1 and 2 (pp. 29,30) for the assignment of register
numbers and memory addresses to the names mentioned here.
The factor of 2 comes from the fact that the least signif-
icant bit of TP is not used for timing
it is the echo flag.
The 7-bit timing value stored in AUX.1 is actually TP/2.
- 26 -

Advertisement

Table of Contents
loading

Table of Contents