DataMuseum.dk

Presents historical artifacts from the history of:

RC4000/8000/9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC4000/8000/9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦e3d0a54fb⟧ TextFile

    Length: 8448 (0x2100)
    Types: TextFile
    Names: »gensareatxt«

Derivation

└─⟦621cfb9a2⟧ Bits:30002817 RC8000 Dump tape fra HCØ.  Detaljer om "HC8000" projekt.
    └─⟦0364f57e3⟧ 
        └─⟦this⟧ »gensareatxt« 
└─⟦00964e8f7⟧ Bits:30007478 RC8000 Dump tape fra HCØ.
    └─⟦b2ec5d50f⟧ 
        └─⟦this⟧ »gensareatxt« 

TextFile

\f

; file processor utility program, gensarea               page 1
  
; this is a file processor utility program for    
; the RC4000 installation at H.C.Ørsted Institute,   
; Copenhagen.     
;     
; this installaton has a special command to the   
; operating system, s, which makes it possible to     
; read s-commands from a backing-storage-area.    
;     
; in order to minimize the extra code needed in s,    
; the area must obey a special format.    
;     
; this program, gensarea, reads a text from current   
; input or from a file specified and outputs it   
; on the specified output file in the format  
; required by s.  
;     
; the format is described in the documentation of     
; the change of s.    
;     
; too, this program changes the content-field of  
; the catalog-entry corresponding to the output   
; file. the value set at present is: 100.     
;     
; erik lilholt    
; april, 1973.    
; H.C. Ørsted Institute, Copenhagen   
;     



; entry to the program at the 4.th word:  
;     
s. a10,c20,d10,e10,g2     
w. k=h55  
      
c20: c19, 0             ;length of progrm, 0  
     jl.     a5.        ; entry: goto initialize  
      
; constants, used by program:     
      
c0:  0       ; output name address    
c1:  0       ; input name address or zero (current input)     
c2:  0       ; working cell for register save     
c3:  1<16    ; bit in partial word    
c4=  100     ; content set in catalog entry   
c5=  46      ; simulated em from teletypes    
c6:  0       ; number of characters (total)   
c7=  760     ; max characters allowed (1 segment)     
c8:  0       ; number of characters (in current line)
c9=  70      ; max characters pr. line
      
d0:  <:***gensarea<32><0>:>  ; textconstants  
d1:  <:call<10><0>:>  
d2:  <:param<10><0>:>     
d3:  <:connect input<10><0>:>     
d4:  <:connect output<10><0>:>    
d5:  <:change entry<10><0>:>  
d6:  <:more than one segment not allowed<10><0>:>
d7:  <:line too long<10><0>:>
\f

; file processor utility program, gensarea               page 2
      
; main program    
      
a0:  jl. w3  h25.-2     ; rep: w2:= inchar(current input)     
     rl. w1  c6.  
     al  w1  x1+1       ;   chars total:= chars total+1   
     rs. w1  c6.  
     sl  w1  c7         ;   if chars total>max-chars then   
     jl.     e5.        ;   alarm(<:more than one segment...:>)   
     rl. w1  c8.        ;   chars on line:=
     al  w1  x1+1       ;    chars on line+1
     rs. w1  c8.        ;
     sl  w1  c9         ;   if chars on line>=max on line then
     jl.     e6.        ;   alarm(<:line too long:>
     se  w2  25         ;   if w2=em or   
     sn  w2  10         ;   w2=nl or  
     jl.     a1.        ;     
     sn  w2  c5         ;   w2=simulated em then  
     jl.     a1.        ;   goto end-line     
     al. w1  g0.        ;   outchar(char, output-zone)    
     jl. w3  h26.       ;     
     jl.     a0.        ;   goto rep  
      
a1:  rs. w2  c2.        ; end-line: save w2   
     al  w0  0          ;   chars on line:= 0
     rs. w0  c8.        ;
     al. w1  g0.        ;     
a2:  rl  w0  x1+h2+4    ; next: if partial word.bit16=0 then  
     sz. w0  (c3.)      ;   begin     
     jl.     a3.        ;     
     al  w2  0          ;     outchar(null,output-zone)   
     jl. w3  h26.       ;     
     rl. w2  c6.        ;     chars:= chars+1
     al  w2  x2+1
     rs. w2  c6.
     jl.     a2.        ;     goto next   
                        ;   end;  
      
a3:  al  w2  10         ;   outchar(nl, output-zone)  
     jl. w3  h26.       ;     
     rl. w2  c2.        ;   restore w2    
     se  w2  10         ;   if char=nl then   
     jl.     a4.        ;     
     jl.     a0.        ;   goto rep  
a4:  al  w2  25         ;   close up(em, output-zone)     
     jl. w3  h34.       ;     
     jl. w3  h79.       ;   terminate zone(output-zone)   
      
     al. w1  g2.        ; change entry:   
     rl. w3  c0.        ;     
     jd      1<11+42    ;   lookup entry(name, tail)  
     al  w0  c4         ;   set content   
     hs  w0  x1+16      ;     
     jd      1<11+44    ;   change entry(name, tail)  
     se  w0  0          ;   if result<>0 then     
     jl.     e4.        ;   alarm(<:change entry:>)     
     al  w2  0          ;   ok:= true     
     jl.     h7.        ;   goto end program  
\f

; file processor utility program, gensarea               page 3
      
; initialize program:     
    
a5:  al  w0  x2+2       ;   save address of output name     
     rs. w0  c0.
     bl  w0  x3         ;   check left side in call   
     se  w0  6          ;     
     jl.     e0.        ;     
      
     ba  w3  x3+1       ;   right hand side  
     bl  w0  x3         ;     
     sh  w0  2          ;     
     jl.     a6.        ;     
      
     bl  w0  x3+1       ;   right hand side present.  
     se  w0  10         ;   check text-type   
     jl.     e1.        ;     
     al  w0  x3+2       ;   save start-address of text    
     rs. w0  c1.        ;     
      
     ba  w3  x3+1       ;   check only one parameter.     
     bl  w0  x3         ;     
     sl  w0  4          ;     
     jl.     e1.        ;     
      
; call of program ok.     
; initialize zones    
a6:  al. w1  g0.        ;   w1:= output zone descriptor   
     al. w3  g1.        ;   w3:= share descriptor     
     al  w2  x2-1       ;     
     rs  w2  x1+h0+2    ;   set last of buffer    
     rs  w2  x3+4       ;   set last shared   
     al  w2  x2-511     ;     
     rs  w2  x3+2       ;   set first shared  
     al  w2  x2-1       ;     
     rs  w2  x1+h0+0    ;   set base-buffer area  
     rs  w3  x1+h0+4    ;   set used share,   
     rs  w3  x1+h0+6    ;   first share and   
     rs  w3  x1+h0+8    ;   last share.   
     al  w0  0          ;   give up mask:=
     rs  w0  x1+h2+0    ;   give up action:= 0;
     rs  w0  x1+h2+2    ;
      
     rl. w2  c1.        ;   if right hand side in call then   
     sn  w2  0          ;   begin     
     jl.     a8.        ;     
     jl. w3  h29.-4     ;     stack current input     
     rl. w2  c1.        ;     restore w2  
     jl. w3  h27.-2     ;     connect current input   
     se  w0  0          ;     if result<>0 then   
                        ;     alarm(<:connect input:>)
     jl.     e2.        ;   end   
a8:  rl. w2  c0.        ;     
     al. w1   g0.        ;    
     jl. w3  h28.       ;   connect output    
     se  w0  0          ;   if result<>0 then     
     jl.     e3.        ;   alarm(<:connect output:>)     
      
; end of initialize   
      
     jl.     a0.        ; goto main program.  
\f

; file processor utility program, gensarea               page 4
      
; procedure alarm(text)   
; outputs the text on current output and terminates   
; the program with the ok-bit set to false.   
      
e0:  am      d1-d2      ; text:= <:call:> or  
e1:  am      d2-d3      ;        <:param:> or     
e2:  am      d3-d4      ;        <:connect input:> or     
e3:  am      d4-d5      ;        <:connect output:> or    
e4:  am      d5-d6      ;        <:change entry:> or  
e5:  am      d6-d7      ;        <:more than one segment...:> or
e6:  al. w2  d7.        ;        <:line too long:>
     al. w0  d0.        ;     
     jl. w3  h31.-2     ;   outtext(<:***gensarea:>)  
     al  w0  x2         ;     
     jl. w3  h31.-2     ;   outtext(text)     
; comment: w0 now points to the first word
;          after the text written on current
;          output
;          this is used to destinguish between
;          the two cases: 1)  output has been connected
;          and the document should be released
;          and 2) output has not yet been connected
     al  w2  1          ;   ok:= false
     sh. w0  d5.        ;   if text==output has been connected
     jl.     h7.        ;   then goto end program
     al. w1  g0.        ;   terminate zone(output)
     jl. w3  h79.       ;
     jl.     h7.        ;   goto end program  
      
c19=k-c20     ; length of program     
      
; output zone and share descriptors   
g0=k+h3-h0    
g1=k+h5   
g2=k+h5+h6              ; tail area for lookup entry  
      
e. ; end slang segment    
e. ; end block for fp-names   
      
    ▶EOF◀