A/ROUGHWRITE                          Date. 1.7.51

    Purpose: To write from rough tapes.
             
    Cue: / / / / / / A /  (brings down INITIAL too)

    Principal lines: [/E] = @ L W P
             
    Magnetic Storage: 0R       Electronic Storage: S0
    
    Stores Altered:  AK   :K

    Effects: When a rough tape is read, the punching proper
             is sent to S4 and the destination sequence to AK.
             ROUGHWRITE is then entered by means of the final
             sequence 
			K V S @ / / / / / / A /
			Y
             [:K] is altered in the same way that [$S] is
             altered by the R.C.S. The contents of S4 is 
             then sent to a half track such that if :K/:  
             is subsequently obeyed it would bring the
             content to either S0 or S1 according as
             [AK] is / / / # or / / E #
             Emerge to INPUT

                  
    Library Progs - Bodleian Special Collection 
    MS. Eng. misc. b. 260-C.43.pdf
    p85
    
    [Routine ROUGHWRITE         ] 
    
    [Col /          E     Track 0R]      
                                     
    |      | / | @LWP |                                           
    | VSTA | E | H:/C | 
    | AKTF | @ | AK/F |                                          
    | J:/H | A | K//J |                                          
    | AKT/ | : | MK/A |                                          
    | T/TR | S | XK/: |                                          
    | G:TD | I | :KT/ |                                          
    | @KTJ | U | UKTR |  
    | VKTA | # | MK/S |                                          
    | X:/C | D | MKQO |                                          
    | :K/N | R | /2QT |                                          
    | H:TR | J | :KQB | 
    | VKTJ | N | E:/P | 
    | VKTA | F |      | 
    | $K/: | C |      | 
    | NS/P | K |      | 
    | /T/@ | T |      | 
    | $$E/ | Z |      | 
    |      | L |      | 
    |      | W |      | 
    |      | H |      | 
    |      | Y |      | 
    |      | P |      |                                      
    |      | Q |      |                                      
    |      | O |      |                                      
    |      | B |      |                                      
    |      | G |      |                                      
    |      | " |      |                                      
    |      | M |      | 
    |      | X |      | 
    |      | V |      | 
    |      | $ |      | 
                     
    [End]

    Usage:

	Set the destination sequence in [AK]=//c# tr//
        where c=/ to store S4 in track tr left
              c=E          S4          tr right

        Then set the cue to call the routine in [VS]=//// //A/

        A false cue can be used in destination sequence:

              [AK]=//c# nntk

     
    example session 

        ++INITIAL--
	
	K AK @ ///# V///     storing S4 into track 30L (30=V/), or ...
	K AK @ //E# X///     storing S4 into track 29R (29=X/)

        K nnnn               To fill S4 with new routine to save at destination track

        K VS @ //// //A/     set the cue for ROUGHWRITE
        Y                    call routine via RCS
                             64 short lines in S4 are saved to destination track


Symbolic information for prog on DRUM:

;     =Addr=  Data  Notes

      1   E/  VSTA  Store return link as new cue in [VS]
      2   @/  AKTF  AL=-[AK,:K] = - destination address ///# V/// 
      3   A/  J:/H  if (A>=0) goto 33 (is a false cue)
      4   :/  AKT/  AL=[AK]=destination addr
      5   S/  T/TR  AND with /T/@ $$E/  
      6   I/  G:TD  OR  with //// //#/  addr maginst func for track load
      7   U/  @KTJ  XOR with //// ///#  -> AL=//// V/##
      8   #/  VKTA  [VK,$K]=AL=new cue, A=0
      9   D/  X:/C  D=//T/ ////
     10   R/  :K/N  Shift destination track from :K
     11   J/  H:TR  AND //// //E/
     12   N/  VKTJ  XOR [VK,$K]
     13   F/  VKTA  [VK,$K]=AL=//// V/##
     14   C/  $K/:  exec MagInstr V/## = (tr=30, func=8, tube=4) 
                                  from Tube S4 to Track 30L, 64 short lines

     15   K/  NS/P  return to caller (via return link stored at first instr)
     16   T/  /T/@  base mag instr to access directory
     17   Z/  $$E/ 

     32   /E  @LWP  Principal line: used to form CK value for cue
     33   EE  H:/C  false cue: D=//// //E/. false cue = TTCK NNTK where NN=line in dir, TK=dir track
     34   @E  AK/F  Mult to shift: ///# V//T --> AM= /#V/ /T$$ = CKNN TK$$
     35   AE  K//J  add base mag instr to access directory
     36   :E  MK/A  [MK, XK]= NS/P /T/@  +  /#V/ /T$$ -> [XK] = ///@ = mag instr tr=TK, func=0, tube=1
     37   SE  XK/:  Mag Instr at [XK]: Read from Track TK Left to Tube S1
     38   IE  :KT/  AL=[:K, SK]=NNTK .... from saved destination address
     39   UE  UKTR  AND $$// -> keep first two chars
     40   #E  MK/S  [MK]=NN// -> the entry to take inside directory track
     41   DE  MKQO  B7=[MK]=NN
     42   RE  /@QT  B7=[/@+B7]=[tube S1 + B7]=read into B7 the dir entry NN from tube S1
     43   JE  :KQB  [:K]=B7 save the dir entry -> is the maginstr from dir
     44   NE  E:/P  goto 0002
       
                   