DECINPUT

    Purpose: To read from the tape and place in the accumulator
             a single number punched as an improper fraction
                         
    Cue: Magnetic Storage: single half track
         electronic storage: tube 1
         control number: $E
         self-resetting

    Link: closed

    Input details: conventional procedure
  
    Effects:
       
        +---------+------------+--------------------------+ 
        |  Lines  | Initial    | Final                    |
        | altered | contents   | contents                 |
        +---------+------------+--------------------------+ 
        | AL      | Irrelevant |               number     |
        |         |            | AM   +  AL  = from chars |
        | AM      | Irrelevant |   +       f   in tape    |
        |         |            |   -                      |
        |         |            |                          |
        | D       | Irrelevant | D = 4                    |
        +---------+------------+--------------------------+

    The number is assumed to be punched as follows:
    
       ( chars < 22 in numerical value)  + w . f Z
                                         -
                                         
    wich includes the form given by DECOUTPUT.
    Eg.g -3.25 (space)
    
    The whole number can be punched with or without the decimal
    point. $ in place of + or - cancels the entire number.
    
    Ferranti Mark I Programming Manual, third edition 
    Bodleian Special Collection 
    MS. Eng. misc. b. 260-C.41.pdf
    p57
    
    [Routine DECINPUT      ] 

    [Col     @ ]                        [        A ]              
                                                                          
    | / | $EO: | searches tape          | / | OA/J | add new digit to                        
    | E | /@/: | for chars >= 16        | E | OA/A | partial sum
    | @ | /@/H |                        | @ | MA/N | forms 2^3.10^-(r+1)
    | A | @S/J |                        | A | GA/A | 2^3.10^-r
    | : | DSQO | B7 -ve                 | : | /@/: | input next char
    | S | T@/H | tests for - or $       | S | "@/H | test for char <= 16
    | I | /:QO | B7 +ve                 | I | #AT: | clears accum
    | U | KA/J |                        | U | S:/C | D=4
    | # | R@/H | test for +             | # | OA/N | assembles complete
    | D | /@/P |___                     | D | PA/J |   number 
    | R | W@// | control number         | R | LS/T | tests if original sign char         
    | J | PA/A |            \           | J | DSTJ | changes the sign of A
    | N | J:/C |            !           | N | E:TC | if necessary
    | F | PA/N |            !           | F | LS/P |___ closure 
    | C | PA/U |            ! digit     | C | R/// | =10
    | K | CATN | tests for  ! cycle     | K | //// | constant used in 
    | T | ZA/H | decimal    ! for       | T | ///I | testing for + char
    | Z | CATC | point, F   ! integral  | Z | Q@// | control number
    | L | PA/C |            ! part      | L | E:TN | 
    | W | CA/N |            !           | W | /@/H | test for $
    | H | /@/: | rd next ch !           | H | E:TC | reset accum
    | Y | #@/H | test ch<16 /           | Y | R@/P | 
    | P | PATA |                        | P | USED | integral      
    | Q | IA/P |___ omits cycle         | Q | USED | part     
    | O | IST/ | sets round off         | O | USED | fractional     
    | B | OA/A | clears OA              | B | USED | part     
    | G | VA/J | enters cycle dealing   | G | USED | 2^3.10^-r     
    | " | M@/P | with fractional part   | " | USED | r=1, 2, etc
    | M | @A// |                        | M | GNIW | =10^-1
    | X | GA/C | Df=2^3.10^-r           | X | BNIA | 
    | V | GA/A | 2^3.10^-r*2^-5,dr      | V | FIWB | =2^3.10^-1
    | $ | GA/F | being the rth digit    | $ | NIWB | 
                                                                          
        
    [End]
