ML/I User’s Manual — Appendix A

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.

ML/I User’s Manual — Appendix A

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.

A.1 Restrictions and Additions

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.

A.2 Operating Instructions

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.

A.2.1 Orders to set the I/O Options

The following orders are used to set the I/O options:

IFInput is in Titan Flexowriter code.
IAInput is in ASCII.
IBAs IF except that a blank row of tape is interpreted as a stop code rather than as an illegal character.
OFPunched output in Titan Flexowriter code is required.
OAPunched output in ASCII is required.
ONNo punched output is required.
TOutput is to be typed on the teleprinter.
SOutput 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.

A.2.2 Active Orders

The following orders cause ML/I to start to perform some action:

EType out all the names of all the constructions in the current environment, and then await further orders.
CTContinue processing. Source tape has a title.
CNContinue processing. Source tape has no title.
CKContinue 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:

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 CN. The operation of CK is independent of the setting of the input option. It is recommended that large sections of keyboard input are typed a little at a time.

FRTerminate current process and reset the environment to its state at the start of the current process. However, if any delimiter or keyword has been MCALTERed during the current process, the change remains in effect. The values of the permanent variables are indeterminate after an occurrence of FR.
FOAs FR except that the environment is reset to consist only of the operation macros and ten permanent variables.
FZTerminate current process and reset the environment as null.
FLTerminate current process and leave the environment in its current state.
FPAs 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.
PEquivalent 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.

A.2.3 Example

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:

  1. At start, load tape 1 and type IA, ON, S and CT.
  2. At stop code, load tape 2 and type E (if desired), T (if desired), IF, OA and CT.
  3. At stop code, load tape 3 and type 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.

A.2.4 Titles

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.2.5 Continuation tapes

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.

A.3 Character Set

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.

A.4 Error Messages

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:


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:


which is printed at the start of each process.

A.5 Integer Calculations

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.