Implementation on the PDP-7
P.J. Brown
10th April 1968
Copyright © 1968 P.J. Brown
Permission is granted to copy and/or modify this document for private use only. Machine readable versions must not be placed on public web sites or FTP sites, or otherwise made generally accessible in an electronic form. Instead, please provide a link to the original document on the official ML/I web site.
Copyright © 1968 P.J. Brown
Permission is granted to copy and/or modify this document for private use only. Machine readable versions must not be placed on public web sites or FTP sites, or otherwise made generally accessible in an electronic form. Instead, please provide a link to the original document on the official ML/I web site.
• Restrictions and Additions | Restrictions and additions on the PDP-7 | |
• Operating Instructions | Operating Instructions on the PDP-7 | |
• Character Set | Character set accepted by ML/I | |
• Error Messages | Error messages | |
• Integer Calculations | Notes on integer calculations |
The PDP-7 implementation of ML/I contains all the features described in this manual with one restriction, namely that the multiply and divide operators are not allowed within macro expressions. The PDP-7 implementation contains no extra features.
ML/I is loaded in the standard manner by loading the RIM
loader, setting the address switches to 17770
and pressing
START
. It is sum-checked as it is loaded, and loading stops if
the check fails. ML/I does not use the accumulator switches.
The source text may be in ASCII or Titan Flexowriter code and the output text may be punched in either code. In addition the output text may be typed on the typewriter. The source text for a process may be on separate tapes.
The user operates ML/I via the keyboard. When ML/I is ready to receive orders
from the user it types WHAT NOW?
. This occurs when the system
tape is loaded, when a stop code (form feed) is read or when an error
has caused a process to be aborted. The user first types his required
orders to set or to change the I/O options and then he orders processing
to start or to continue. If ML/I recognises an order, it types a
newline; if it does not, it types a question mark followed by a newline.
The permissible orders and their meanings are listed in the next two
Sections.
The initial environment is set up by using the F
orders of
Section A.2.2. These orders terminate the current process and
reinitialise the environment ready for the next process.
The following orders are used to set the I/O options:
IF | Input is in Titan Flexowriter code. |
IA | Input is in ASCII. |
IB | As IF except that a blank row of tape is interpreted
as a stop code rather than as an illegal character. |
OF | Punched output in Titan Flexowriter code is required. |
OA | Punched output in ASCII is required. |
ON | No punched output is required. |
T | Output is to be typed on the teleprinter. |
S | Output is not to be typed (S stands for ‘suppress’). |
Output may be both punched and typed, if desired. If a tab occurs in some output to be typed, then two spaces are typed plus enough extra spaces to make the number of characters on the current line a multiple of eight.
The following orders cause ML/I to start to perform some action:
E | Type out all the names of all the constructions in the current environment, and then await further orders. |
CT | Continue processing. Source tape has a title. |
CN | Continue processing. Source tape has no title. |
CK | Continue processing taking input from the keyboard.
ML/I types the current line number and the user then types a line of
input. At the end of a line he types a carriage return. ML/I stores the
text typed by the user, translating the carriage return into a newline,
and types the next line number. The user then continues typing his
input. If the user types a line feed or any illegal character, then the
current line of input text is ignored. In this case ML/I types the
message:
LINE REJECTED. TRY AGAIN and retypes the same line number. At the end of his input, or at a
suitable break-point, the user types a form feed. ML/I then proceeds
with processing the text from the keyboard as if this text had been on
an input tape and the user had typed |
FR | Terminate current process and reset the environment to
its state at the start of the current process. However, if any delimiter
or keyword has been MCALTER ed during the current process, the
change remains in effect. The values of the permanent variables are
indeterminate after an occurrence of FR . |
FO | As FR except that the environment is reset to
consist only of the operation macros and ten permanent variables. |
FZ | Terminate current process and reset the environment as null. |
FL | Terminate current process and leave the environment in its current state. |
FP | As FL but, in addition, a new system tape is
punched. When this system tape is loaded the current environment will
be the environment in force when the tape was punched. Thus if a user
regularly uses certain macros, he can produce his own system tape which
includes them. System tapes are punched in the order in which they are
loaded, not backwards like “funny format” tapes. |
P | Equivalent to typing CT and then typing FR
at the next stop code. It is convenient to use P if a process has
a single source tape. |
Note that if an error causes a process to be aborted, the action of
FR
is performed automatically by ML/I. If the user artificially
stops a process, ML/I can be restarted at address 22 and the action of
FR
will be performed automatically.
If an F
order causes user-defined constructions to be deleted
from the environment, then the storage occupied by them is released.
However, FZ
does not cause the storage occupied by operation
macros to be released, and the operation macros can be restored by
FO
. FZ
is useful for a straight copying operation such as
converting a tape between ASCII and Flexowriter code.
It is quite legitimate to have two F
orders in succession.
Assume the following situation. The operation macro calls to set up the desired environment are on tape 1, which is in ASCII, and the text to be processed is on tapes 2 and 3, which are both in Flexowriter code. All input tapes have titles. A single ASCII output tape is required. In this case the operating procedure is as follows:
IA
, ON
, S
and
CT
.
E
(if desired), T
(if
desired), IF
, OA
and CT
.
P
(alternatively, if the
environment is required for a further process, type CT
and, at
the next stop code, FL
).
If the source tape reads normally for a while and then shoots through,
then the cause is probably a missing delimiter. Type FR
when the
stop code is reached, and the required error message will be typed.
If the user has indicated an input tape has a title, then ML/I takes the title as consisting of any newlines at the start of the tape, together with all the text up to and including the next subsequent newline. There are no restrictions on the form of this text. The title is typed on the teleprinter and, if punched output has been specified, punched. Processing then continues normally. Stop codes within titles are completely ignored.
A stop code (form feed) is not in the ML/I character set and if, on reaching the stop code of one tape, the user loads a continuation tape, then the effect is as if the two tapes had been joined together with no intervening stop code (it is even possible to have a stop code in the middle of an identifier). This applies even if the continuation tape has a title, in which case the title is processed as described above, and the effect is as if the continuation tape with its title removed had been joined to its predecessor.
If ML/I finds a stop code in the middle of a tape and the user wishes to
ignore it, he simply types ON
.
The character set is the internal character set of the PDP-7 without the form feed character except that a single character, newline, is used in place of carriage return and line feed. On ASCII input, carriage returns are ignored and line feeds are taken as newlines. On ASCII output a newline is translated into a carriage return together with a line feed.
If the input is in Flexowriter code a number of conversions are performed to translate it to internal code; these generally follow a ‘best match’ philosophy. Backspaces are illegal, and runout is ignored. Note that lower case letters are translated to upper case before being fed to the processor and hence can be used interchangeably with their upper case equivalents.
In the case of Flexowriter output, similar reverse translations are performed, except that the output can contain no lower case letters.
Erase characters are ignored in all input and blank tape is ignored in ASCII input.
Error messages are typed on the teleprinter as they are detected, and
are thus interspersed with the output text if this is being typed. There
is no limit on the permissible number of messages. With reference to
Chapter 6, the number 2N
is 60 and the error character is the
question mark.
The message:
AT STOP CODE: number LINES, number CALLS
is printed each time a stop code is encountered.
There are two messages peculiar to this implementation. These are:
FREE STORAGE: number
which is printed after each occurrence of the FL
or FP
order, and which indicates the amount of storage not currently used by
the system, and:
READY FOR NEW PROCESS
which is printed at the start of each process.
All integers, including intermediate results, must be less than 2^{17} in absolute value. Overflow is not detected and its effect is undefined.
The initial environment normally contains ten permanent variables,
though this number may be larger if the FL
or FP
orders of
Section A.1.2 have been used.