INPUT/T                                          Date: 1951
     
    Love Letters - Bodleian Special Collection
    MS. Eng. misc. b. 259-C.34
    p18, p16

    INPUT AND ORGANIZATION OF SUB-ROUTINES FOR FERUT
    AUTOMATIC COMPUTING MACHINERY
    J. N. P. Hume
    Mathematical Tables and Other Aids to Computation
    Vol. 8, No. 45 (Jan., 1954)

    Toronto University version of INPUT/A for FERUT computer
    

    [Routine INPUT/T  ] 

    [Col / E  Track 4L]                 [Col @ A  Track 4R]       
                                               
    | :/@/ | / | IE/: |<-J           F->| MEPO | / | I/@N |                   
    | ///: | E | I//P |                 | Y:PG | E | VA// |
    | /A/: | @ | IE/: |<-C              | //YT | @ | AEW/ |                  
    | //PO | A | :A/P |                 | //YT | A | I/// |                  
    | AIPB | : | IE/: |<-@,R            | //PZ | : | KA// |           
    | S//: | S | SA/P |                 | U//P | S | MA// |           
    | $EZO | I | S/E@ |            U,D->| //YT | I | I/// |           
    | I/O: | U | U//: |<-K              | MEYB | U | S@// |           
    | U//: | # | DS/J |                 | A/T$ | # | I/// |           
    | ME/A | D | ME/U |                 | MET# | D | S@// |           
    | METN | R | U//: |                 | V@TR | R | AE// |           
    | U//H | J | V:/C |                 | SSTC | J | $/// |
    | K//Q | N | ME/A |                 | $EIQ | N | I/// |
    | //// | F | ME/N |                 | ":TC | F | $E// |
    | //// | C | U//: |                 | ME/S | C | EE// |
    | A/// | K | ME/A |                 | A:/Q | K | IE// |
    | DET: | T | ME/N |                 | ME/S | T | U//: |
    | J:/C | Z | U//: |                 | ":TC | Z | V:/C |           
    | ME/N | L | ME/A |                 | B:TC | L | XE/A |           
    | ME/A | W | ME/N |                 | XETA | W | XE/N | 
    | MEPO | H | U//: |                 | ME/: | H | U//: |
    | U//: | Y | ME/A |                 | XE/: | Y | XE/A |    
    | V:/C | P | XEPO |                 | Y@/V | P | /:/C |     
    | ME/A | Q | DSYG |                 | P@/P | Q | XE/N | 
    | ME/N | O | $$YZ |                 | $E/P | O | ME/J | 
    | U//: | B | V:TN |                 | //// | B | XE/A | 
    | ME/A | G | T//H |                 | //// | G | XE/: | 
    | Y:/C | " | U//P |                 | //// | " | @A/: |  
    | ME/N | M | //// |                 | //// | M | $E/P |
    | ME/A | X | //// |                 | //// | X | ///G |<-S
    | MEYO | V | //// |                 | $$$/ | V | U//P |
    | /AIP | $ | //I/ |                 | //// | $ | ME/P |<-E
         
         
    [Col @ A  Track 5R]       
                              
 J->| E:YG | / | //DB |        
    | /@/: | E | //L/ |       
    | EA/: | @ | //W/ |       
    | @A/: | A | //// |       
    | EA/: | : | C@// | C     
    | E:YG | S | UA// | @,R   
    | U//: | I | //O$ |       
    | E/T$ | U | //// |       
    | D@/: | # | U//: | <-@,R 
    | :@T: | D | V:/C |       
    | D@/T | R | ME/A |       
    | @A/: | J | ME/N |       
    | EA/: | N | U//: |       
    | $E/P | F | ME/A |       
    | //T$ | C | Y:/C |       
 C->| /AYG | K | ME/N |       
    | L@YB | T | ME/A |       
    | V@QO | Z | MEHO |       
    | //// | L | "AHB |       
    | A:QG | W | //YT |       
    | G@/T | H | MAYB |       
    | LUTN | Y | $AQO |       
    | ME/A | P | XEIQ |       
    | E:TN | Q | IAQG | <- @  
    | E:/M | O | BAQB | <- R  
    | $E/P | B | //// |       
    | Z@/V | G | GS/P |       
    | B@/V | " | //// |       
    | "@/P | M | //// |       
    | //T$ | X | WA/P |       
    | VE// | V | //// |       
    | //T$ | $ | BAQO |       
                                                                   
                  
    [End]

Warning Chars

J n/ ccc..c             print/punch n chars ccc..c as text
STOP                    exec dummy stop /G -> stop if /G switch is set
E ab                    transfers control to address ab+1
: abcd                  exec abcd as magnetic instruction
K ab c aaaa bbbb ...	[ab]=aaaa, [ab+1]=bbbb ... [ab+c]=eeee. if c=/, enter 32 values

D ab                    read down routine from dir entry at addr ab to S4 and/or S5
                        continuous hoot if read checks fails (i.e. read error)  
U ab                    write up routine from S4 and/or S5 to dir entry at addr ab 

R nnab                  calls in subroutine from dir entry at addr nn, then enters it at addr ab+1
@ nnab                  calls in adroutine from dir entry at addr nn, then enters it at addr ab+1

C /n                    compare checksum of columns /n and /(n+1) with checksum stored in [LU]
                        if not the same value, do a continuous hoot. In this case, [ME]=checksum - [LU]
                        so if [LU]=0 -> [ME]=the current chesum

F ab                    replace false line at addr ab
                        if [ab]=nn$$  -> does nothing, it is a true dir line
                        if [ab]=nn//  -> nn is the dir entry address
                                      then read dir entry at address nn -> gives the mag instr to load routine
                                      then store mag instr at addr ab, overwritting value nn//
                          

                        the char /,#,I,N and A works as no-operation 
                        also are ignored chars whose value >= 16: T Z L W H Y P Q O B G M V V " $


                         
    0  //  :/@/  Mag Instr: Read from Track 4L to Tube S0
    1  E/  ///:  Entry point on boot: Read from Track 4L to Tube S0
    2  @/  /A/:  Read directory from Track 6L to Tube S6 (cols NFCK
    3  A/  //PO  B6=:/@/ 
    4  :/  AIPB  [AI]=B6
    5  S/  S//:  Read PERM from Track 5L to Tube S2 
    6  I/  $EZO  B1=//I/ -> Link list in column I
    7  U/  I/O:  clear acc
    8  #/  U//:  Read PTR -> get the Warning Char
    9  D/  ME/A  Save read char in [ME, XE]=//// ///c, clear acc
   10  R/  METN  AL=-//// ///c
   11  J/  U//H  if (A>=0) goto 8 -> ignore char, goto read next 
   12  N/  K//Q  goto 16
   13  F/  ////  
   14  C/  ////  
   15  K/  A///  
   16  T/  DET:  clear acc
   17  Z/  J:/C  D=/E// ////
   18  L/  ME/N  shift -> AM=c/// ////
   19  W/  ME/A  [ME]=c/// warning char read
   20  H/  MEPO  B6=[ME]=c/// warning char read
   21  Y/  U//:  Read PTR param char1
   22  P/  V:/C  D=//// ///E
   23  Q/  ME/A  [ME]=a/// char read
   24  O/  ME/N  shift -> AM=//// //a/
   25  B/  U//:  Read PTR param char2
   26  G/  ME/A  [ME,ZE]=//// //ab 
   27  "/  Y:/C  D=//E/ ////
   28  M/  ME/N  Shift AM=ab// ///
   29  X/  ME/A  [ME]=AM -> warning char param 
   30  V/  MEYO  B5=[ME]=ab// -> warning char param
   31  $/  /AIP  if B6=J  goto 32
                       S  goto 125 (for STOP warning char)
                       E  goto 127 
                       :  goto 112
                       K  goto 39
                       DU goto 70
                       R@ goto 36
                       F  goto 64
                       C  goto 34

                 warning char J ab c..c (ab chars)

   32  /E  IE/:  Read from Track 5R to Tube S1
   33  EE  I//P  goto 64

                 warning char C ab 

   34  @E  IE/:  Read from Track 5R to Tube S1
   35  AE  :A/P  goto 79

                 warning char R @ 

   36  :E  IE/:  Read Track 5R to Tube S1 
   37  SE  SA/P  goto 104
   38  IE  S/E@  

                 warning char K ab c aaaa bbbb ...	

   39  UE  U//:  Read PTR param char3 = num of 20bit words to store
   40  #E  DS/J  AM=AM-1
   41  DE  ME/U  [ME]=num of words to store-1
   42  RE  U//:  Read PTR param wordc1
   43  JE  V:/C  D=//// ///E
   44  NE  ME/A  Save AM
   45  FE  ME/N  Shift AM=//// //c/
   46  CE  U//:  Read PTR param wordc2
   47  KE  ME/A  Save AM
   48  TE  ME/N  Shift AM=//// /cc/
   49  ZE  U//:  Read PTR param wordc3
   50  LE  ME/A  Save AM
   51  WE  ME/N  Shift AM=//// ccc/
   52  HE  U//:  Read PTR param wordc4
   53  YE  ME/A  Save AM=//// cccc, clear AM
   54  PE  XEPO  B6=cccc word to store
   55  QE  DSYG  incr B5 (B5=addr to store to)
   56  OE  $$YZ  [B5-1]=[B6] -> store word at addr
   57  BE  V:TN  decr AL > AL=num of chars left to be read
   58  GE  T//H  if (AM>=0) goto 42 -> goto read & store next word
   59  "E  U//P  goto 7 -> read next warning char
   60  ME  ////  
   61  XE  ////  
   62  VE  ////  
   63  $E  //I/  const goto 1

                 warning char F ab (replace false line at addr ab)

4R 64  /@  MEPO  B6=[ME] = warning char param = false line addr = ab//
   65  E@  Y:PG  B6=-B6 
   66  @@  //YT  B5=[B5] -> B5=the dir entry in false line addr
   67  A@  //YT  B5=[B5] -> B5=mag instr in dir entry 
   68  :@  //PZ  [B6]=B5 -> store mag instr in place of false line
   69  S@  U//P  goto 7 -> process next warning char

                 warning char D ab (read routine from dir entry nn to S4 S5)
                 warning char U ab (write routine from S4 S5 to dir entry nn)

   70  I@  //YT  B5=[B5] -> read into B5 the mag instr from dir entry at addr ab 
   71  U@  MEYB  [ME]=B5=mag instr
   72  #@  A/T$  dummy
   73  D@  MET#  AL=mag instr
   74  R@  V@TR  AND $$$/ ////  -> discard load store 
   75  J@  SSTC  add ///# ////  -> set load store as S4
   76  N@  $EIQ  if B6=warning char D goto 80 (read down routine drom dir) 
                 if B6=warning char U goto 77 (write up routine) 
   77  F@  ":TC  add //## ////  -> convert to write track
   78  C@  ME/S  [ME]=mag instr to exec
   79  K@  A:/Q  goto 82
   80  T@  ME/S  [ME]=mag instr to exec
   81  Z@  ":TC  add //#/ ////  -> converto to check
   82  L@  B:TC  add //:/ ////
   83  W@  XETA  [XE]=mag instr 
   84  H@  ME/:  exec mag instr
   85  Y@  XE/:  exec check mag instr: continue if contents of S4 not match with contents of track, goto 87 if matches
   86  P@  Y@/V  Hoot -> continuous hoot if read checks fails (i.e. read error)
   87  Q@  P@/P  goto 86
   88  O@  $E/P  goto 1 -> read ok, process next warning char
   89  B@  ////  
   90  G@  ////  
   91  "@  ////  
   92  M@  ////  
   93  X@  ////  
   94  V@  $$$/  
   95  $@  ////  
   96  /A  I/@N  Mag Instr: Read from Track 6L to Tube S6

                 Jump table for warning chars

   97  EA  VA//  const goto 127 (E warning char)
   98  @A  AEW/  const CR + const goto 36 (@ warning char)
   99  AA  I///  a  -> goto 7: ignore this char when issued as warning char
  100  :A  KA//  const goto 112 (: warning char)
  101  SA  MA//  const goto 125 (STOP warning char)
  102  IA  I///  i  -> goto 7: ignore this char when issued as warning char
  103  UA  S@//  const goto 70 (U warning char)
  104  #A  I///  #  -> goto 7: ignore this char when issued as warning char
  105  DA  S@//  const goto 70 (D warning char)
  106  RA  AE//  const goto 36 (R warning char)
  107  JA  $///  const goto 32 (J warning char)
  108  NA  I///  n  -> goto 7: ignore this char when issued as warning char
  109  FA  $E//  const goto 64 (F warning char)
  110  CA  EE//  const goto 34 (C warning char)
  111  KA  IE//  const goto 39 (K warning char)

                 warning char : abcd (exec abcd as mag instr)

  112  TA  U//:  Read PTR param char3
  113  ZA  V:/C  D=//// ///E
  114  LA  XE/A  Save AM
  115  WA  XE/N  Shift AM=//// //c/
  116  HA  U//:  Read PTR param char4
  117  YA  XE/A  Save [XE,VE]=//// //cd
  118  PA  /:/C  D=//// E///
  119  QA  XE/N  Shift AM=//cd
  120  OA  ME/J  Add [ME] -> AM=abcd ////
  121  BA  XE/A  [XE]=abcd paran of warning char
  122  GA  XE/:  exec warning char param as magnetic instruction
  123  "A  @A/:  Print LF
  124  MA  $E/P  goto 1 -> reload INPUT to process next warning char

                 STOP warning char

  125  XA  ///G  Dummy stop /G
  126  VA  U//P  goto 7 -> process next warning char

                 warning char E ab (transfer control to ab+1)

  127  $A  ME/P  goto addr given by warning char param
                 
5R 64  /@  E:YG  J char processing: decr B5
   65  E@  /@/:  Printer set Letter Shift
   66  @@  EA/:  Print CR
   67  A@  @A/:  print LF
   68  :@  EA/:  Print CR
   69  S@  E:YG  decr B5
   70  I@  U//:  Read PTR
   71  U@  E/T$  dummy
   72  #@  D@/:  Print/Punch char
   73  D@  :@T:  clear acc
   74  R@  D@/T  if (B>=0) goto 69 -> read PTR and print char, until B5 < 0
   75  J@  @A/:  Print LF
   76  N@  EA/:  Print CR
   77  F@  $E/P  goto 1 -> reload INPUT to process next warning char
   78  C@  //T$

   79  K@  /AYG  C char processing: B5=B5 - //DB
   80  T@  L@YB  Save B5 as instr in addr 82
   81  Z@  V@QO  B7=VE//
   82  L@  ////  exec instr: A=[ /n + B7], being /n the param for C warning char held in B5
   83  W@  A:QG  B7=B7-2
   84  H@  G@/T  if (B>=0) goto 82 -> on loop termination, AL=checksum of /n and /n+1 (64 single lines)
   85  Y@  LUTN  A=A-[LU] -> compare with stored checksum
   86  P@  ME/A  [ME]=AL
   87  Q@  E:TN  A=A-1
   88  O@  E:/M  if (A>=0) goto 90
   89  B@  $E/P  goto 1 -> reload INPUT to process next warning char
   90  G@  Z@/V  Hoot
   91  "@  B@/V  Hoot
   92  M@  "@/P  goto 90

   93  X@  //T$  
   94  V@  VE//
   95  $@  //T$
   96  /A  //DB
   97  EA  //L/
   98  @A  //W/
   99  AA  ////
  100  :A  C@//
  101  SA  UA//
  102  IA  //O$
  103  UA  ////


  104  #A  U//:  R and @ char processing: Read PTR EnterAddrc1
  105  DA  V:/C  D=//// ///E
  106  RA  ME/A  Save AM
  107  JA  ME/N  Shift AM=//// //c/
  108  NA  U//:  Read PTR EnterAddrc2
  109  FA  ME/A  Save AM
  110  CA  Y:/C  D=//E ////
  111  KA  ME/N  Shift AM=cd// ////
  112  TA  ME/A  [ME]=AM=cd// -> save in [ME] the routine enter address
  113  ZA  MEHO  B4=enter address
  114  LA  "AHB  set subrourite entry address for RCS call at addr 123
  115  WA  //YT  B5=[B5] -> read into B5 the mag instr from dir entry at addr ab 
  116  HA  MAYB  set mag instr to load routine at addr 124
  117  YA  $AQO  B7=BAQO
  118  PA  XEIQ  if B6=warning char R goto 120 (enter as sub-routine) 
                 if B6=warning char @ goto 119 (enter as ad-routine) 
  119  QA  IAQG  make B7=BA$O (dummy instr)
  120  OA  BAQB  [BA]=B7
  121  BA  ////  on R warning char: BAQO B7=BAQO -> B7=its own address for RCS call
                 on @ warning char: BA$O dummy   
  122  GA  GS/P  call RCS
  123  "A  ////  entry address
  124  MA  ////  mag instr to read routine
  125  XA  WA/P  goto 1 -> read next warning char
  126  VA  ////
  127  $A  BAQO
           