Scheme B INPUT                  Date: 1952
     
    Written by R.A Brooker and A.Glennie

    Ferranti Mark I Programming Manual, second edition 
    Computer History Museum (https://computerhistory.org/)
    102724593-05-01-acc.pdf
    p111-112
    
    [Routine INPUT ] 

    [Col / E  Track 96L]                [Col @ A  Track 96R]       
                                               
    | M$$$ | / | ///J |                 | ENP/ | / | V//G | <- K2                  
    | $$$$ | E | @//U |                 | L@TR | E | F@/P |
    | W@ZO | @ | D//: |                 | #@UQ | @ |      |                  
    | K@PO | A | @//A |                 | Q@TC | A | XE// |                  
    | ://Z | : | @//N |                 | P@TC | : | XE// |                  
    | :/QO | S | D//: |                 | @//S | S | VE// |                  
    | $@QG | I | @//A |                 | Y@TC | I | VE// |                  
    | "@/O | U | @//N |                 | A/TA | U |      |                  
    | T@PB | # | D//: |                 | @//: | # | LE// |                  
    | EEO: | D | @//A |                 | A//: | D |      |                  
    | D//: | R | @//N |                 | X@/: | R |      |                  
    | V@/J | J | D//: |                 | ///Q | J | LE// |
    | N@/H | N | @//A |                 | #//L | N |      |
    | @//A | F | A/QO |                 | N@/P | F |      |
    | O@/C | C | E/PG |                 | A//P | C |      |
    | @//N | K | $$PZ |                 | EA@: | K |      |
    | @//A | T | V@TN |                 | @A@: | T | L/// | <- K1
    | @/QO | Z | D//H |                 | @E@N | Z | L/// |                  
    | /AUP | L | N@/P |                 | $$AA | L | $@// |                  
    | D//: | W | H@PG |                 | @/I/ | W | L/// |
    | V@/C | H | GEPB |                 | ///@ | H | L/// |
    | @//A | Y | T@/: |                 | //:/ | Y | L/// |
    | @//N | P | @/QB |                 | ///# | P | L/// |
    | D//: | Q | @/PO |                 | //#/ | Q | #/// |
    | @//A | O | OEQO |                 | /E// | O | L/// | <- Q1
    | B@/C | B | $:IP |                 | //// | B | #/// |
    | @//N | G | @A@: |                 | //E/ | G | #/// |
    | @//A | " | //T/ |                 | E/// | " | L/// | 
    | V@/C | M | T@TA |                 | //// | M | #/// |
    | A/PO | X | N@/P |                 | E/W/ | X | #/// |
    | T@UP | V | "@PG |                 | //// | V | #/// |
    | D//: | $ | Z@/: |                 | ///E | $ | #/// |
                 
    [End]
    
Warning Chars

Z                       Dummy Stop if /G switch is on (press prepulse to continue)
K ab c aaaa bbbb ...    [ab]=aaaa, [ab+1]=bbbb ... [ab+c]=eeee. if c=/, enter 32 values
YTP                     write S4 and S5 as directory in track 34LR
YKP                     write S4 and S5 in track 98LR
Y nn                    write S4 and S5 in mag instr given by dir entry nn

T ab                    transfer control to addr ab+1
HTP                     read into S4 and S5 directory from track 34LR
HKP                     read into S4 and S5 from track 98LR
H nn                    read into S4 and S5 from track given by dir entry nn
Q nn                    call as ad-routine using dir entry nn
G nn                    call as B.INPUT sub-routine using dir entry nn

L ab                    read into S4 and or S5 using mag instr at addr ab in dir (ab=one of 64 single lines)
W ab                    write

                        the char / and C (or any char < K) works as no-operation 


    
   0  //  M$$$                       
   1  E/  $$$$  const -1, Entry point when booting (dummy instr)
   2  @/  W@ZO  B1=@/I/ -> stack pointer for subroutine call
   3  A/  K@PO  B6=EA@:
   4  :/  ://Z  Set here the H contents
   5  S/  :/QO  B7=hand swith contents (H) = /A@/
   6  I/  $@QG  if (B7>=///E) ...
   7  U/  "@/O  ... then goto 9
   8  #/  T@PB  [T@]=B6=EA@:

   9  D/  EEO:  Clear Acc  - read cycle
  10  R/  D//:  read PTR char in AM
  11  J/  V@/J  if (char < 'K') ...
  12  N/  N@/H  .. then goto 9

  13  F/  @//A  process read char
  14  C/  O@/C  
  15  K/  @//N  
  16  T/  @//A  
  17  Z/  @/QO  B7=(char+1)
  18  L/  /AUP  multiway switch goto [/A+B7]
                  KLWHYQGT -> goto 19
                  Z        -> goto 96
                  POB"MXV  -> goto 9

  19  W/  D//:  read PTR (first of two chars addr ab)
  20  H/  V@/C  process them to set B6
  21  Y/  @//A  
  22  P/  @//N  
  23  Q/  D//:  read PTR (second of two chars addr ab)
  24  O/  @//A  
  25  B/  B@/C  
  26  G/  @//N  
  27  "/  @//A  
  28  M/  V@/C  
  29  X/  A/PO  B6=ab//
  30  V/  T@UP  multiway switch goto [T@+B7]
                  K  -> goto 31
                  T  -> goto 78
                  LW -> goto 62
                  HY -> goto 63
                  QG -> goto 51 

                K warning char 
  31  $/  D//:  read PTR (third char) number of 20bits words that follows
  32  /E  ///J  read a four char word
  33  EE  @//U  
  34  @E  D//:  read PTR data word char1 
  35  AE  @//A  
  36  :E  @//N  
  37  SE  D//:  read PTR data word char2
  38  IE  @//A  
  39  UE  @//N  
  40  #E  D//:  read PTR data word char3
  41  DE  @//A  
  42  RE  @//N  
  43  JE  D//:  read PTR data word char4
  44  NE  @//A  
  45  FE  A/QO  B7=word read
  46  CE  E/PG  B6=address
  47  KE  $$PZ  store [B6]=B7
  48  TE  V@TN  decr num of words counter
  49  ZE  D//H  if (AM>=0) goto 34 read next word
  50  LE  N@/P  goto 9

                G warning char
  51  WE  H@PG  
  52  HE  GEPB  [GE]=B6 -> routine to be called = param given to G command
  53  YE  T@/:  Read PERM from Track 97L to Tube S2 or Working PERM from Track 98L
  54  PE  @/QB  [@/]=B/=char 'G'+1 
  55  QE  @/PO  B6=B7=char 'G'+1 
  56  OE  OEQO  B7=*=addr 56
  57  BE  $:IP  if char was 'G' goto 179 -> call RCS routine in PERM

  58  GE  @A@:  const routine to be called
  59  "E  //T/  
  60  ME  T@TA  patch to not reload dir in S4/S5 (dir already loaded)
  61  XE  N@/P  goto 9 read next warning char

                L warning char 
  62  VE  "@PG  B6=2  to signal we are using L instead of Y 

                Y warning char 
  63  $E  Z@/:  Read from Track 34L to Tube S6 (Read DIR to S6 and S7)
  64  /@  ENP/  get mag instr: YTP -> B6=TP/// -> AL=[Z@]=@E@/ .... -> read track 34 to S4&S5
                               Ynn -> AL=mag instr for dir entry nn
                               Lnn -> AL=mag instr for addr nn into tube S4
  65  E@  L@TR  A=A AND $$AA .... keep track num, half/full track, last 2 bits of tube num
  66  @@  #@UQ  if (Y warning char) goto 67
                   (L warning char) goto 68 to not set write bit                   
  67  A@  Q@TC  Add write bit to mag instr in AL
  68  :@  P@TC  Add to use storage tube S4 in mag instr
  69  S@  @//S  save mag instr to [@/]
  70  I@  Y@TC  Add check bit to mag instr
  71  U@  A/TA  save check mag instr to [A/]
  72  #@  @//:  exec mag instr: YTP -> write S4,S5 to 34LR
  73  D@  A//:  check, if Ok goto 76
  74  R@  X@/:  signals <LF> if failure
  75  J@  ///Q  goto 72 to read again
  76  N@  #//L  Dummy Stop /L: stop on writing Y 
  77  F@  N@/P  

  78  C@  A//P  
  79  K@  EA@:  
  80  T@  @A@:  
  81  Z@  @E@N  Mag Instr: Read Track 34 to S4 and S5
  82  L@  $$AA  
  83  W@  @/I/  
  84  H@  ///@  
  85  Y@  //:/  
  86  P@  ///#  
  87  Q@  //#/  
  88  O@  /E//  
  89  B@  ////  
  90  G@  //E/  
  91  "@  E///  
  92  M@  ////  
  93  X@  E/W/  
  94  V@  ////  
  95  $@  ///E  

                Z warning char 
  96  /A  V//G  Dummy stop /G
  97  EA  F@/P  goto 77

  98  @A        
  99  AA  XE//  
 100  :A  XE//  
 101  SA  VE//  
 102  IA  VE//  
 103  UA        
 104  #A  LE//  
 105  DA        
 106  RA        
 107  JA  LE//  
 108  NA        
 109  FA        
 110  CA        
 111  KA        
 112  TA  L///  
 113  ZA  L///  
 114  LA  $@//  
 115  WA  L///  
 116  HA  L///  
 117  YA  L///  
 118  PA  L///  
 119  QA  #///  
 120  OA  L///  
 121  BA  #///  
 122  GA  #///  
 123  "A  L///  
 124  MA  #///  
 125  XA  #///  
 126  VA  #///  
 127  $A  #///  
                
