DECOUTPUT/A                          Date. oct 1952

    Purpose: To print single numbers with both integral and
             fractional part.              
             
    Cues: / @ $ B B E E Z    for R.C.S.A
          A @ / / # E / @    for R.C.S.B
             
    Principal lines: [/A] = E A / :
    Preset lines:    [$A]
                     
    Effects: (1) The routines prints x + y. That is, y is printed as an
                 integer on signed convention, followed by x as a fraction
                 on the unsigned convention. It is assumed that |y| < 10^11
                 If this is not so the integral printing will be incorrect.
                 
             (2) No carriage return or line feed instructions are
                 included, These must be proveided by the programmer in the 
                 calling-in routine.
                 
             (3) Printing is as follow:
             
             (a) The integral part is printed with supperssion of initial
                 irrelevant zeros and preceeded by the correct sign.
                 If y=0 then '+ 0' is printed.
             
             (b) The decimal point is printed
             
             (c) The fractional part is printed to n decimal places
                 where n-1=[$A]. If however the residue (i.e. the quantity
                 remaining to be printed) is zero at any stage, printing 
                 ceases and the routine is left. Thus if [$A] >= 39 the
                 fractional part is printed to its terminating decimal
                 figure.

    Notes:   (1) The routine is useful in conjunction with DIVISION/B,
                 the sign convention being the same in each case
                 
             (2) To print numbers as fractions on the signed convention
                 they should be sent to the accumulator with T/ instructions. 
                 To obtain printing on the unsigned convention a T# instruction
                 should be used.
                 
             (3) To print numbers as integers on the signed convention, clear
                 the accumulator and plant with a /J instruction. Printing
                 will then cease after the decimal point.
    Examples:
    
              x            y              Printed as
              //// ///T    $$$$ $$$$      -0.5   
              //// ///T    //// ////      +0.5   
              //// ///:    S$$$ $$$$      -26.875   
              //// ///M    G/// ////      +26.875
              //// ////    $$$$ $$$$      -1.
              
              The instructions of DECOUTPUT/A are given as an example of
              both integer and fraction printing cycles.
    
    Note by Roberto Sancho: 
    The RCS/A cue directory entry has ben changed form 
    original PEEZ value to BEEZ value, so it does not conflict with 
    DECOUT C cue.

    For RCS/B, the cue dir entry has ben changed from value in
    original doc ...@. A new cue is provided based on track routine 
    actualy has being stored to when Scheme B is built. 

    On entry with RCS/A, [@C] contains value on signed integer convention
                         [/C] contains value on unsigned fractional convention

    On entry with RCS/B, AM contains value on signed integer convention
                         AL contains value on unsigned fractional convention


        
    Ferranti Mark I Programming Manual, second edition
    Computer History Museum (https://computerhistory.org/)
    102724593-05-01-acc.pdf
    p243 and p251
    
    [Routine DECOUTPUT/A       ] 

    [Col @          A ]        
                                
    | A/H/ | / | EA/: |                                   
    | VSTA | E | /@TB |         
    | /CT/ | @ | :@TA |                                  
    | @C/J | A | :@/N |                                  
    | /@/: | : | :@TA |                                  
    | G@/H | S | E:QG |                                  
    | DSTJ | I | HA/T |                                  
    | E:TI | U | Z@/J |         
    | @@/U | # | EA/: |                                  
    | NA/J | D | $AQO |                                  
    | EA/: | R | $@T: |                                  
    | /@/Q | J | MA/C |         
    | @@/U | N | @@/# |         
    | OA/J | F | MA/M |         
    | EA/: | C | P@T: |         
    | :@/U | K | @@/N |         
    | MA/C | T | I@/A |         
    | /:QO | Z | @@TA |         
    | :@TF | L | V:/C |         
    | RA/H | W | I@/N |         
    | MAQO | H | H@/I |         
    | V:TF | Y | EA/: |         
    | :@/J | P | E:QG |                              
    | GA/J | Q | OA/T |                              
    | V:TI | O | DAT: |                              
    | CA/H | B | NS/P |                              
    | J@/I | G | //U# |                              
    | GATN | " | $YP$ |                              
    | IS/# | M | R/// |         
    | E:/M | X | //// |         
    | /@/Q | V | //// |         
    | S:/J | $ | #/// |         
                                                                          
       
    [End]
    
   64  /@  A/H/   
   65  E@  VSTA  Entry for R.C.S/A
   66  @@  /CT/  load accumulator
   67  A@  @C/J  with [/C] int [@C] fract (x=fract, y=int)
   68  :@  /@/:  Entry for R.C.S/B: Printer set figure shift    
   69  S@  G@/H  test accum. if (A>=0) goto 76
   70  I@  DSTJ  
   71  U@  E:TI  
   72  #@  @@/U  
   73  D@  NA/J  
   74  R@  EA/:  
   75  J@  /@/Q  
   76  N@  @@/U  plant x+ in @@
   77  F@  OA/J  get '+' in AM
   78  C@  EA/:  print '+'
   79  K@  :@/U  plant y+- in :@
   80  T@  MA/C  D=10
   81  Z@  /:QO  B7=0
   82  L@  :@TF  AL=-y (int part)
   83  W@  RA/H  if (A>=0) goto    (goto if int part=0)
   84  H@  MAQO  B7=10
   85  Y@  V:TF  AL=//// ///$ AM=$$$$ $$$$
   86  P@  :@/J  AL=//// ///$ AM=y-1
   87  Q@  GA/J  Subs 10^10 from AM, 
   88  O@  V:TI  add 2^35 to AL
   89  B@  CA/H  if (A>=0) goto 87
   90  G@  J@/I  swap AM<->AL
   91  "@  GATN  add 10^10 to AL. AL now contains residue
   92  M@  IS/#  
   93  X@  E:/M  if (A>=0) goto 95
   94  V@  /@/Q  goto 98
   95  $@  S:/J  
   96  /A  EA/:  
   97  EA  /@TB  
   98  @A  :@TA  
   99  AA  :@/N  
  100  :A  :@TA  
  101  SA  E:QG  
  102  IA  HA/T  
  103  UA  Z@/J  
  104  #A  EA/:  
  105  DA  $AQO  
  106  RA  $@T:  
  107  JA  MA/C  
  108  NA  @@/#  
  109  FA  MA/M  
  110  CA  P@T:  
  111  KA  @@/N  
  112  TA  I@/A  
  113  ZA  @@TA  
  114  LA  V:/C  
  115  WA  I@/N  
  116  HA  H@/I  
  117  YA  EA/:  
  118  PA  E:QG  
  119  QA  OA/T  
  120  OA  DAT:  
  121  BA  NS/P  
  122  GA  //U#  const ...
  123  "A  $YP$  ... -10^10
  124  MA  R///  const 10
  125  XA  ////  
  126  VA  ////  
  127  $A  #///  
                 
                 