RCA CDPl8S693 User Manual page 20

Table of Contents

Advertisement

4. Running the MCDS COSM AC Resident Editor (CRE)
The proper format for tape files is shown in Fig. 5.
Each line is terminated with a CARRIAGE RETURN
(CR), LINE FEED (LF) pair, followed by afield of six
nulls. The NULL character (hex code 00) is ignored by
the system. A set of nulls appears after each CR, LF,
pair merely to provide a sufficient time delay for the
printer carriage to settle to the new line when the tape
contents are being printed. Note that the last line on
the tape should be followed by a "dummy" line
containing only the single data character DC3. DC3 is
a special control character (generated on the keyboard
by hitting CTRL and S). It acts as an END OF FILE
indicator.
Tape records read by CRE are deposited into the
buffer as they appear on the tape, but with all LF's and
NULL's ignored. (Incidentally, the DEL or RUBOUT
character, hex code 7F, is also ignored on tape input)
While CRE operates on the data in its buffer, it
specifically uses the CR character as an indicator of the
end of a line. (Recall that a line has a variable length.)
A new line is assumed to start with the next character
in the buffer. The buffer format is shown in Fig. 6.
When CRE is depositing keyboard data into its
buffer, the ASCII code equivalent of each struck key
(any printing character, and almost any control
character - with exceptions as noted below) goes into
memory and is also "echoed" back to the printer.
However, CRE specifically ignores the LF key.
Further, when the RETURN key is hit, the CR
character goes into memory and a CR, LF pair of
characters is echoed back to the printer to start a new
line. Thus, the user terminates a line ofkeyboard input
with a single carriage RETURN. Normally, then, the
LF character should not appear at any point in the
buffer.
UP TO 78 DATA
CHARACTERS
~*
I
FIRST LINE
DATA CHARACTERS
~ ~ --------------------- 1 - ------------------- ^
SIX
CR
LF
N U LLS
*~
~~
SECOND LINE
( FOLLOW ED BY
LF + 6 N U L L S )
Fig. 5— Tape file format.
CR
h -
|
LIN E I
LIN E 2
Fig. 6—Memory buffer format.
Whenever CRE transmits a CR character to the
terminal, it automatically appends to it the LF, six
NULL field to maintain the tape formatjust discussed.
It is conceivable that due to the user error one or
more lines on the input file or in the buffer may exceed
the 78 data character length restriction. For example,
data alterations in the buffer may have resulted in
deleted CR's. (Note that each CR deleted in the buffer
causes the concatenation of its adjacent lines.) CRE
has the following provisions for handling lines that
exceed the length restriction:
( 1) Whenever CRE is outputting a line to the printer as
the result of a user TYPE command, if the line exceeds
78 characters, a "LINETOO LONG" message will also
be printed.
(2) IF CRE encounters too long a line while writing
from the buffer to the output tape, the line will be
broken up, using as many 78-data-character records as
are necessary - each terminated by an appended CR,
LF, 6-NULL field.
(3) A line which is too long on the input file is truncated
to 78 characters, with a CR appended, in the buffer.
Buffer Pointer
The total RAM space available for the buffer is
generally partially filled. When CRE is first initialized,
the buffer is empty. When data is added to the buffer
(from the keyboard or from the input tape) the buffer
expands. When data is deleted, the buffer contracts.
CRE continually keeps track of the present extent of
the buffer within the work space.
z
~*
I
► ~*
I
*~
LAST LINE
( FOLLOWED BY
LF + 6 N U LLS )
77
DC 3
h-
|
^
*~
LIN E m
Sc CM - c 8 2 I 4
SIX
DC3
CR
LF
N U LLS
I
*■
END OF FILE
" DUMMY " LINE
9 2 C M - 2 8 2 I 5
CR
|___PR ES ENT ONLY IF LINE m IS THE
LA S T LINE IN THE INPUT FILE
19

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cdpl8s694

Table of Contents