INPUT/B                        Date.   9.4.52

    Purpose: Input one signed integer of fraction into the
    accumulator: for use only with R.C.S/B
             
    Cues:  / / / / J E / /    fractions
           A / / / J E / /    integer
          
    Principal lines: [/E] = W E T :
             
    Magnetic Storage: variable     Electronic Storage: S0
    
    Stores Altered: B6 
    
    Effects: 1. To input a fraction (use the lower control number
                in the cue)
                 
                Let x denote the fraction punched in decimal form
                and followed by sign, e.g. -1/3 = 333333333-, where
                it is understood that the decimal point lies 
                inmmediately before the first digit punched and 
                that any number of digits may be punched, although
                only the first 23 witll be treated. The effect of 
                the routine can be described by the equation
                 
                [A]=x   (80 bits value, signed fract convention)
                 
             2. To input an integer (use the second control number)
             
                Let x denote the integer punched in decimal form and
                followed by sign. If the number of digits punched 
                is <= 23 then 
                
                [A]=x   (80 bits value, signed integer convention)
                
                If more than 23 digits are punched, then the integer
                whose digits are the first (i.e. most significant) 23
                digits of x, and whose sign is the sign of x, is 
                placed in A.
                
             3. The accumulator must be clear when INPUT/B is called in
             
             4. Accuracy: maximum error is 5x2^-80
             
             5. Speed: about 50 characters per second
                
    Note by Roberto Sancho: The cue dir entry has ben changed from value in
    original doc XEEZ. This value looks like the one the routine should have 
    if being used on Scheme A. Instead of this, a new cue is provided based 
    on track routine actualy has being stored to when Scheme B is built. 

    Floatcode - Bodleian Special Collection 
    MS. Eng. misc. b. 260-C.42.pdf
    p16
    
    [Routine INPUT/B     ] 
    
    [Col /          E ]      
                                    
    | Q/// | / | WET: |                                           
    | XEQO | E | OEPO | 
    | :EQB | @ | PEPB |                                          
    | J/QB | A | E:/C |                                          
    | //QO | : | /E/P |                                          
    | "//P | S | BE/C |                                          
    | XE/: | I | @//N |                                          
    | CE/M | U | I//U |  
    | "/PO | # | ://N |                                          
    | I/PB | D | "E/C |                                          
    | E:PO | R | @//N |                                          
    | VEPB | J | #//U | 
    | "//A | N | ://N | 
    | ///A | F | @//U | 
    | ///C | C | S//U | 
    | J:/N | K | D:/C | 
    | VE/C | T | S//N | 
    | ://N | Z | :/TA | 
    | A//I | L | #//N | 
    | @//N | W | #//U | 
    | @//U | H | @//N | 
    | ://U | Y | ://J | 
    | E:QG | P | DSTJ |                                      
    | CE/T | Q | E:TC |                                      
    | "//J | O | NS/P |                                      
    | E:/M | B | QFXC |                                      
    | L//Q | G | @SRL |                                      
    | W/T: | " | Y:/H |                                      
    | XE/: | M | BPSO | 
    | XE/M | X | X$O$ | 
    | @S/J | V | R/// | 
    | L//M | $ | //// | 
          
    Tape: INPUT D ONE 
    Destination Sequence: KAK@///#XEEZ
          
    [End]
     
    0  //  Q///  
    1  E/  XEQO  Entry point, input fractions
    2  @/  :EQB  patch for fractions ...
    3  A/  J/QB  ... addr 11 set to dummy
    4  :/  //QO  Entry point, input integer: B7=23 
    5  S/  "//P  goto 20

    6  I/  XE/:  Read PTR
    7  U/  CE/M  if (AM>=0) goto 13 (will be <0 on reading +, - or $ char)
    8  #/  "/PO  patch read PTR instr on addr 6 ...
    9  D/  I/PB  ... to be clear Acc
   10  R/  E:PO  B6=1
   11  J/  VEPB  dummy when reading fractions
   12  N/  "//A  ["/]=AM
   13  F/  ///A  save read digit char [//]=...n
   14  C/  ///C  D=//// ///n, n=0..9 the read-from-ptr digit
   15  K/  J:/N  Shift -> AL=0, AM=n
   16  T/  VE/C  D=10
   17  Z/  ://N  A=A+10*[:/]
   18  L/  A//I  Swap AM<->AL
   19  W/  @//N  A=A+10*[@/]
   20  H/  @//U  [@/]=AL, AL=AM, AM=Clear save full acc
   21  Y/  ://U  [:/]=AL, AL=AM, AM=Clear
   22  P/  E:QG  decr B7
   23  Q/  CE/T  if (B>=0) goto 6
   24  O/  "//J  
   25  B/  E:/M  
   26  G/  L//Q  goto 30
   27  "/  W/T:  
   28  M/  XE/:  
   29  X/  XE/M  
   30  V/  @S/J  
   31  $/  L//M  
   32  /E  WET:  clear acc
   33  EE  OEPO  patch addr 54 with ...
   34  @E  PEPB  ... NS/P to return to caller
   35  AE  E:/C  D=1
   36  :E  /E/P  patched to dummy
   37  SE  BE/C  
   38  IE  @//N  
   39  UE  I//U  
   40  #E  ://N  
   41  DE  "E/C  
   42  RE  @//N  
   43  JE  #//U  
   44  NE  ://N  
   45  FE  @//U  
   46  CE  S//U  
   47  KE  D:/C  
   48  TE  S//N  
   49  ZE  :/TA  
   50  LE  #//N  
   51  WE  #//U  
   52  HE  @//N  
   53  YE  ://J  AL,AM=80 bit fract read from PTR
   54  PE  DSTJ  return to caller
   55  QE  E:TC  
   56  OE  NS/P  
   57  BE  QFXC  
   58  GE  @SRL  
   59  "E  Y:/H  
   60  ME  BPSO  
   61  XE  X$O$  
   62  VE  R///  
   63  $E  ////  
                 
