Section 4.1

Peripheral Transfers

A peripheral transfer is initiated by a 140/142 pair (or 141/142 pair if the drum) see 3.14, e.g.

  140.1     0     *SR1
  142     A1000    64

The 140 instruction specifies the mode, M (0 to 31), and the peripheral reserved for the job.  The 142 instruction may specify a core store region.

For each type of device only some modes have been assigned and unassigned modes will cause illegal instructions action.  If the specified peripheral is not reserved for the job (or is floating) then peripheral violation action occurs.  If a region of store is involved it must be within reservations.  For those 140/142 pairs which involved a transfer, if Y of the 142 instruction is zero or greater than 32767 then impermissible operand action occurs.  If an output transfer is attempted with OVR set then writing with overflow set action occurs.

4.1.0

For all devices M = 13 interrogates the specified device.  One word of information (see 5.5) is written into the register specified in the X-address of the 142 instruction.  Its Y-address is ignored.

Except for the drum, M = 16 causes the device to be disengaged.  The X- and Y-addresses of 142 instruction are ignored.  If this mode is used for magnetic tape by an object program illegal instruction action occurs.

 

4.1.1  Paper Tape Devices.

Readers

Programmers' peripheral name for a 7-track reader is *SRn, for a 5-track reader is *FRn.  n is a number 0 to 31

X-address of 142 instruction specifies the core store starting address.  Its Y-address specifies a number of characters.

The characters are read and stored 8 to a word starting at the m.s. end of the first word of the specified core store region.  The rest of the word containing the last stored character is clear.  Each character read is stored as a 6-bit internal character.

Assigned Modes

M = 1.  Read and store 7-track, up to and including NL or at most Y characters,

M = 2.  Read and store 7-track, Y characters.

M = 8.  Read and store 5-track, Y characters.

M = 13 and M = 16.

Punches

Programmers' peripheral name for a 7-track punch is *SPn, for a 5-track punch is *FPn.

X-address of 142 instruction specifies the core store starting address.  Its Y-address specifies a number of characters.

Starting at the m.s. end of the first word of the specified core store region internal characters are output.

Assigned modes

M = 21Punch 7-track, up to and including NL or at most Y characters.

M = 21Punch 7-track, Y characters.  [This should be M = 22. Ed]

M = 28Punch 5-track, Y characters.

M = 13 and M = 16.

 

4.1.2  Card Devices

Readers (see also 4.4).

Programmers' peripheral name for 80 columns is *CRn, for 65 columns is *VRn.

A 140/142 pair causes at least one card to be read.  X-address of 142 instruction specifies the core starting address.  Its Y-address specifies the number of words of information to be stored.  Information from 4 columns is stored in a word.

Assigned Modes

M = 1.     Read, IBM code.

M = 2.     Read, ICT code.

M = 4.     Read, BULL.  (Not on Orion 2)

M = 7.     Read, IBM and binary.

M = 8.     Read, ICT and binary.

M = 11.   Read, BULL and binary.  (Not on Orion 2)

M = 14.   Read, binary.

M = 19.   Read, binary and interstage.  On Orion 2 the interstage button must be on for use by the extracode.

M=13  and M=16.

Punches (see also 4.5)

Programmers' peripheral name for 80 column card punch is *CPn.

X-address of 142 instruction specifies the core starting address, Its Y-address specifies the number of words to be transferred to the buffer store.

Assigned modes

M = 21.  Fill data buffer, and punch one card (coded).

M = 22.  Fill data and code buffers, and punch one card (binary).  On Orion 2 the code buffer is in fact untouched.

M = 26.  Fill code buffer.

M = 13 and M =16.

 

4.1.3  Line Printers

Programmers' peripheral name is *LPn.

X-address of 142 instruction specifies the core starting address.  Its Y-address specifies the number of words to be transferred to the buffer store.

Assigned modes

M = 21Fill data buffer and print a line with full char set.

M = 22Fill data buffer and print a line with part char set.

M = 26 Fill code buffer.

M = 13 and M = 16.

4.1.4  Magnetic Tape (see 4.7)

Programmers' peripheral name is *MTn.  For those modes involving a transfer, the X-address of the 142 instruction is the core starting address.  Its Y-address specifies a number of words.

Reading

A 140/142 pair causes the next block to be read.  At most Y words are stored.  If the length of the block is less than or equal to Y then all block is stored.  If the length of the block is greater than Y words then the first Y words read are stored;  the rest of the block is read but not stored.

Assigned modes

M = 1.  Read forwards

The next block looking forwards on the tape is read.  The first word read (i.e. the first word of the block) is stored in the first word of the specified core store region.  The second word read is stored in the second word of the region and so on until the block or at most Y words are stored.

M = 2.  Read backwards

The next block looking backwards on the tape is read.  The first word read (i.e. the last word of the block) is stored in the last word of the specified core store region.  The second word read (i.e. the next to the last word of the block) is stored in the next to last word of the region and so on until the block or at most Y words are stored.

Writing

A 140/142 pair causes a block to be written on to the tape.  The length of the block is the length of the specified core store region (i.e. Y words long).  Writing is always forwards on to the tape and must be regarded as destroying everything on the tape beyond the point at which the writing is done.  It is not permitted to write after reading backwards;  it is permitted to write after reading forwards.

Assigned modes

M = 21.  Leave long gap, write one block Y words in length

M = 22.  Leave short gap, write one block Y words in length.

Other modes

M = 13.  Interrogate

M = 14.  Rewind

The X- and Y- addresses of the 142 instruction are ignored.  When obeyed in an object program it causes an entry into OMP which then rewinds and leaves the tape repositioned ready to read Block 1 forwards (i.e. in the load position the program having continued.)

M = 16.  Disengage

If obeyed in an object program it causes illegal instruction action.

M = 28.  Erase

This erases information on the tape (Y words)

 

4.1.5  Drum  (see 3.14)

The Y-address of 141 instruction is the relative drum starting address, X-address of 142 instruction specifies core starting address.  Its Y-address specifies a number of words.

Assigned modes

M = 1.    Read Y words from the drum to the core store

M = 2.    Write Y words to the drum from the core store

M = 13.  Interrogate.

 

4.1.6  Hough-Powell Device

Programmers' peripheral name is *HPn.  Y-address of 142 specifies a number of words.  This is reserved as a slow output device using 150/30.

Assigned modes

M = 1.    Input Y words or up to End of Frame interrupt

M = 2.    Input Y words suppressing End of Frame interrupt

M = 13.  Interrogate

M = 16.  Disengage

M = 22.  Output Y words

 

4.1.7  IBM Tape Decks

Programmers' peripheral name is *ITn  Y-address of 142 specifies a number of words.  This is reserved as a slow input device using 150/33 etc.

Assigned modes

M = 1.    Read forwards

M = 2.    Backspace

M = 13.  Interrogate

M = 14.  Rewind

M = 16.  Rewind and Disengage

M = 21.  Write binary block

M = 22.  Write binary coded decimal block

M = 28.  Erase

4.1.8  Electrodata Unit

This is treated as 3 devices for each M = 13 interrogates and M = 16 disengages the unit.  Y-address of 142 specifies a number of characters.  This is reserved as a slow output device using 150/30.   All 3 have to be reserved.

Programmers' peripheral name       Operation            Mode

       *EAn                                        Read address            8

       *ECn                                        Conditioning            22

       *EDn                                          Read data               2

 

4.1.9  Ericsson Keyboard

Programmers' peripheral name is *EKn.  Y-address of 142 specifies a number of characters.  This is reserved as a slow input device.

Assigned modes

M = 1.  Read up to NL or at most Y characters.

M = 2.  Read Y characters

M = 13 and M = 16

Flexowriter Type C

Programmers' peripheral name is *FCn  Y-address of 142 specifies characters.  This is reserved as a slow output device.

Assigned Modes

M = 21.  Print up to NL at most Y characters.

M = 22.  Print Y characters

M = 13 and M = 16.

 

4.1.10  Orion 2/1900 Direct Data Link

This is treated as two independent devices.  For either, M=13 interrogates and M=16 is illegal in all modes of operation.  M=16 causes illegal instruction action if obeyed in an object program.  The Orion to 1900 peripheral may only be reserved with a 150/30 instruction or an ALLOCATE directive.  The 1900 to Orion peripheral may only be reserved with an 150/33, 34 or 35 instruction or an ALLOCATE directive.

Programmers'
peripheral name
Operation Mode
*ILn Input Y words up to end of transfer from 1900 1
*OLn Output Y Orion words or up to end of transfer to 1900. 21

End of transfer occurs before Y words have been transferred if 1900 specifies less data.

 

On Orion 1, the data are transferred directly between the core-store area and the peripheral device.  Once a 140/142 pair has initiated a transfer, subsequent instructions can be obeyed while the data are passing between the store and the peripheral.  The peripheral lockouts and core-store lockouts are effected by hardware.  The lockouts except for magnetic tape are advancing.

On Orion 2, the peripheral transfer instructions (140/142, 141/142, 140/154, 140/155) are performed by extracode.  It also performs some processes which on Orion 1 are done in the peripheral control unit (e.g. conversion of a card-column to u and v characters) and also provides, for some peripherals the equivalent of lockouts.

 

Peripheral Transfer, by Extracode

Magnetic Tape and Drum Store and Orion 2/1900 Direct Data Link (Fast devices). 

The data are transferred directly between the core-store and the peripherals as in Orion 1.  The core store area is lockout by means of a lockout tester in the hardware of the associated peripheral control unit.

Slow Input Peripherals

The extracode reads data into its own buffer areas (it double buffers for paper-tape readers; there are two 8-word buffers for each paper tape reader, and for cards two 20-word buffers for each card reader) and when the object-program obeys a 140/142 pair, the extracode then copies (142/142 pair) the required data from its buffers to the object program's input core store area.

Note that the object-program cannot progress beyond a 140/142 pair until the transfer has been completed and the data are in the object program's input region.  Thus it is impossible for the program to attempt to use the data before they are all in the input region and therefore there is no need for lockouts on the input region.

For slow input devices, some or all of the data are already in the extracode buffers, having been read autonomously while instructions preceding the 140/142 pair were being obeyed.

Pressing of the select button on a reader causes the extracode to clear (or ignore) the data in its buffers.

Peripheral incidents (see 5.5) which are not signalled at the time they actually happen but at the time the data involved are handed over to the object program, are paper tape parity failures and card read check failures and illegal punching.  Other incidents, operator attention or disabled, are signalled when they happen.

Reading punched paper-tape is now described to typify the handling of transfers used by slow devices.  The isolated region of the working-store occupied and used by the extra codes includes two 8-word buffers for each paper-tape reader attached to the computer.

When a 140-instruction is encountered in the object-program, entry to the "140" extracode routines takes place.

From the device's name (e.g. *SR2) the routine determines which section of itself is appropriate for that type of device.  Then a 146-instruction is obeyed, searching a table to find which physical device has the given programmers' name: this table is in fact part of the job's directory-entry.  (If the search stops because a zero modifier has been encountered, then a peripheral violation is implied.)  The extracode routine then causes another table to be searched to check that the mode and device-name are consistent and to select a section of the routine to carry out any special action required by the mode.  The peripheral control unit involved is made ready for a transfer.

A return to the main program occurs next to obey any instructions pre-modifying the 142-instruction and then the 142-instruction itself causes re-entry to the extracodes.  Upon this re-entry, lockouts and reservations are checked.

Suppose that this transfer is the first initiated on that reader by the object-program.  Then, when the 140/142 instruction-pair is encountered in the object-program, the program is interrupted and recorded as waiting for the reader.  The extracode routine then reads 8 words (64 characters) into the first of the extracode buffers.  Note that 64 characters are read, regardless of the number actually called for by the object-program.

When the object-program is re-entered from the Time-sharer, the required number of characters (Y in the 142-instruction) is copied from the buffer into the object-program's input area.

If the object-program required not more than 64 characters, its demands are satisfied and it can continue.  If, on the other hand, it required more than 64 characters, it is interrupted again.  In either case, 64 more characters are read into the second extracode buffer.  If the program required more than 64 characters then, when it is re-entered from the Time-sharer the remaining characters (up to the maximum of 64) are copied from the second buffer into the object-program's input region, and another 64 characters read into the first buffer.

Thereafter, whenever a 140/142 instruction-pair to read from that reader is encountered in the object-program, the characters called for are copied from one of the extracode buffers and, if the buffer is thereby "emptied", it is refilled with 64 more characters from the tape.  If a transfer calls for more characters than are in the extracode buffer, those which are available are copied across, during which the Time-sharer is entered.  When that part of the transfer is complete, a return to be object-program occurs for the next part of the transfer, which may or may not complete the transfer.  Thus during "long" transfers, the object-program may be interrupted several times for one transfer.

From the above it follows that the tape is always read 64 characters at a time and tape-reading is never terminated because a "newline" character has been read, even when the object-program calls for transfers in mode 1; the effect of reading up to NL is achieved during the copying from the extracode buffers into the object-program's input region.  Also it is desirable to have at least 127 characters (about 13 inches) of run-out (repeated upper-case) after the data on the tape in addition to any which would be called for by the program.

There is a slight increase in program efficiency if the object-program always calls for 64 characters.

Slow Output Peripheral Devices

The extracode buffer for a paper tape punch holds 128 characters, for a card punch holds one card, and for a line printer holds one line.  The data from the object-program's core region is copied (142/142) into the extracode buffer and after any conversion, the device is started and the program returned to (if more than 128 characters on the paper tape punch were called for then return is to deal with the rest or the next 128 and so on). Peripheral incidents are signalled at the time they occur.  For restart procedures note that the object-program core region is not locked out and the original data can be overwritten before the transfer has been completed; double buffering can be used to preserve the data in case of a failure occurring.

Entry to the Extracodes

The instructions which are extracoded are 102, 103, 125, 126, 140/142, 141/142, 140/154, 140/155 (156 when in monitoring or engineers mode).  Division orders 40-45 when the quotient appears out of range when in fact it is not.  101 and 95 - certain operands require help from Extracode.

The function-number in an Orion instruction is a 7-bit quantity.  However, it so happens that, for all the function-numbers except for 40-45 which are extracoded, the most significant of these is a 1; the extracoded function-numbers can therefore be distinguished from each other by considering the l.s. 6 bits only; the 45 and 125 case is looked for specially.

When an instruction with one of these particular function-numbers comes to be obeyed, the X- and Y-addresses are replaced and modified as necessary by the microprogram, after which:-

(a) the function-number is stored at absolute address 513, with the l.s. 2 bits of the function-number at the m.s. end of the word and the remaining 4 bits of the (effectively) 6-bit function-number at the l.s. end, i.e.

 

 

 

l.s. 2 bits of                                                                                    m.s. 4 bits of
the function number                                                                       the function number

(b) the effective X-, Y- and Z-addresses are stored at absolute addresses 512, 514 and 515 respectively, in each case including the datum-point of the object-program.

(c) the control-number (address of the instruction) is set in the modifier half of register 516, OVR is represented by m.s. bit in that register (0 if OVR clear, 1 if set) and OVR is left clear; thus [516] is a link for return to the object-program.

(d) the control-number is reset to 517,

(e) the datum-point is set equal to 512,

(f) the "extracode flip-flop" is set.  This is a 1-bit indicator which shows whether or not the extracode program is being obeyed.

When it is set:-
(a) testing for lockouts and reservations is inhibited,

(b) certain function-numbers when in extracode mode (the letter E is conventionally written after the number in this case) carry out quite different operations (e.g. 125E instruction has the effect, Test Lockout and Reservation Region for Input Transfer and does not standardise a floating-point number - its effect in non-extracode mode).  These function-numbers are 20 to 27, 87, 102, 103, 105, 106, 107, 125 and 127 and 140.

Then the instruction in register 517 is obeyed.  It is a 2-address 122-instruction which, using some Symbolic Addresses in lieu of the actual addresses, can be written as

  122Y  WS  TABLE  Al

The rearranged function number as explained above is used as a character-modifier in the 122 instruction: using the notation*

f1 = value of the l.s. 2 bits of the function number (0 f1 3)

f2 = value of the m.s. 4 bits of the (effectively 6 bit) function number (0 f1 15)

then [512]m = f2 and [512]c = 2f1 and so word [TABLE + f2] is shifted cyclically left 2f1 characters, i.e. f1 quarter-words.

Now starting at address TABLE is a table in which each significant entry (12 bits) is the address at which the corresponding extracode routine starts.

Therefore, given a function, the 122-instruction selects the entry-point address of the corresponding routine, putting it at the l.s. end of register WS.  The instruction in register 5l8 isolates those 12 bits which are then used to modify the destination address of an unconditional jump-instruction in register 519; this jump, of course, causes the appropriate extracode routine to be entered and obeyed.  When entered, the extracode routine performs the following processes:-

(a) using the special "extracode" function 125, lockouts and reservations are checked,

(b) the instruction is simulated,

(c) the word in register 516 is used as a link for return to the main program, by means of the instruction.

  87  1  516

This is essentially similar to a normal 87-instruction but with the addition effect of clearing the extracode flip-flop.  Note that, since [5l6]m is the address of the instruction being simulated, the X-address in the 87 instruction must be 1.

*Denoting the group and position of the function-number by G and P respectively then

8G + P = 64 + 4f1 + f2

For full write up of Extracode see the site engineer who has such a write up.