7.1.1 Character set of Basic Input
7.1.2 Uses of Basic Input Routine
7.1.3 Language of Basic Input
7.1.4 Formats of Basic Input
184.108.40.206 Storable words
Checks X & Y
[compiler or use directive]
[pull up directive]
.2 [nest sequence]
.3 [call sequence]
220.127.116.11 Labels, equations
18.104.22.168 Composition of a Basic Input Language Program
.1 [unit of Basic Input]
7.1.5 The program
Basic Input Language is in characters. The characters used are
0 1 2 3 4 5 6 7 8 9
A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
= . ( ) * + - , /
VS (visible space)
Dummy (always ignored)
EL (end of line)
Several VS characters are equivalent to one VS
ER character is everywhere ignored.
| (vertical bar) means "ignore rest of this line".
When a sequence of Basic Input Language is on magnetic tape or drum, the characters are represented directly (internal representation); on paper tape or cards, the characters are represented by the print-out of the tape or cards.
For Basic Input Language programs on magnetic tape or drum, the code is the standard internal code (see 5.6.1).
Basic Input Routine reads the characters from each word, starting at the m.s. end.
Magnetic tape blocks must be less than 130 words long, with the length of each block as a binary integer in the l.s. 15 bits of the first word of the block (Word 0). The Basic Language characters begin in Word 1 unless the magnetic tape is a composite document (see 6.1).
For Basic Input Language programs on 7-track, the 7-track code is used (see 4.3.3). Lower case and upper case letters are regarded as equivalent. BS is allowed. Crossed parentheses mean "ignore this line" and all printing characters, except cross parentheses, to the right of vertical bar are ignored. Unassigned characters are ignored.
For Basic Input Language programs on cards, the standard card code (see 5.6.2) is used.
On paper tape, EL is considered to appear immediately after the last printing symbol on the line.
On cards the convention is that one card represents one line.
(i) Assemble and store a program on the drum ready to run, with appropriate parameters, if necessary.
(ii) Set up initial conditions for the program particularly to reserve core and drum store and peripheral devices and to ensure that the right documents are loaded.
The Basic Input Language to be read may be on 7-track, 5-track paper tape, cards, magnetic tape and the drum.
Two types are provided known as the L's and the V's. An identifier may be referred to in an "address-field"; when this field "comes to be stored" the current value of the identifier is used. An identifier is set either "by label" or "by equation". (See 22.214.171.124)
e.g. L65 or L1.1
An L is set to have a value; this is a 24-bit signed quantity.
Basic Input Routine makes a list of the L’s and their values. It stores them in blocks of 64 and an L may be written as Lb.p where b is the block and p the position number. e.g. L65 and L1.1 refer to the same L.
If an L is referred to, then Basic Input Routine appropriates 64 words of working space for the L’s within that block. There is a limit of 512 blocks.
An L may be in 4 states
(i) Never heard of
(ii) Referred to but not set
(iii) Partially set
(iv) Fully set (known)
References are forward references unless the L is in state (iv)
Unless an L is in state (i) or (ii), a setting of the L is an error. There are facilities for freeing an L and for nesting an L.
The value of a V is the 48-bit content of the corresponding register and hence the value of a V is always known. A V may be re-set.
The V’s are special purpose
quantities used by Basic Input Routine.
V1 (stored in A1). Its value is the drum transfer address.
V2 (stored in A2). Its value is the core transfer address.
When Basic Input Routine reads a "storable" word to be stored in one word then V1 and V2 are stepped on by 1 (see 126.96.36.199)
V0 has the value 0, but when set it causes V1 and V2 to be moved in step. For example, if the old value of V1 is 2 and V2 is A64, then V0=A74 (i.e. X) gives new value of V1=12 (i.e. X - V2 + V1 i.e. A74-A64+2) and V2=A74 (i.e. X).
V3 to V12 (stored in A3 to A12). These V's are not disturbed by Basic Input Routine in its purpose of storing program on the drum, unless it reads a setting of them, in which case the corresponding accumulator will contain the required value.
V13 is used for the checksum.
V62 gives the current input channel; if D0 is 1, then the input channel is the drum.
V65 is the datum point.
V66 contains 2 constants for use by Autocode (see 188.8.131.52)
If a V is referred to in an "address-field", then the current value is used.
184.108.40.206 Example settings (see 220.127.116.11)
L258) V5) core label settings; each identifier is given the value of the current core transfer address.
L51.3))V4)) drum label settings; each identifier is given the value of the current drum transfer address.
L1 = 63
L713 = A52+L3
V2 = V2+16
V11 = -4002
L3.2 = V5 the l.s. 24 bits of the value of the V are the new value of the L.
V3=L6 the new value of the V is numerically equal to the value of the L.
18.104.22.168 A nest and equivalent facility is provided to be used in conjunction with calls. This allows the current status of all L’s (and some V’s) to be remembered and the identifiers freed for use by, for example, a called document and then later restored (nest facility) and also for specified identifiers of the new set to become identified (equivalenced) during nesting with specified identifiers of the nested set.
A class is denoted by listing the members, separated by commas, as strings of class-expressions.
A class-expression is made up of class names and characters using the special symbols
( ) [ ] < > , * ? = %
22.214.171.124 A class name is any set of characters except * ? [ ] enclosed in square brackets. Parentheses are used for grouping and separation where required. The equal sign denotes a definition of a class name. Null is the empty class. % is used to terminate a definition.
The characters * and ? have special meanings defined as follows:-
(a) if m is any class - expression
m? = m, null % (i.e. one or nothing)
m* = m (m*), m % (several or at least one)
m*?= (m*)? % (several or one or nothing)
(b) if [m] is any class name
[m?] = [m]? %
[m*] = [m]* %
[m*?]= [m]*? %
Associated with each * there may be an expression like 3 < 6, or = 4 which indicates the range of the number of repetitions allowed.
Some class names, e.g. [left parenthesis], [asterisk], [directive], [sequence] are taken as understood without definition
[l] = A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z %
[d] = 0,1,2,3,4,5,6,7,8,9 %
[±] = +, - %
[n] = [d*] %
[peripheral name] = [asterisk][l][l][n] %
[style name] = [asterisk][l][l][l] %
A peripheral name is stored in a 15 bit field. Each letter is converted into a 5-bit quantity by removing the m.s. bit of the 6-bit character. The 2 truncated letters are packed into the m.s. 10 bits of the field. The number [n] is added into the field. E.g. *SR1 is stored as 20033
A style name, e.g. *SIG, is stored in a 15 bit field; the letters are truncated as described above and then stored.
(i) [element]=((V,L)*?)[n](.[n]*?), [m]%
where [m]=[peripheral name], (A?)[n], [style name]%
Examples are V4 and L20 and 2 and L1.36 and 100.3.. and *MT1 and A7.
The appearance of . (point) in an element causes the numerical part of the element already read to be shifted up 6 bits, e.g. L1.0 is an alternative way of writing L64.
V or L appearing in an element causes the value (see 126.96.36.199) of the corresponding identifier to be looked up when a terminator is found; thus forward references in an element are not allowed.
A string of V’s and L’s may appear, e.g. LV7 giving effectively indirect addressing of identifiers.
(ii) [gen element] = (L?)[element]%
If the first character is an L then forward references are allowed.
(i) [quantity]=[element]([comma]([±?][element]?), [±][element]*?) %
(ii) [field]=[quantity], ([quantity]([±], [comma])?)[gen element]([±] [gen element]*?)%
Examples are as for elements and V2-L1 and L1.2+60 and 5,,,,*CR1 and 10,10,10+16,1+32,2,10,1+32,12
+ (plus) and - (minus) have arithmetical meaning, e.g. 10+16 is equivalent to writing 26.
The appearance of comma in a quantity causes the elements already read to be shifted up 6 bits. Thus the storable line (see 188.8.131.52)
will cause the 4 elements to be packed into the top half of the word.
No forward reference may appear before a comma in a field.
(i) [component]=((VS?)([l], [d], .)*<9), ((VS?)[asterisk]*<3?)%
Examples are ABC.12 and **
The character VS is ignored when reading a component. A component is stored in a word with the characters right-justified.
The component * causes today’s date to be stored as that component. This is the date in characters as given by the 150/12 instruction (see 5.3.12), e.g. 31MAR64.
The component ** causes the time to be stored in character form, e.g. 11.05.59
(ii) [doc name]=[component]/[component](/([component],+)*<7?)%
The character + (plus) as a ‘component’ of a document name means that the document is composite (see 6.1). It cannot be the first or second component.
(iii) [doc request name]=[component]/[component](/([component], +, -)*<7?)%
In a request for a document at least the first 2 components must be specified (i.e. - (minus) cannot be the first or second component). - (minus) means “don’t care what this component is”. If the last specified ‘component’ is - (minus) then this means “don’t care what further components are”.
(iv) [source name]=[doc request name], +[quantity], [peripheral name]%
where +[quantity] is taken as a drum address.
The purpose of Basic Input Routine has already been stated (see 7.1.2). Those lines of a program which cause B.I.R. to store information on the drum for the running of the program are called storable words. Those lines of a program which direct B.I.R. to for example, reserve a reader for the program are called directives.
The formats of storable words are defined. When B.I.R. reads such a line, one word of information is stored and the transfer addresses both stepped on by one.
Any of these formats may be preceded by one or more core-labels or drum-labels or both as defined in 184.108.40.206.
There are 4 types of storable words.
The number is stored as a 48-bit signed integer. Overflow may occur if the integer is not in the range ±(247 -1).
If an L is written, then it is regarded as a 48-bit integer whose value is numerically equal to the value of the L.
The [n] must be in the range 0 ≤ n ≤ 1014-1
The fraction -1.0 or integer -247 can be stored by using the instruction format. 00 0 0 0
[adr]=VS[left parenthesis?][±?][field][right parenthesis?]
In the function [fun] if a mode (e.g. for a 141 instruction) is present, the Y-address will unless replaced be distributed over X- and Y-address fields.
The X, Y and S denote X- and Y- modification and signal bit respectively.
Addresses are in the order X-address, Y-address and Z-address. If fewer than three addresses are written the remaining address-fields are stored as zero. A left parenthesis denotes replacement; the right parenthesis, if present is always ignored. The Z-address may not be replaced. If the Z-address is not written the instruction is a 2-address unmodified instruction and the TX bit will be set unless Y and not X appeared in the function part.
04XY (L16) V3+L1.2-12 A4
140.1 0 *SR1
142S L3.8+20 24
14 L3 -5
[name]=NAM[l*?]VS([doc name], [doc request name])%
e.g. NAME A/NAME/A.B.1/*
The name is stored at the current value of the transfer addresses into 8 words. One component (see 220.127.116.11) is stored in a word. Not all 8 components and corresponding solidi need be specified. For a specified component, the corresponding word contains the characters, if less than 8, right-justified. Unless the last character on the line is - (minus), then for non-specified components the corresponding words will be clear. If the last character is - (minus) then all subsequent words will contain character - (minus) at the l.s. end. Thus in the second example the last 4 words of the 8 will all contain - (minus) and in the last example the last 3 words will be clear.
This has no effect except to terminate sequences (see 18.104.22.168)
[read directive]=REA[l*?]VS[source name], [component]%
This directive causes Basic Input Routine to
(i) relinquish the current input peripheral, unless it is the drum or a RESERVE THIS directive has been read; (i.e. if the number in the programmer’s peripheral name of the current input peripheral is 20 or above, Basic Input relinquishes it). If the current input peripheral is a tape deck and the document on it is composite, the tape is left in the load position.
(ii) continue reading from the specified source, if a [source name] is specified (see 7.1 3.6) or to load and enter the semi-built-in program if a [component] is specified.
(a) If [source name] is [doc
e.g. REA MY/PROGRAM/MK5/-
then Basic Input Routine finds the document and continues by reading it.
The device on which the document is loaded, is reserved for the job (the number in the programmers peripheral name being 20 or above). The document may be one on a composite magnetic tape document (see 6.1) in which case Basic Input will find the document on the composite one and read it.
(b) If [source name] is
e.g. REA +16
then the quantity is the drum address from which Basic Input will start reading.
(c) If [source name] is
e.g. REA *SR1
then Basic Input implements the reservation request for this peripheral, and then reads the document on it.
It is permitted to write for example
REA *0+V3 (0 is zero)
where 0+V3 is taken as a peripheral name.
(d) If a [component] is
specified then it is the name of a semi-built-in program (see
e.g. REA PRINT
Basic Input will load and enter Chapter 1 of this semi-built-in program.
([doc name], [doc request name], THIS)), ([asterisk]CORE, [asterisk]DRUM)VS[quantity])%
This directive is used for reserving peripherals core and drum store for the program.
The number in the programmer’s peripheral name should be below 20. The reservation request is remembered when read and is implemented when ENTER directive (see 22.214.171.124.12) or PROCESS directive (see 126.96.36.199.10) is read. The peripheral is reserved and a specific device allocated. For slow input devices and magnetic tape decks, READ [peripheral name] also causes the reservation request to be implemented. If at the time of implementation no device of the required type is free then the job is halted awaiting space.
(i)(a) Slow Input devices and magnetic tapes
e.g. RES *SR1 MY/DATA/-
The [doc request name] specifies the document to be found and the [peripheral name], the type of device required.
For documents on magnetic tape, Basic Input Routine will find a document on a composite document (see 6.1) - it will read the name block and position the tape ready to read the first block of information of the document.
USE OF THIS
e.g. RES *SR2 THIS
The current input peripheral is reserved for the job, with in general the number in the programmers’ peripheral name being 20 or above. This directive asks Basic Input to change its name to that specified (it will be of the same type and the number must be below 20). When subsequently Basic Input finishes reading from this peripheral, the peripheral will still be reserved for the job; when Basic Input reads certain directives (e.g. READ, ENTER, END) it relinquishes the current input peripheral if the number in the programmer peripheral name is 20 or above.
(i)(b) Slow Output Devices
e.g. RES *LP1 MY/RESULTS/*/**
The [doc name] specifies the document name which is to be output on the allocated device.
(ii) Core Store
e.g. RES *CORE 200
The [quantity] specifies that at least this number of words of core are to be reserved. The number of words reserved is of the form 64n-16.
(ii)(a) Decreasing core reservations
In this case Basic Input will remember the request and implement it on reading ENTER (see 188.8.131.52.12) and the datum point remains unchanged.
(ii)(b) Increasing core reservations
In this case, the directive must be followed by a separator (see 184.108.40.206 and 220.127.116.11). This request is implemented on reading the directive and the datum point may be changed and so generally the request should appear before any storable words. Basic makes use of the extra core.
If the amount requested is not available, the job is halted awaiting space; the message being NO CORE.
Note that core may be reserved with JOB directive (see 5.7.2) in which case, RES *CORE directive need not be used. Only one request for core is advisable.
(iii) Drum Store
e.g. RES *DRUM 1000
The quantity specifies a number of words of drum; it is rounded up to the next multiple of 64, unless it is a multiple of 64 already.
The directive is implemented on reading it. When the program is entered, then the amount of drum reserved for the program is the greater of
the amount requested with the last directive read (this is 64 if no RES *DRUM has been read) (see 18.104.22.168.16);
or V1 (rounded to a multiple of 64).
The job may be halted awaiting space, if the drum required is not available, the message being NO DRUM.
[new directive]=NEW(VS[n]?)VS[asterisk]MT[n]VS(((P?)[n].[n].[n](P?)(L?)VS[doc name]),0)%
E.G. NEW *MT1 P1.8.1965 B/C/*/**
If the peripheral (*MT1 in the example) has not already been reserved, then it is reserved, a scratch tape (see 5.3.33 b(ii)) being allocated. If (VS[n]?) is present then this integer specifies the nominal length in hundreds of feet of the scratch tape required, otherwise any lengthed tape is requested. If the peripheral has already been reserved then no reservation takes place.
The other information given with the directive gives new Block 0 information.
The first (P?) gives the setting of the write permit bit (D0) and the second (P?) gives the date control bit (D24). P present means set the bit to 1; P not present means set the bit to 0.
[n].[n].[n] specifies the Date ( in D1 to D20) required; the first [n] specifying the day, the second the month and the third the year. If the third [n] is less than 100 then 1900 is added to it and stored as the year, so that 65 is stored as 1965.
[doc name] specifies the new document name required.
(L?) - this will be used only on installations with high density decks, when a high job needs to write low density tapes. (L present causes D25 of the first word for the 150 instruction to be 1, otherwise 0)
In the case of NEW directive Basic Input Routine writes this Block 0 information onto the tape with a 150/41 instruction.
The directive NEW *MT1 0 (this is zero) gives new Block 0 information such that the tape is considered a scratch tape.
[compiler or use directive]=(USE, COM)[l*?]VS([source name], [component])%
This directive differs from the READ directive (see 22.214.171.124.2) only in that the current input peripheral is not relinquished and that on reading END Basic returns.
If a [component] is specified then Chapter 1 of the named semi-built-in program is loaded and entered.
e.g. USE PUNCH
If [source name] is specified, then Basic Input Routine continues by reading from the specified source. If END directive (see 126.96.36.199.18) is read on the requested document or drum or on the document on the specified peripheral, then Basic Input Routine returns to read from the peripheral on which it read the USE directive. (Note that READ does not cause this to happen).
While reading the requested document etc, Basic stores the name of the peripheral to which to return in A61 (i.e. if V61 is positive, it is the programmers peripheral name; if negative the modifier is the drum address.)
[report]=REP[l*?]VS[n]VS([peripheral name]VS[doc name]), ([n]VS[doc name])?)
e.g. REP 2 *SP1 MY/MONIT/*/**
While Basic Input Routine is reading the program it may output various reports. In general a monitoring peripheral is necessary for these reports, so on reading this directive Basic Input will reserve (if not already reserved) a slow output peripheral with the specified programmer’s peripheral name and on the allocated device will output the specified document name. This output peripheral is set as the monitoring peripheral for the program and the report level (the first [n]) which will be either 0,1 ,2, or 3 will be set.
e.g. REP 0 5 MY/OUTPUT/*
Instead of a programmer’s peripheral name an integer (e.g. 5) may be written which means, get the first free slow output device and reserve it with appropriate programmer’s peripheral name, the number being that given. (In the example if the first free slow output device were a 5-track punch, then it would be reserved for the program as *FP5 and the specified document name would be output on this device set as the monitoring peripheral). If the job already had a slow output peripheral reserved with the specified number (5 in this case,) then another peripheral would not be reserved but this peripheral would be set as the monitoring peripheral and the document name would be output.
e.g. REP 0
This makes the Flexowriter the monitoring peripheral. On the Flexowriter report level 0 is allowed only.
If errors (see 7.1.6) occur then only one is given. If ENTER directive is read then only one unset, if any, identifier is given.
If errors occur then up to 15 may be given. If ENTER directive is read, then all, if any, unset identifiers are given and a message is printed on the monitoring peripheral just before entering the program, giving the enter number, the time and the date.
Level 1 reports are given. If ENTER directive is read, then the values of all the L identifiers set are also given; this printout also includes the block and position form of the L number and is in a form suitable for re-input.
Level 2 reports are given. This level causes the old values of identifiers to be printed whenever they are cleared with a C directive.
If no REPORT directive is read then the Flexowriter is the monitoring peripheral, and report level 0 reports are given.
This causes Basic Input to stop reading and abolish the job. The number, if written will be printed (see 5.3.11)
e.g. F 12 24 L491
This directive is used to adjust the word in drum location whose address is V1-1. The first number (a say) and the second number (b say) specify a field in this word. (Bits in a word are D0 to D47). The field is Dj to Dk where
k = 47-b
and j = k-a+1
The value of the field expression which follows is added into this specified field (modulo the size of the field). Any number of F directives may follow a storable word.
In the above example the value of L491 is added into D12 to D23 of the word in drum location V1-1 (this usually the previous storable word).
See NEST sequence 188.8.131.52.2. This causes Basic Input to lose the current set of L’s and restore the nested set.
CALL sequences (see 184.108.40.206.3) are remembered until PROCESS is read, when they are implemented. Basic Input Routine reads the “called” documents in the order in which it finds them. (Where a document is to be stored may be specified with the CALL sequence (see 220.127.116.11.3)). The “end” of a document is the END directive (see 18.104.22.168.18). After reading the last “called” document Basic Input Routine returns to read from the peripheral on which it read PROCESS.
The peripherals on which the “called” documents are loaded are reserved for the job with the number being 20 or above.
This directive will find a document on a composite magnetic tape document.
This directive insists upon reservation requests for peripherals (see 22.214.171.124.3) being implemented before returning to read from the current source.
X L1 4
This directive checks that the two quantities are equal. If so, the next Unit of Basic Input (see 126.96.36.199.1) is skipped, otherwise not.
e.g. Y 10 V3
This directive checks that the two quantities are unequal. If so the next Unit of Basic Input (see 188.8.131.52.1) is skipped, otherwise not.
e.g. ENTER 1
(i) relinquishes the current input peripheral if the number in the programmer’s peripheral name is 20 or above, (see RES THIS directive see 184.108.40.206.3). If the document read is one on a composite document then the tape is left loaded.
(ii) implements the reservation requests for peripherals, the order of implementation is RES, NEW, SCR, and core store, if being decreased (see 220.127.116.11.3).
(iii) implements the monitoring conditions (see 18.104.22.168.21).
(iv) sets the timer to number of minutes specified with the TIME directive (see 22.214.171.124.17). If this directive has not been read, by default the timer is set to 1 minute.
(v) Depending on the report level, (see 126.96.36.199.6) information about the L identifiers is output. If the report level is >0 then a message on the monitoring peripheral will output to indicate when (the time and date is given) the program was entered.
e.g. ENTERED 11.05.57 1FEB65
(vi) looks at V64. If it is zero or positive Basic Input will give up its drum working space. If it is negative the lists of L’s and their settings will be preserved on the drum. Unless altered by the programmer, V64 is zero or positive; this number indicates what type of print barrel this installation has (see section 14).
(vii) The core store from A66 onwards is cleared, if V64 is not negative then the program is entered. The quantity represents an integer (n say) which is the entry-point of the program. Drum locations whose address are 2n and 2n+1 should contain the chapter change pair. (i.e. a 150/50 instruction (see 5.3.50)).
A suitable chapter change pair may be written, for example as
150 L1 L2 50
00S L3 L4 0
if it is known that the drum address L3 is less than 215.
e.g. J L16 L29 L2.1 L41
This causes Basic Input to stop reading and enter an interlude (see 188.8.131.52). The first quantity is the drum address, the second is the core store address, the third is the number of words and the fourth is the jump (entry) address for a chapter changing 150/50 pair.
The interlude is brought down and obeyed. The last instruction of the interlude is usually a 150/51 instruction which calls in chapter of Basic Input to continue reading more program in Basic Input Language.
e.g. S 1
The [element] specifies a block of L’s. The 64 L’s of this block are freed (unset). No checks are made. These L’s can then be reset. In the example, L64 to L127 inclusive will be freed. (i.e. these L’s will be in state (i) see 184.108.40.206.1)
This causes Basic Input to stop reading and call in Binary and Map Input (see 7.3). This directive causes drum to be reserved - it is treated as though a RES *DRU directive had been read (see 220.127.116.11.3(iii)).
e.g. TIME 25
The [n] specifies the number of minutes the timer is to be set just before the program is entered (see 18.104.22.168.1 2). Number of minutes specified must be less than 547.
On reading END on a document which it has been asked to read by USE, Basic Input returns to read from the peripheral on which it read the USE directive; this is stored in A61.
On reading END on a document which it has been asked to read by PROCESS, Basic Input returns to implement any other call sequences and finally returns to read from the peripheral on which it read the PROCESS directive.
As Basic Input finishes reading one of these documents it relinquishes the peripheral on which the document is loaded (if the number in the programmers’ peripheral name is 20 or above). If the document read is on a composite document (see 6.1) then when relinquishing the magnetic tape Basic Input leaves the tape loaded.
END at the highest level causes the job to be suspended awaiting rerun.
e.g. Q 2
The [element] specifies an L (in the example L2). Basic Input Routine skips the next Unit of Basic Input (see 22.214.171.124.1) if the L
(a) is set and its value known; i.e. if the L is in state (iv) see 126.96.36.199.1
or (b) has not been mentioned (at least not since it was last freed); i.e. if the L is in state (i).
Thus if the L is in state (ii) or (iii) this directive does not skip.
e.g. C 5 10
This frees (unsets) all the L’s between the L specified by the first element and that specified by the second element inclusive. In the example L5 to L10 are freed. It also checks, for each L that there are no forward references to it or in its setting. If this check fails there will be an error indication (see 7.1.6). (i.e. it is an error to clear an L in state (ii) or (iii) see 188.8.131.52.1) The freed L’s are then in state (i).
e.g. MON *SIG 2
e.g. SIG 30
The quantity specifies a drum address. The sign bit of the word in this drum register will be made 0.
e.g. UNS 123
The quantity specifies a drum address. The sign bit of the word in the drum register will be made 1.
e.g. SCR *MT1 F12.2.65 X/Y/2/*/**
This directive differs from the NEW directive (see 184.108.40.206.4) only in that Basic Input Routine writes the new Block 0 information with a 150/44 instruction.
These are terminated by the NORMAL directive (see 220.127.116.11.1)
[nest sequence]=NES[l*?](EL L[element]VS L[element]*?)%
This causes the current status of all the L’s to be remembered (nested) and these L’s to be freed forming the new set, and are regarded as being in state (i) (see 18.104.22.168.1).
Equivalences between identifiers of the 2 sets may be specified; the first L specified is one of the current set and the second L specified is one of the new set.
The nested set is remembered until a PULLUP directive (see 22.214.171.124.9) is read.
(VS+[quantity]VS[quantity]?)(EL L[element]VS L[element]*?)%
e.g. CALL A/DOCU/- +900 A64
Call sequences are remembered until PROCESS directive (see 126.96.36.199.1) is read.
[doc request name] specifies the “called” document which Basic is to find and read (a document on a composite magnetic tape document will be found).
With the CALL sequence, it is possible to specify the transfer addresses ( +[quantity] specifies V1 and [quantity] specifies V2) to be used when reading this “called” document.
Succeeding lines specify pairs of L’s which are to be equivalenced as in the manner of a NEST sequence (see 188.8.131.52.2) while the document is being read.
When the CALL sequence is implemented (i.e. PROCESS has been read.) Basic finds the document. If transfer addresses have been specified with the CALL sequence, Basic Stores the current (old) values of the transfer addresses, it then uses the specified transfer addresses for reading this document, and when it finishes reading this document (i.e. on reading END) it then restores the values of the transfer addresses to their former (old) values.
Basic having found the document, nests the L identifiers (i.e. the current status of all L’s are remembered and then freed). L identifiers of the two sets may be identified; the first L being one of the current set and the second L being one of the new set. When the document has been read (i.e. on reading END) the nested set of L identifiers are restored.
[core label] = (G,L,V)[element][right parenthesis]%
This causes the specified identifier to be set; its value equal to the core transfer address (V2). If G is written, the corresponding L is specified but the label is taken as an optional setting (see 184.108.40.206.5)
[drum label]=[core label][right parenthesis]%
This causes the specified identifier to be set, its value equal to the drum transfer address (V1). If G is written the corresponding L is specified but the label is taken as an optional setting.
[setting] = L[element](VS?)[equals sign](VS?)[+?][field],
Each equation causes the identifier specified on the left-hand side to be set, its value equal to the quantity or field specified on the right-hand side.
If an L is specified, forward references in its setting are allowed. If the L specified is already set, a new setting will be treated as an error.
If a V is specified then this setting is its new value. No forward references are allowed in its setting.
[max setting] = K[element](VS?)[equals
For K, an L is specified by the element. For W, a V is specified by the element. The equation sets the specified identifier equal to the largest element in the field or quantity specified or to zero if this is negative. In the above example L27 is set to have the value of the largest of 98, V7 or V8. V6 is set to have the value of the largest of V6, V7 or 1024.
[optional equation]=G[element](VS?)[equals sign](VS?)[±?][field]%
If the L specified by the element (L99 in the example) is already set then this optional equation is ignored. If the L is not already set then this equation is taken as an ordinary setting of the L.
[unit of basic input]=([any character except left parenthesis and EL] [any character except EL]*?)EL,[left parenthesis]EL[unit of basic input*?][right parenthesis]EL%
The check directives (see 220.127.116.11.11), and q-directive (see 18.104.22.168.19) if the check is satisfied skip one line unless that line is a left parenthesis in which case they skip further lines until a matching right parenthesis is found.
e.g. X L4 1
e.g. X V10 0
RES *LP2 A/DOC
([sequence][comment]*?),[directive or setting or equation]
[comment]=(VS?)(|[any character except EL*?]?)EL%
e.g. RES *DRUM 2000
150 L0 L1 50
00S L3 L2 0
L0)L3))14 L1.0 20 | set counter
75 L1.1 0 | jump
L1.1) 00XY A100 L2.0 A3
Basic Input reads items until ENTER, J, B, ABOLISH or END (at highest level) is read.
This program consists of several chapters all of which read Basic Input Language formats.
When JOB directive (see 5.7.2) is read by OMP, OMP loads a chapter of Basic Input into the job’s reserved core-store and enters this chapter which continues by reading from the same source (on which JOB was read.). This chapter tries to get 128 more words of core if 1008 have been allocated, and then loads Chapter 1 to continue reading.
RERUN directive calls in Chapter 1.
Chapters of Basic Input are called in by obeying 150/51 with Y=A0 instruction (see 5.3.51). X=2n causes a chapter to be loaded whereas X=2n-1 causes the same chapter to be loaded and entered. X=0 is not allowed.
When this chapter is called in:
A65 contains the datum point of the job.
A66 is used by Basic Input to store constants for use by autocodes.
These constants are explained as follows.
Call [A66]u PROGLIM. Then PROGLIM is the address of the core-store register in Basic’s core working space whose contents represent as an integer the amount of drum reserved for the program being stored. This is the address of the drum register of the start of Basic’s drum working space. This number is initially taken from A55 and A55 cleared.
Call [A66]m BINDEX. Then BINDEX is the address of a core store register. This register is the start of Basic’s index to its core working space. Each word of the index represents a buffer of 64 words of core-store; each buffer containing some words from Basic’s drum working space. The format of the index words is
00S drum address core address 0
where the drum addresses are relative to [PROGLIM]. TY=1 means that the block is to be written to the drum (it has been changed). RX=1 means that the block is “locked down” (it must not be written to the drum).
If [A64]<0 then Basic does not give up its working space and does not clear the core-store A66 onwards.
The entry-point to Chapter 1 is A67.
This chapter sets V1=0 and V2=A64.
Chapter 1 then:
(i) assumes that the input source is in A62 (if the sign bit is 1, then the modifier half is taken as the drum address from which to read.)
(ii) assumes that the number of words of core available for Basic’s use is in A56 (it must be at least 1008 otherwise reservation violation action will occur.)
(iii) uses the contents of A55 to get an initial setting of [PROGLIM] (i.e. to find where Basic’s own drum working space begins - it will be at a multiple of 64). Drum is reserved in units of 512 words if possible, otherwise in units of 64. If Basic asks for more drum and none is available then the job is halted NO DRUM. (If the request is for more than would be available if there were no other programs in the machine then Basic abolishes 10.)
Unless “asked to” do so, Basic does not alter the contents of core-store registers, A3 to A12, A56, A62 and AV56 upwards nor of the drum registers D0 to D([PROGLIM]-1)
All other registers may be altered by Basic Input during input.
Chapter 1 sets monitoring on *PFN (Style 7) and *SIG (Style 0)
An interlude is brought down from the drum and entered by a J directive (see 22.214.171.124.13).
An interlude is given one minute. There is no check that all L’s so far referred to have been set. If any RESERVE or NEW or SCRATCH directives for reserving peripherals have been written the interlude must be preceded by a PROCESS directive (see 126.96.36.199.10) to implement these requests. Monitoring on *PFN (Style 7) and *SIG (Style 0) will be set; other monitoring styles are default. Restarts are set for the current input source (see 7.1.7)
When an interlude is finished it is usual to “return to” a chapter of Basic Input which then continues reading in more program in Basic Input Language (i.e. the last instruction obeyed in the interlude will probably be a 150/51 instruction with Y=A0).
What an interlude must preserve and what information will be lost depends upon which chapter of Basic Input is “returned to”.
i.e. 150 1 A0 51
This instruction causes chapter 1 of Basic Input to be loaded and entered. (see 188.8.131.52)
The interlude must preserve (i.e.
A56 - the amount of core store available for Basic Input’s use.
A62 - the current input source.
A55 must be reset to contain the amount of drum required by the program.
Lost will be
(i) settings of all L’s and the V’s except V3 to V12.
(ii) all memory of forward references not filled in.
(iii) contents of the input buffer or buffers.
On 7-track this consists of the line following the J directive. On 5-track this consists of up to 16 characters after the CR LF terminating the J directive.
On cards this consists of the contents of the card following the card containing the J directive.
On magnetic tape this consists of the rest of the block containing the J-directive.
On drum this consists of the rest of the word containing the NL terminating the J directive.
(iv) The report level unless 0.
As this chapter switches on monitoring on *PFN (style 7) and *SIG (style 0) the interlude may switch these off if required.
i.e. 150 3 A0 51
This instruction causes Chapter 3 of Basic Input to be loaded and entered.
The interlude must preserve in the
A44 to A65 and A500 to AV56 (except A62 - see below)
The interlude must preserve on the drum D [PROGLIM] upwards. (i.e. Basic’s drum working space).
Lost will be the contents of the input buffer or buffers as for Chapter 1
A change of input source (i.e. in A62) will be noted and Basic Input will continue reading from the new source.
As this chapter switches on monitoring on *PFN (style 7) and *SIG (style 0) the interlude may switch these off, if required.
i.e. 150 19 A0 51
This instruction causes chapter 19 of Basic Input to be loaded and entered.
The interlude must preserve in the core A44 to A250 and A500 up to AV56.
The interlude must preserve on the drum D[PROGLIM] upwards.
The contents of the input buffer or buffers will not be lost.
This chapter does not switch on monitoring on *PFN (style 7) and *SIG (style 0) and so the interlude must not switch these off.
The get-next-character (GNC) routines of Basic Input provide a usable self-contained system for input from 7- or 5- track paper tape, cards, drum or magnetic tape.
150 17 A0 51
causes Chapter 17 of Basic Input to be loaded into the core and entered to set up the GNC. Before this instruction is obeyed the name of the input source must be put into A62 and the link address into A17. The 150/51 when obeyed causes a GNC routine appropriate to that type of device to be set up and then return to the link address.
The registers used by the GNC’s
are A13 for checksum and
A14 to A17, A44, A48, A51 to A53, A62, A66 to A250.
All of these (except A14 to A17) must be preserved between entries to the GNC.
To set up, for example, a GNC
for a 7-track reader (*SR1 say)
the sequence of instructions might be
| name of Input source
14 A17 L0 | set link
150 17 A0 51 | set up GNC
L0) an instruction | return here
To use the GNC, the instruction
86 (A53) A17
is obeyed. This enters the GNC which produces the next correct character from that source at the l.s. end of A44 in standard internal code (see 5.6.1) and returns to the instruction following the 86 instruction which caused entry.
Comments (vertical bar character and those following until NL) and ER characters are ignored within the GNC. Only one SP character will be produced for a string SP characters (i.e. VS). Spaces at the beginning and end of the line will not be produced. After the entry to chapter 17 one or two NL characters may be produced which have no counterpart on the input medium.
The code accepted is the Flexowriter code (see 4.3.3). Lower and upper case letters are regarded as equivalent. Redundant shift characters are ignored, (as are the control characters, PN, PF, PT, ST.) TB is a VS character (tab positions are 16 SP characters apart). Characters are converted into the standard internal code (see 5.6.1). Unassigned characters are ignored.
A line is considered to have a limit of 118 printing positions.
Overprinting (e.g. use of BS character) at a printing position is interpreted thus:-
a line with crossed parentheses ╫ is completely ignored.
C (a character) BS ER is equivalent to ER
ER BS C is equivalent to ER
SP BS C is equivalent to C
C BS SP is equivalent to C
C BS C (the same character) is equivalent to C
C1 BS C2(different characters) gives error character (character-value 14) except ╫ (see above).
When the 118th position is reached, then further characters are treated as overprinting in this position.
BS character at the beginning of the line “leaves you” at the beginning of the line.
The code accepted is given in 4.3.3. Characters are converted into the internal code (see 5.6.4). Redundant shift characters on a line of information (i.e. with other printing characters, SP is a printing character, ER is not) “don’t get through”, but if the job has a monitoring peripheral, then a message is printed giving error 26 and the line number, but this is not treated as an error.
≥ gives error character (character-value 14)
→ is treated as vertical bar.
CR not followed by LF gives error character. ER is not allowed between CR and LF. If since the last LF only non-printing characters are present then LF is allowed.
The code accepted is given in 5.6.2. One card is one line.
Magnetic Tape and Drum
(a) J (except if return is to Chapter 19)
(b) USE (or COMPILER)
(d) RES *CORE (if reservations are increased)
7-track paper tape - Leave 1 blank line
5-track paper tape - At least 13 FS followed by CR LF
Cards - 1 Blank card
Magnetic Tape - Start a new block
Drum - Start a new word
184.108.40.206.1 Before reading each line of input Basic asks for 1 minute.
220.127.116.11 If an error is encountered e.g. an impermissible combination of characters, then Basic outputs an error report (see 18.104.22.168) on the job’s monitoring peripheral (normally this will have been specified with the REPORT directive (see 22.214.171.124.6)), or on the Flexowriter if the job has no monitoring peripheral.
126.96.36.199 If an error has been encountered and the job has no monitoring peripheral, then the job is abolished 1. If the job has a monitoring peripheral, then the job is not abolished but Basic continues reading the program keeping a count of errors encountered. If 15 of these errors are obtained then the job is abolished.
Note that if a serious error (see 188.8.131.52) is encountered the job will be abolished before this count is 15.
The first line is
ERROR n1 ON g V1 n2 V2 n3
Where n1 is the error number (see 184.108.40.206)
n2 is the current drum transfer address
n3 is the current core transfer address
g is the geographical name of the current input device;
if the current source is the drum then the drum source address is given.
The second line contains characters of the line containing the error; the first character on this second line is the incorrect character and then follows the rest of the line. Not all error numbers cause printing of a second line e.g. Error 26, and in the case of Error 16, the second line is the reset L.
If a RES *DRUM directive or extra drum needed for working space asks for more drum than would be available if there were no other programs in the machine, Basic abolishes 10.
1. Error in a J-directive
2. Wrong character at beginning or end of line
3. Error in X or Y directive
4. Error in F-directive
5. Error in an S or C directive
6. Error in right-hand side of a setting
7. Too many datum points in a field
8. Error in left-hand side of a setting
9. Forward reference in right-hand of V setting
10. Forward reference in quantity
12. Comma after a forward reference
13. Z replaced
14. Wrong character in function part, or wrong character before an address-field (e.g. no space character between fields)
15. Last digit of function 8 or 9
16. Reset label, the second line is the reset label. This error does not count as one towards the 15. Unset label is not an error.
17. Error in Q-directive
18. Overflow in some fields
19. Error in monitor directive
20. Error in document name
21. Error in TIME directive
22. Error in REPORT directive
23. Error in RES NEW or SCR directives
24. Error in READ or USE directives
25. Error in ENTER directive
26. Error in conventions of input medium (e.g. CR not followed by LF 5-track, or reading from drum outside reservations)
27. Error in B-directive
28. V1 not sensible
29. Error in element
30. Because of errors found, program cannot be entered.
31. Clearing unset label, Label is cleared - this error does not count as one towards the 15.
32. Error in GNC, e.g. asking Basic to read from device of incorrect type.
33. Error in CALL or NEST sequences, e.g. duplicated right-hand side equivalences
34. Error in SIG or UNS directives
35. Too many blocks of L’s and forward references. (Limit is 32767)
36. Impossible document name
37. Too little core store for L’s index, give Basic more core
38. Too many forward references in right-hand side of L setting. (Limit is 31)
When a parity failure occurs on the 7 track reader from which Basic Input Routine is reading then one of the following occur.
220.127.116.11.1 If Basic is reading anything other than binary and map format or a semi-built-in program then a message on the Flexowriter requests the operator to carry out a specified restart procedure (See 6.4.1).
18.104.22.168.2 If Basic is reading binary and map format following a B Directive (see 22.214.171.124.16) then the action is to abolish the job.
126.96.36.199.3 If Basic is reading a semi-built-in program and storing it on the drum, then the action is to ask the operator to re-load the semi-built-in program. The message CHECKSUM FAIL in case of 7-track or NONSTAND TAPE in case of magnetic tape may be output.
When a failure in reading a card occurs then one of the following occur.
Illegal character is given character-value 14, (see 5.6.1) which will produce an error (see 7.1.6) when the line is processed, though if to the right of vertical bar character, the error character is ignored and so illegal punching in comments is permitted.
The action is to print the failure message and the standard restart message (see 6.4.2).
If a reading failure occurs on a composite document then the message NON-STANDARD COMP.TAPE is output.