A/DEC-OUTPUT                          Date. 13.7.51

    Purpose: To punch and print the contents of long line
             in decimal (fractional form). 
             
             
    Cues: (1) / / . . A E E Z   fractional form, signed convention 
          (2) L E . . A E E Z   fractional form, non-signed convention
          (3) B E . . A E E Z   fractional form, non-signed convention, get params
                                from [EC] and [/C] instead of B5 B6, set [BK]=32 to 
                                print <cr><lf> before printing first digit 
          (4) Q E . . A E E Z   same as above, on signed convention 
             
    Principal lines: [/E] = J / T :
                     
    Magnetic Storage: variable      Electronic Storage: S0 
    
    Stores Altered:  B5 B6  BK, the line whose address is [B5]
    
    Effects: Initially [B5] = address of long line
                       [B6] = number of decimal digits required

             Entering by cue (1) the contents of the line specified
             in B5 is printed as decimal fraction, taken as many
             decimal digits as are specified by B6, and preceded
             by + or -

             Entering by cue (2) the number is assumed to be +
             the sign is omitted

             Effect of initial setting of [BK]: each time a digit 
             is printed, [BK] is incremented. When [BK]=32 then
             a Carriage return + Line feed is printed, and
             [BK] reset to 1
             
              
                       
    Note by Roberto Sancho: DEC-OUTPUT prints fractional numbers as
    cue(1): as signed values, in range -0.5 .. +0.5
    cue(2): as unnsigned values, in range 0.0 .. +0.999999

    A cue(3) BE..AEEZ and cue(4) QE..AEEZ are defined to get input 
    paramters from storage instead of B5 and B6:

       [EC]=address of long line to print as unsigned/signed fraction
       [/C]=num of decimal digits to print 

       Also set [BK]=32 so a <cr><lf> will be printed before first digit     

;                 
    Library Progs - Bodleian Special Collection 
    MS. Eng. misc. b. 260-C.43.pdf
    p27
    
    [Routine DEC-OUTPUT       ] 

    [Col /          E ]        
                                
    | //// | / | J/T: |                                   
    | C//P | E | #E/J |         
    | //Y# | @ | CE/P |                                  
    | NE/H | A | FE/: |                                  
    | //YF | : | CE/: |                                  
    | //YA | S | E:QO |                                  
    | RE/J | I | /E/P |                                  
    | BKQO | U | R/// |         
    | J:QG | # | //// |                                  
    | FE/T | D | ///P |                                  
    | BKQO | R | //// |                                  
    | RSQG | J | ///M |         
    | BKQB | N | $/H/ |         
    | T//: | F | @EL/ |         
    | KE/: | C | I/W/ |         
    | VK/A | K | //B/ |         
    | VKTJ | T | VSTA |         
    | VK/A | Z | NE/: |         
    | V:TN | L | E:/P |         
    | KS/H | W | VSTA |         
    | H/T: | H | NE/: |         
    | E:PG | Y | H//P |         
    | E:/O | P |      |                              
    | NS/P | Q |      |                              
    | UE/C | O | E/YO |                              
    | //SN | B | VEYB |                              
    | //SU | G | J:YO |                              
    | VK/U | " | BKYB |                              
    | V:/C | M | ECYO |         
    | VK/N | X | /CPO |         
    | ///I | V | $E/P |         
    | CE/P | $ | LE// |         
                                                                          
    Tape: DECOUTPU ONE 
    Destination Sequence: KAK@///#AEEZ
        
    [End]

    0  //  ////  
    1  E/  C//P  
    2  @/  //Y#  
    3  A/  NE/H  
    4  :/  //YF  
    5  S/  //YA  
    6  I/  RE/J  
    7  U/  BKQO  B7=[BK]		if [BK]>=32 goto 35
    8  #/  J:QG  B7=B7-(/E//)           else incr B7
    9  D/  FE/T  if (B>=0) goto 35
   10  R/  BKQO  B7=[BK]. Restore B7
   11  J/  RSQG  incr B7
   12  N/  BKQB  [BK]=B7
   13  F/  T//:  print '+'
   14  C/  KE/:  check
   15  K/  VK/A  [VK]=AM
   16  T/  VKTJ  [VK]=xored char printed
   17  Z/  VK/A  [VK]=AM
   18  L/  V:TN  sub //// ///E
   19  W/  KS/H  if (AM>=0) goto printer error
   20  H/  H/T:  A=0

   21  Y/  E:PG  decr B6 (=number of decimal digits required)
   22  P/  E:/O  if (B>=0) goto 24
   23  Q/  NS/P  return to caller
   24  O/  UE/C  D=R/// ////
   25  B/  //SN  AL=[B5]*D -> AL: 549755813896 (#/// ///T) AM: 00004 (:/// ////) 
   26  G/  //SU  [B5]=#/// ///T
   27  "/  VK/U  [VK]=:/// ////
   28  M/  V:/C  D=//// ///E
   29  X/  VK/N  AL=//// ///:
   30  V/  ///I  Swap AM<->AL, AM=//// ///:
   31  $/  CE/P  goto 7
   32  /E  J/T:  
   33  EE  #E/J  
   34  @E  CE/P  
   35  AE  FE/:  Print <cr>
   36  :E  CE/:  Print <lf>
   37  SE  E:QO  B7=1
   38  IE  /E/P  goto 12
   39  UE  R///  
   40  #E  ////  
   41  DE  ///P  
   42  RE  ////  
   43  JE  ///M  
   44  NE  $/H/  
   45  FE  @EL/  
   46  CE  I/W/  
   47  KE  //B/  
   48  TE  VSTA  
   49  ZE  NE/:  
   50  LE  E:/P  
   51  WE  VSTA  Entry cue(2): Save return lin in [VS]
   52  HE  NE/:  Printer set figure shift 
   53  YE  H//P  goto 21
   54  PE        
   55  QE        
   56  OE        
   57  BE        
   58  GE  J:YO  B5=32   
   59  "E  BKYB  [BK]=B5 -> [BK]=32 so a <cr><lf> will be printed before first digit
   60  ME  ECYO  B5=[EC]=address of long line to print as unsigned fraction
   61  XE  /CPO  B6=[/C]=num of decimal digits to print      
   62  VE  $E/P  goto 51      
   63  $E  LE//  const addr 51      
                 
