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

⟦6819c9630⟧ TextFile

    Length: 122112 (0x1dd00)
    Types: TextFile
    Names: »ftnpass83tx «

Derivation

└─⟦01e83a425⟧ Bits:30008166 Bånd med SW8010 og SW8500 source code
    └─⟦75ff9bef3⟧ 
        └─⟦this⟧ »ftnpass83tx « 

TextFile

\f

;rc 21.08.72 fortran pass8                    , v.59


\f

;rc 08.05.70 fortran pass8                       page 1
; names , contents and survey




;names , contents and survey:
;a-names: local references witin actions
;b-names: local variabels in actions
;c-names: global entries to actions and subroutines
;d-names: rs entry no
;f-names: global constants and variables
;g-names: base for a table or entry to a table relative to base
;j-names: global variabels

;contents:
; names and contents          p 1
; beginning                   p 3
; code                        p 4
; f-names                     p 18
; interpretation              p 21
; switch to central actions   p 20
; central actions             p 31
; subroutines                 p 22
; main control table          p 44
; continuation table          p 47
; macro instruction table     p 54
; skip instructions table     p 55
; external tab. and label tab.p 56
; descr of labels from doloopsp 57
; use of stack                p 60
; initiation                  p 61


; survey:
;leading bytes from pass 7 is inbyted by next in(interpretation)and the
;corresponding table word in main control table is interpretated and the
;central action refered to in table word is called, this may effect
;call of code sequenses or interpretation of continuation table, macro
;instr. table or skip instr. table.


\f

;rc 18.09.70 fortran pass8                   page 2
;names, contents and survey



;core store






;    !                                                !      !
;    !                                                !      !
;    !                                                !      !
;    !                                      pass 9    !      !
;    !                                   information  !      !
;    !                                                !      !
;    !                                 <--------------!     -!
;    !                                                !      !
;    !                                                !      !
;    !                                                !      !
;    !                                                !      !
;    !                                                !      !
;    !                                                !      !
;    !                                                !      !
;    !                      external  label           !      !
;    !                     !  table ! table           !stack !
;    !                     !------->!----------> <- - !------!
;    !                     !        !                 !      !
;    !                     !        !                 !      !
;    !                     !                                 !
;    !     pass 8 code     !                                 !
;    !---------------------! - - ->                          !
;    !                     !                                 !
;    !                                                       !
;    !                                                       !
;    !>------------------core store------------------------->!


\f

;rc 21.08.72 fortran pass8                       page 3
;beginning




;beginning
k=e0
s. a150, b92, c150, d22, f170, g110, j20;

w. j5            ; length of pass 8
h. j6, 8<1+1     ; entry to pass 8, change direction
w.

e39=512          ;length of segments
j20=-1           ;j20=1 for stacktop output else -1
j0 =1            ;j0=1 for testoutput else -1
j8= 12           ; bytes per external
j9= 12           ;   -    -  commen
j10=18           ;   -    -  zonecommen
j11= 2           ;   -    -  global
j13=28           ; length of entry in init catalog
j7=511           ; no of label 0

d0=  53          ; rs goto point
d1=  13          ; rs last used
d2=  3           ; rs reserve
d3=  12          ; rs uv1
d4=  9           ; rs init zones
d5=  29          ; rs param alarm   (starray)
d6=  17          ; rs index alarm   (chlower)
d7=  17          ; rs zone alarm   (zreck)
d8=  18          ; rs zone index   (zindex)
d9=  18          ; rs no of zones alarm  (chzone)
d10= 48          ; rs take expression
d11= 52          ; rs alarm, undef label, segment, (labvarlist)
d13= 49          ; rs dr1
d14= 50          ; rs dr3
d15= 20          ; rs syntax
d16= 51          ; rs uv0
d17= 25          ; rs mult alarm
d21=150          ; first fortran special rsno (see also pass7, pass9)
d22= 22          ; number of fortran special rsno (see also pass7)
d18=d21+d22-1    ; last rsno
d19= 8            ; rs end addr expression
d20= 10           ; rs release zones


\f

;rc 09.08.71 fortran pass8                       page 4
;code






;code
;code sequenses jumped to from main table or continue table
;return to tab by f2.

c119:                  ; gloentry
      al  w1     a106  ; out segment, store return
      am         1000  ; stepping stone
      hs. w1     j17.  ;
      jl.        c110. ;
a107: al  w0    1      ;
      rs. w0    f39.   ; boolean for not program
      rl. w1    f35.   ;
      al  w1 x1+2      ;
      rs. w1     f35.  ; change in order to stop by sl-instr
      al  w1  x1-6     ; 4 empty words
      rs. w1    f13.   ; f13:=a:init catalog byte0, decreased for every entry
      rl. w1    f155.  ;
      al. w1 x1+c0.    ; upper limmit for catalog
      rs. w1    f40.   ;
      rl. w1    e9.+4  ; unit pointer:=stack bottom
      al  w1  x1+1     ;
      rs. w1    f66.   ;
      jl. w3    e2.    ; inbyte no of bytes in global list
a100:                  ; unit:
      bl. w1   (f66.)  ; w1:=no of entries
      wm. w1   f143.   ; w1:=appetite
      ac  w1 x1        ;
      rs. w1     f71.  ; f71:=  chain to main, changed for every entry
      wa. w1    f13.   ;
      sh. w1   (f40.)  ; if not room
      jl.       b23.   ; then goto stack error
      bl. w1   (f66.)  ;
      ls  w1    1      ;
      ac  w1  x1       ;
      wa. w1     f66.  ;
      rs. w1    f66.   ; change pointer ,f66:=a:last entry rel
      al  w1  x1-2     ;
      rs. w1     f64.  ; f64:=a:program rel,changed to a:entry seg,rel
      bl  w1 x1-1      ;
      ls  w1    12     ;
      rs. w1    f73.   ; save programseg, 0
a101:                  ; loop: for every shared entry
      rl. w1     f71.  ; f71= chain to main
      al  w1  x1+j13   ;
      sl  w1     0     ;
      jl.        a103. ; goto main entry
      rs. w1     f71.  ;
      jl. w3     a102. ; goto commen for main and shared
      al  w0     0     ; w1=a:init catalog
      rs  w0  x1+6     ; fill byte 6,7
      hs  w0  x1+23    ; fill byte 23
      rl. w0     f71.  ;
      rs  w0  x1+24    ; fill byte 24,25
      jl.        a101. ; goto loop
\f

;rc 09.08.71 fortran pass8                         page 5
;code


a103: jl. w3    a102.  ; store common for main and shared
      rl. w3    f64.   ; main entry:  
      bl  w3 x3+1      ; w3:=funitseg
      bs. w3    f73.   ;
      al  w3 x3+1      ; x1=a: init catalog
      hs  w3 x1+24     ; fill byte 24
      ba. w3    f73.   ;
      rl. w2    f66.   ;
      bs  w3 x2-5      ;
      rs  w3 x1+6      ; fill byte 6,7
      bl  w3 x2-4      ;
      hs  w3 x1+23     ; fill byte 23
      rl. w1    f66.   ;finish unit:
      al  w1 x1-6      ;
      rs. w1     f66.  ; f66=a:no of entries
      sl. w1    (f35.) ;
      jl.        a100. ;goto unit
      rl. w3     e9.+4 ;if stackpointer=stacktop
      rl. w1     f39.  ;then finish
      rs  w1  x3       ;w3=last byte of pass:=
      rl. w1     f13.  ; 0 if program else 1
      rs  w1  x3-4     ;
      rs  w1  x3-2     ; save ref to 1th main
      jl.       (f2.)  ;return
a102:                  ;common for main and shared:
      rs. w3     b56.  ;save return
      rl. w1     f64.  ;
      al  w1  x1+2     ;
      rs. w1     f64.  ; f64:=a:entry point seg,rel
j15=k+1                ;
      al  w0     0     ;j13 is stored as operand
      al  w1     j13   ;
      hs. w1     j15.  ;
      ac  w1  x1       ;
      wa. w1     f13.  ;
      rs. w1     f13.  ; ffirst:=ffirst-length
      rs  w0  x1       ;fill byte 0,1
      al  w0     0     ;
      rs  w0  x1+2     ;fill byte 2,3,4,5,25
      rs  w0  x1+4     ;
      hs  w0  x1+25    ;
a104: jl. w3     e2.   ;loop:  inbyte
j16=k+1                ;
      hs  w2  x1+21    ;operand=21,...8
      bl. w3     j16.  ;fill byte 21,...8
      al  w3  x3-1     ;
a114: hs. w3     j16.  ;
      sn  w3     17    ;
      jl.        a105. ;examine byte 18 and skip 16 and 17
      se  w3     7     ;
      jl.        a104. ;goto loop
      al  w3     21    ;after loop
      hs. w3     j16.  ;
      rl. w0    (f64.) ;w1:=entry seg, rel
      ws. w0     f73.  ;seg rel to programseg
      rs  w0  x1+16    ;fill byte 16,17
      al  w0     8     ;
      hs  w0  x1+22    ;fill byte 22
      jl.       (b56.) ;return to main or shared entry
\f

;rc 06.11.71 fortran pass8                    page 6
;code




b56:             0     ;saved return
a105: al  w0     0     ;examine kind = w2
      sn. w2    (f152.);
      rs. w0     f39.  ;if program then store 0
      al  w3  x3-2     ;
      jl.        a114. ;goto loop

c23:                   ;dataexist
      al  w0     2     ;
      rs. w0     f67.  ;dataexist:=2 for appetite
      jl.       (f2.)  ;return

c26:                   ;entryvalue
      jl. w3     e2.   ;w2:=inbyted no of entries
      rs. w2     f68.  ;save no of entries
      al  w2  x2-1     ;
      ls  w2     1     ;
      rs. w2     f71.  ;store w2=bytes for entry points
      wa. w2     f67.  ;
      se  w2     0     ;
      jl.       (f2.)  ;
      al  w2     g60   ; if no data and main only
      rs. w2     f0.   ;
      jl.       (f2.)  ;
c25:                   ; check appetite and store entrypoints
a26:  rl. w2     f71.  ; rep:
      wa. w2     f67.  ;add 2 if dataexist
      al  w2  x2+2     ;w2:=appetite for points and instr
      sl. w2    (f98.) ;
      jl.        a35.  ; if to many entries
      jl. w3     c97.  ;goto test and change
      jl.        a26.  ;goto rep if change
      rl. w0     f67.  ;
      se  w0     0     ;if dataexist then
      jl.        a27.  ;goto code for data point
a31:  rl. w1     f26.  ;
      rl  w0  x1+2     ; w0:=last point
      ws. w1     f71.  ;
      al  w1  x1+2     ;
                       ; update next point=f26 and do half down if nec.
      jl. w3     a45.  ;
      al  w2     0     ; f26=point no 0 ie. point before entry 1
a28:  sl. w2(f71.) ;loop:store one point
      jl.        a29.  ;goto after loop
      al  w2  x2+2     ;
      jl. w3     c87.  ;w0:=segno, rel from stack
      ws. w0     f24.  ;w0:=rel segno, rel
      wa. w0     f85.  ;add point key
      am.       (f26.) ;
      rs  w0  x2       ; store point
      jl.        a28.  ;goto loop
a29:                   ;after loop
    h.al  w2 ,rl w1 x1 ;
    w.hs. w2     f1.   ;instr:=rl w1 x1
      rl. w1     f26.  ;
      ws. w1     f23.  ;w1:=point preceeding entry
                       ;points rel to point base
      jl.        f136. ;goto action 0 to store instr
c112: rl. w1     f68.  ; goto next if no of entries-1+data=0
      wa. w1     f67.  ;
      se  w1     1     ;
      jl.       (f2.)  ; return to tab
      jl.        c0.   ; next in

\f

;rc 26.10.70 fortran pass8                       page 7
;code





a27:  jl. w3     c85.  ;datapoint:goto inrease
                       ;labelno and init
      rl. w2     f90.  ;increase no of globals
      al  w2  x2+1     ;
      rs. w2     f90.  ;
      hs  w2  x1-1     ;store globalno in labeltab
      ls  w2     12    ;
      wa. w2     f86.  ;add key for point
      al  w0  x2       ;w0:=point
      rl. w1     f26.  ;
      jl. w3     a45.  ; store point
      jl.        a31.  ;goto loop store point
                       ;
c24:  bl. w0     f38.  ;switch to continiation, table
      hs. w0     f13.  ;
      rl. w1     f68.  ;wo=-s:entryvalue
      al  w1  x1-1     ;
      rs. w1     f71.  ;save no of entries -1
      rl. w2     f0.   ;
      sh  w1     0     ;
      al  w2     g41   ; change return to tab for main entry only
      sn  w0     0     ;
      al  w2     g39   ;change return for subroutine
      rs. w2     f0.   ;
      se  w0     0     ;
      jl.       (f2.)  ;return to tab
a33:  sn  w1     0     ;loop:for inbyte zeroes
      jl.       (f2.)  ;return to tab
      al  w1  x1-1     ;
      jl. w3     e2.   ;inbyte
      jl.        a33.  ;goto loop
                       ;
c18:                   ;get and check appetite,
    h.al  w1,ba w0 x1  ;store ba instr and a:entry values
    w.hs. w1     f1.   ;
a32:  rl. w2     f68.  ;rep:
      al  w2  x2+3     ;1 for round, 2 for bl instr
      jl. w3     c97.  ;goto test and change
      jl.        a32.  ;goto rep if change
      rl. w1     f68.  ; x1=no of values
      al  w2     2     ;
      rs. w2     f64.  ; length of constant
      jl.        a76.  ;
a34:  al  w1  x2       ; loop:
      jl. w3     e2.   ; inbyte  -s:value
      hs. w2     f13.  ;
a76:  al  w2  x1-1     ; entry 1th loop
      sh  w2     0     ;
      jl.        a77.  ; goto after loop
      rs. w1     f73.  ; save no of  s:value  to be inbyted
      jl. w3     e2.   ;
      hs. w2     f38.  ;
a77:  rl. w2     f14.  ;

\f

;rc 78.03.02 fortran pass8                       page 8
;code
      al  w2  x2+2     ;
      rs. w2     b20.  ; store claimed  a:constant
      jl. w3     c93.  ; store constant
      rl. w2     f73.  ;
      al  w2  x2-2     ;
      rs. w2     f73.  ;
      sl  w2     1     ;
      jl.        a34.  ; goto loop
      ws. w1     f68.  ;
      so  w1     2.1   ;
      al  w1  x1+1     ; add 1 if even no
      jl.        f136. ; goto action 0
a35:  jl.        b23.  ; error:to many entries  <-----------

                       ;entry point

c22:  rl. w2     f68.  ;check appetite, rep:
      ls  w2     1     ;
      wa. w2     f67.  ;w2:=appetite for start instr.
      rs. w2     f71.  ;save bytes for am instr.
      al  w2  x2+4     ; save space for extlist:date and time
      jl. w3     c97.  ;goto test and change
      jl.        c22.  ;goto rep if change
      jl. w3     c87.  ; w0:=funitseg.,rel
      rl. w1     f68.  ;
      hs  w1     1     ; w0:=funitseg., no of entries
      jl.        c47.  ; stack and return
                       ;
c21:  rl. w1     f71.  ;count am instr.
      al  w1  x1-2     ;
      rs. w1     f71.  ;
      sh  w1     0     ;
      jl.        a142. ;goto next in
      al  w0     g37   ;
      rs. w0     f0.   ;
      jl.       (f2.)  ;
a142: rl. w1     f67.  ;
      se  w1     2     ;
      jl.        c0.   ;
      jl.       (f2.)  ; if data then return to tab
c10:  rl. w1     f67.  ; data jump to after formal
      sn  w1     0     ;
      jl.        a79.  ;
      rl. w1     f68.  ;
      jl.        c9.   ; store operand in skip instr
a79:  al  w2     g61   ; no data:
      rs. w2     f0.   ;
      jl. w3     c87.  ; unstack label in declarations
      jl.       (f2.)  ;

c20:                   ;labvarlist
      jl. w3     e2.   ;inbyte and store no of labels
      sn  w2     0     ;
      jl.        c0.   ; if emty list goto interprete next
      rs. w2     f71.  ;
      al  w0     d11   ; stack:=rsalarm+no of externals
      wa. w0     f78.  ;
      ws. w0     f80.  ;
      jl. w3     c86.  ;
c41:  rl. w2     f71.  ;
      al  w2  x2-1     ;
      al  w0     g56   ;
      sl  w2     0     ;if no of remaining labels>0 then
      rs. w0     f0.   ;repeat table word
a40:  rs. w2     f71.  ;store remaining no of labels
      jl.       (f2.)  ;return

\f

; fgs 1985.08.22 fortran pass8                       page 9
;code





c17:                   ;cominit
      al. w1     b33.  ;change operand type to
      rs. w1     f66.  ; commonaddr.
      jl.       (f2.)  ;

c12:                   ;complist
      rl. w1     f13.  ;appetite:=6 x  no labels +2
      rs. w1     f71.  ;
      wm. w1     f154. ;
a56:  al  w2  x1+2     ;rep:
      am.       (f98.) ;
      sh  w2    -16    ; if appetite > usable part of segs - 16 then
      jl.        a58.  ; begin
      al. w1     b76.  ;   alarm (out, <:too many labels in comp goto:>;
      jl.        e5.   ; end;
a58:  jl. w3     c97.  ; goto test and change;

      jl.        a56.  ;goto rep if change
      al  w1     1     ; boolean true
      jl.        a59.  ; store boolean and return

c46:  rl. w1     f71.  ;w1=remaining labels
      al  w1  x1-1     ;
      sh  w1     0     ;
      jl.        a59.  ;
      rs. w1     f71.  ;
      al  w1     g57   ;repeat table word
      rs. w1     f0.   ;
      jl.       (f2.)  ;return
a59:  rs. w1     f97.  ;boolean false for end complist or true for complist
      jl.       (f2.)  ;return

b76:  <:too many labels in computed goto<0>:>

c29:                   ;label
      jl. w3     e2.   ;w2:=inbyted labelno
a67:  jl. w3     c83.  ;goto declare and  store label, entry
b74:  rl. w1     f77.  ; return for label, end format, new line:
      se  w1     1     ;
      jl.       (f2.)  ; if not format return to tab
a121: jl. w3     e2.   ; else inbyte
      al. w1     a140. ; change  return
      rs. w1     f2.   ;
      se  w2     g84   ;
      sn  w2     g105  ;
      jl.        c140. ;
      al  w1     0     ;
      rs. w1     f77.  ;
      rs. w2     b73.  ; save inbyte
      jl.        a99.  ; goto a.20 to store goto, w1=0
b73:             0     ; saved inbyte
a140: rl. w2     b73.  ; get byte
      jl.        c140. ; interprete

c11:                   ; zoneinit
      rl. w1     f13.  ; w1:=no of zones
      rl. w0     f0.   ;
      se  w1     0     ;
      al  w0     g70   ;
      rs. w0     f0.   ;
      jl.       (f2.)  ; else return to tab

\f

;rc 78.05.16 fortran pass8                       page 11
;code

c33:  jl. w3     c87.  ; save stack
      rs. w0     f73.  ;
      jl.       (f2.)  ;

c34:  rl. w0     f73.  ; stack saved stack
c47:                   ; stack and return
      jl. w3     c86.  ;
      jl.       (f2.)  ;

\f

;rc 78.05.16 fortran pass8                       page 12
;code



c38:                   ; xxchange:
; exchanges two labels in the stack
; (used for intermixing  <goforw>  and  <gobackw> )
     jl. w3     c87.   ;
     rl  w2     0      ;   unstack (lab1);
     jl. w3     c87.   ;   unstack (lab2);
     rx  w2     0      ;
     jl. w3     c86.   ;   stack (lab1);
     al  w0  x2        ;
     jl. w3     c86.   ;   stack (lab2);
     jl.       (f2.)   ;   return;


c39:                   ; xxbackw:
; the stacktop contains a labelno to be declared with the current pos
     jl. w3     c87.   ;
     rl  w2     0      ;   unstack (labelno);
     jl. w3     c83.   ;   declare and store label (labelno);
     jl.       (f2.)   ;   return;


c40:                   ; gobackw:
; the action should resemble action 22, with a non-decl label.
; the labelno is stacked
     rs. w1     f74.   ;   skip instruction := false;
     rl. w1     f2.    ;
     rs. w1     f20.   ;   save return;
     jl. w3     c85.   ;   increase labelno and init;
     al  w0  x2        ;
     jl. w3     c86.   ;   stack (labelno);
am 2047
     jl.        b92.   ;   goto action 22;


c42:                   ; store whole instruction:
     rl. w2     f0.    ;
     al  w2  x2-2      ;   decrease (table pointer);
     rs. w2     f0.    ;
     am         1000   ;
     wa. w1  x2+g86.   ;   f1 := word (table pointer) + w1;
     rs. w1     f1.    ;   (w1 rigth = address part)
     jl.        c55.   ;   goto action 10;


c43:                   ; prepare dogoforw:
     rl. w1     f13.   ;
     am         2000   ;   save opand-byte in
     hs. w1     b86.   ;     skip instruction;
     jl.       (f2.)   ;   return;

\f

;rc 78.05.16 fortran pass8                       page 13
;code




c15:  ac. w1    (f13.) ;sub, called from macro
      rs. w1     f13.  ;
      rl. w2     b54.  ;
      al  w2  x2-2     ;
      jl.        c102. ;

c111:                  ; funit 7
      jl. w3     e2.   ; inbyte no of externals
      al  w1  x2       ;
      jl. w3     e2.   ; inbyte and store no of globals
      rs. w2     f80.  ;
      wa  w2     2     ; add reg1
      rs. w2     f78.  ; store no of globals+externals
      jl. w3     e2.   ; inbyte and store no of labels
      rs. w2     f79.  ;
      jl. w3     e2.   ;
      jl. w3     e2.   ; inbyte and store  -stacksize
      hs. w2     f137. ;
      jl. w3     e2.   ;
      hs. w2     f70.  ;
      rl. w2     f70.  ;
      al  w2  x2-1     ;
      rs. w2     f70.  ;
      jl. w3     e2.   ; inbyte and store size param area
      rs. w2     f157. ;
\f

;rc 17.11.70 fortran pass8                    page 14
;code




      al  w0     1     ;
      rs. w0     f90.  ; actual globalno
      al  w0     0     ;
      rs. w0     f67.  ; boolean false for data
j12=k+1                ;
      se  w0     0     ; if not 1th funit
      jl. w3     a95.  ;
      al  w0     0     ;
      al  w1  x1+d18   ; no of externals + rs entries
      rl. w2     f89.  ; w2:=start of ext. tab
a109: sn  w1     0     ; ext loop:  w1=no of remaining externals
      jl.        a110. ; goto after loop
      al  w2  x2+2     ;
      al  w1  x1-1     ;
      rs  w0  x2       ; zero in ext.word
      jl.        a109. ; goto ext.loop;
a110: rs. w2     f91.  ; w2:=start of lab tab
      rs. w2     f33.  ; stacklimit=last byte of lab tab
      al  w2     511   ;
      hs. w2     j12.  ;
      rs. w2     f94.  ;
a80:                   ; loop: increase labno and init
      sn. w2    (f79.) ;
      jl.       (f2.)  ; return
      jl. w3     c85.  ; w2:=labelno
      jl.        a80.  ; goto loop

a95:  al  w0     3     ;
      hs. w0     j4.   ; store in segment change
      jl.        c100. ; goto segment change. return
                       ;    to funit

c113:                  ; dataentry
      rl. w2     f94.  ; w2:=labelno
      jl.        a67.  ; goto declare label and return

c115:                  ;comzones
      jl. w3     c85.  ;increase labelno and init tab
      rl. w1     f67.  ;w1:=2 if data exist
      jl. w3     c82.  ;w0:= segno, rel
      sn  w1     2     ;
      jl. w3     c87.  ;if data exist then w0 from stack
      rl. w3     f33.  ;w3:= last byte of label table
      rs  w0  x3-2     ;
      al  w0     1     ;
      hs  w0  x3-1     ;store globalno=1 in table
      jl. w3     c82.  ;declare code start in w0
      rs. w0     f70.  ;
      al  w1     0     ;
      hs. w1     f156. ; save programseg,0
      jl. w3     c86.  ;stack code start
a98:  al  w2     4     ;creation time: rep:
      jl. w3     c114. ;goto extest and change, appetite=4 bytes
      jl.        a98.  ;goto rep if change
      rl. w1     f151. ;
      jl.        a123. ;store creation time, return to tab.
                       ;
c117: rl. w1     f150. ;
a123: rs. w1     f1.   ;
      jl.        c94.  ;store creation date and time, return to tab
\f

;rc 24.09.70 fortran pass8                    page 15
;code





c116:                  ;unit
      al  w2     4     ;rep: appetite
      jl. w3     c114. ;goto extest and change
      jl.        c116. ;goto rep if change
      rl. w1     f141. ;
      rl. w0     f142. ;
a125: hs. w1     f1.   ;
      hs. w0     f37.  ;store no of commens,
      jl.        c94.  ;   no of zone commens
c118: rl. w1     f80.  ;
      rl. w0     f140. ;
      jl.        a125. ; store no of globals,no of externals

c120:                  ; end pass
      bl. w1     j2.   ; pass inf1=no of max lines per block
      rs. w1     e9.   ; pass inf2=no of half-up and -downs
      jl.        e7.   ; goto end pass

c122:                  ; point w01
      rl. w2     f13.  ; w2:=paramno
      ls  w2     2     ;
      hs. w2     f13.  ;
      jl. w3     c87.  ; w0:=stacktop
      rs. w0     b42.  ; save in action 20
      bl  w2     1     ;  w2:=rel
      al  w2  x2+1     ;
      hs. w2     f38.  ; litt2:=paramno*4,  rel+1
      jl.       (f2.)  ; return to tab.
c121: hs. w1     j19.  ; j19:=0 or 2
      jl.       (f2.)  ; return to tab

c125:                  ; suite
      jl. w3     e2.   ; inbyte 0,1,2or 3, 3 for drstore
      hs. w2     b62.  ; store in databack
      se  w2     3     ;
      jl.        c0.   ; goto next in if not drstore
      jl.       (f2.)  ;

c124:                  ; databack
b62=k+1                ;
      al  w0     0     ; operand is placed by suite
      al  w1     g79   ;
      sn  w0     3     ;
      rs. w1     f0.   ;
      jl.       (f2.)  ;
\f

;rc 78.05.08 fortran pass8                    page 16
;code





                       ; appetite amodify:
c134: al  w2     2     ;
      rx. w2     f158. ;
      rs. w2     f159. ; save appetite
      sn  w2     2     ;
      jl.       (f2.)  ; return to tab if not modifier
     wa  w1     4     ;
a129: al  w2  x1       ; rep:
      jl. w3     c97.  ; go test and change
      jl.        a129. ; goto rep if change
      jl.       (f2.)  ; return to tab
c135: rl. w2     f159. ;
      rs. w2     f158. ; get saved appetite
      jl.       (f2.)  ; return to tab

c129:                  ; contform
      jl. w3     e2.   ;
      hs. w2     f37.  ;
      jl. w3     e2.   ;
      hs. w2     f1.   ;
a116: al  w2     2     ; appetite, store instr:
      jl. w3     c97.  ; goto test and change
      jl.        a117. ; goto after change and rep if change
      jl.        c94.  ; store instr and return
a117:                  ; after change:
      jl. w3     c136. ; store instr=format cont. to next segment
      rl. w2     f73.  ; return
      rs. w2     f1.   ; store saved bytes
      jl.        a116. ;

c131:                  ; endform
    h.al  w1 ,15<8+3   ;
    w.hs. w1     f131. ;
      jl. w3     c82.  ;  w0:=segno,rel
      rl. w1     f77.  ;
      se  w1     1     ;
      jl. w3     c86.  ; if 1th format stack a:last instr
      al  w1     1     ;
      rs. w1     f77.  ; boolean:=1 for format
      jl. w3     e2.   ;
      hs. w2     f138. ; f131:=15<20+2<12+no of words
      jl. w3     e2.   ;
      hs. w2     f139. ; f132:=15<20+5<12+stacklength
      jl.       (f2.)  ; return
\f

;rc 77.10.31 fortran pass8                   page 17
;code





c132:                  ; begform closed(and open)
      am         2     ; store f132
      rl. w1     f131. ;  entry,  store f131
      rs. w1     f1.   ;
      jl.        a116. ; goto contform to store and appetite and return

c130:                  ; begform closed
    h.al w1 , 15<8+2   ;
    w.hs. w1     f131. ;
      jl.        (f2.) ;

c133:                  ; amodify
      rl. w1     f13.  ;
      al  w0     4     ;
     bl  w3     3      ; if integer < -2048 or integer >= 2048 then
     se  w3  x1        ;
      jl.        a126. ; index 2 bytes
a127: rs. w0    f158. ; store appetite=4 or 8
      al. w1     b29.  ;
      rs. w1     f66.  ; store operand type=byte
      al  w1     1     ;
      rs. w1     f64.  ;
      jl. w3     e2.   ; inbyte opx2i
      jl. w3     e2.   ; inbyte <-s: >
      am         2000  ; stepping stone
      hs. w2     b63.  ;
      jl.        c0.   ; goto next in

a126: al  w0     8     ; index 2 bytes: appetite=8
      al  w1     0     ;
      rx. w1     f13.  ; const=0
      rs. w1     f160. ; saved index
      jl.        a127. ;

a128: rl. w1     f158. ;  w1:=appetite; entry from a.0 if appetite>2
      al  w2     g91   ;
      se  w1     4     ;
      al  w2     g92   ;
      al  w1     2     ;
      rs. w1     f158. ;
      jl.        c1.   ; goto interprete w2

c139: bl. w0     j19.  ; if j19<>0 then get w3:=next stack
      al  w1     g107  ;
      sn  w0     0     ;
      rs. w1     f0.   ;
      jl.       (f2.)  ;

c137:                  ; locinit
      rl. w1     f13.  ;
      wa. w1     f70.  ;
      al  w1  x1+1     ; array base=displ-stacksize+1+param area
      wa. w1     f157. ;
      rs. w1     f13.  ;
      jl.       (f2.)  ;

c106:                  ; pass7
      jl. w3     e2.   ; inbyte segment type
      hs. w2     j3.   ; store in segment change routine
      rl. w3     f2.   ; set return address
      rs. w3     b24.  ;
      jl.        c142. ; goto segment change routine

c141:                  ; trouble operand
      jl. w3     e2.   ; inbyte errous operand description
      jl.       (f2.)  ; return
\f

;rc 09.08.71 fortran pass8                         page17a
;code


;subroutines for speciel actions
b57:  rl. w0     b42.  ; get absword:=key+rel seg
      ws. w0     f24.  ;
      hl. w0     f117. ;
      wa. w0     f83.  ;
      jl      x3       ;
b61:  bl. w2     b71.  ;
      se  w2     0     ;if globalno=0 get next globalno
      jl      x3       ;
      rl. w2     f90.  ;
      al  w2  x2+1     ;
      rs. w2     f90.  ; increase no of globals
      hs. w2     b71.  ;
      rl. w1     b71.  ;
      rs. w1   (b72.) ; store globalno in labeltable
      jl      x3       ; return
b60:  al  w2  x2-j7    ; get tablewords to w01 for label no w2
      ls  w2     2     ;
      wa. w2     f91.  ;
      dl  w1  x2       ;
      ds. w1     b71.  ;
      rs. w2     b72.  ;
      jl      x3       ; return



\f

;rc 24.11.70 fortran pass8                       page 18
;f names



;f names
;global constants and working locations
;f0-f36 almost as algol pass8

f0:  0           ;table pointer to main, continue and macro table
f1:  0           ;instruction being assembled
f37=f1+1         ;
f2:  0           ;return address from central actions and store instr.

f7:  0           ;top instr, a:next instr. on segment
f13: 0, 0, 0, 0  ;constants, max 8 bytes, latest constant input;  init catalog
f38=f13+1        ;
f39=f13+4        ;
f40=f13+6        ;
f14: 0           ;lastconst., a:last const. on segment
f15: 0           ;segment base, a:byte 0 on segment
f20: 0           ;saved f2
f23: 0           ;pointbase, a: first const and 0th point
f26: 0           ;must be f23+2, a: next point on segment
f24: 0<12        ;current segment, 0. cur. seg =-1.-2..
f117=f24+1       ;
f25: 0           ;last absw., a: last absvord on segment
f27: 0           ;line block, a: next instr. where line inf. is to be packed
f28: 0           ;prev line, line count of previous lineblock
f29: 0           ;line alarm, a: doubleword where line inf is packed
f31: 1<22-1      ;mask, used by set modifier.
f32: 23          ;used by set modifier
f33: 0           ;stack limit, a: last byte used for labels and globals
f35: 0           ;stack top, a: first free stack word
f36: 0           ;smallest top, smallest stack top yet used

f64: 0           ;length of litteral; no of elementbytes in extlists; init catalog
f66: 0           ;operand type, a: operand handling of action 0; extlists; init catalog
f69=f66+1        ;f66 must be f64+2
f65: 0           ;wmx part of operand, 0; init catalog
f67: 0           ;:=2 by dataexist,:=0 by funit 7
f68: 0           ; no of entries
f70: 0           ;- stacksize, got from start of unit; 1 code segment,0
f71: 0           ;local variabel for counting
f72=f71+1        ;
f73: 0           ;local for saving
f74: 0           ;:=2 if skip instr else =0
f75: 0           ;no of skipinstr
f76: -1          ;all ones
f77: 0           ;1 for store formats, else 0
f78: 0           ;no of globals and externals
f79: 0           ;no of labels, got from start unit
f80: 0           ;no of globals, got from start unit
f81:             ;key for absword, external/global
f82:             ;key for absword, rs-entry
f86: 0           ;key for point, external/global/rs-seg.
f83:             ;key for absword, later local label
f84:             ;key for absword, common area
f85: 1<23        ;key for point, later local label/entry points
f89: j8          ; byte preceeding ext.table
f90: 1           ;last used globalno, =1,2,;1 is reserved for datapoint
f91: j8          ;byte preceeding labeltabel
f92: 0           ;0 for do and 1 for implied do
f93: -1<12       ;one in 12 first bits, used by goafter
f94: 0           ;no of last label and global (p1)
f95: 0           ;no of next global to be declared,doloops  (p2)

\f

;rc 78.04.13 fortran pass8                       page 19
;f names



f96:             ; 2 doublewords for rs entry table,bit=1 for segment
1<22+1<21+1<11+1<10+1<9+1<8+1<7;no 48,...,25
      1<8+1<1+1  ;           no 24,...,1
      -1         ;           no 96,...,73
      -1<12+1<3  ;           no 72,...,49
f97: 0           ;=1 during complist else 0
f98: -8          ;useable part of segment, start of run adds e39
f100:            ; rs segment table,bit=1 for operands,0 for procedures
      -1         ; rs no 48,...,25
      -1-(:1<8:) ; rs no 24,...,1
1<23+1<22+1<21+1<20+1<19+1<18+1<17+1<16+1<11+1<5+1<4+1<3+1<2;
                 ; rs no 96,...,73
           0     ; rs no 72,...,49

f101:jl.     0   ;goto
f102:rl w3 x2-2  ; last used
f106:am     ()   ;used by ls, ld, sh, sl . . .
f107:jl w3 x3+0   ;goto
f108:rl.w3  ()   ;goto
f110:aw.         ;action 0
f111:aw     ()   ;action 0
f114:jl   x3+0   ;segment change, operand is stored
f116:rl w1       ;

f130= j7         ;0th label
f131:15<20+3<12+0;beginformat open,changed by closed
f132:15<20+5<12+0;beginformat,f132must be f131+2
f138=f131+1      ;
f139=f132+1      ;
f134:  2.1111    ;mask used by action 6
f135: jl.   e2.  ; inbyte, stepping stone
f136: jl.   b31. ; goto action 0, stepping stone
f137=f70+1       ;
f140:       0    ; no of externals
f141:       0    ; no of commens
f142:       0    ; no of zonecommens
f143:       j13  ; no of bytes per entry
f150:       0    ; date*10 000 +monts*100 +year
f151:       0    ; hours*100+minute
f152:      1<11  ;

b23:  al. w1     e10.  ; alarm(<:stack:>);
      jl.        e5.   ;
b54:             0     ; saved table pointer for a:58
f153: jl.   e8.  ; out segment, stepping stone
f154:       6    ; complist
f155:        g9  ; gloentry
f156=f70+1       ;
f157:  0         ; size param area, got from start unit
f158:     2      ; appetite used by action0
f159:     2      ; saved appetite used be drload,drstore
f160:     0      ; saved index, amodify
f161: jl. a107.  ; stepping stone for gloentry
f162:     h5     ; size of zone descriptor
f163: f.  -1.0 w.; (for truncate real to integer)
f164: f.   0.5 w.; (for truncate real to integer)

\f

;rc 04.11.70 fortran pass8                       page 20
;switch





;switch
;switches to central action=bit 18-23 of table word from main or continue
;table, by interpreter

b0:           ; switch to central actions
    jl. c50.  ; 0: store instruction and operands
    jl. c51.  ; 2: goto special code
    jl. c52.  ; 4: store instr, inbyte rs entryno, store absword and ref
    jl. c53.  ; 6: inbyte and store bytes, wmx part, 0-addr.
    jl. c54.  ; 8: rs entryno from tab, store instr, ref and absw.
    jl. c55.  ; 10: store instr., wmx, and constant operand
    jl. c56.  ; 12: inbyte and stack word or byte
    jl. c57.  ; 14: do nothing
    jl. c58.  ; 16: check free bytes and contin. impl.
    jl. c59.  ; 18: check free bytes, store next instr, store skip
a99:jl. c60.  ; 20: store goto, get segno, rel from stacktop
    jl. c61.  ; 22: store goto, inbyte labelno
    jl. c62.  ; 24: store goto, unstack labelno
    jl. c63.  ; 26: externalno from stack, store instr, point and ref
    jl. c64.  ; 28: store instr,absw.  seg rel from a:20
    jl. c65.  ; 30: goto external, inbyte ext.no.
    jl. c66.  ; 32: store instr,point. labelno. from stack
    jl. c67.  ; 34: store instr,absword for inbyted extno(perm core)
    jl. c68.  ; 36: store const in f13, addr and length=2 from tab
    jl. c69.  ; 38: as 0, modify if necessary
    jl. c70.  ; 40: as 8, rs=d0  
    jl. c71.  ; 42: as 8, rs=d13
    jl. c72.  ; 44: as8, rs=d14
    jl. c73.  ; 46: read and send ext lists
    jl. c74.  ;
    jl. c75.  ; 50: as 20, with skip instr no = bit 0-1
    jl. c76.  ; 52: as 22,   - -
    jl. c77.  ; 54: as 24,   - -
    jl. c78.  ; 56: stack actuel segno, rel
a75:jl. c79.  ; 58: macroalgoritmes
    jl. c80.  ; 60: store inst, wmx, const.op. and inbyted op.
    jl. c81.  ; 62: store byte = bit 0-11  as opx0

\f

;rc 26.10.70 fortran pass8                       page 21
;interpretation







c0:                    ; next in
                       ; inbytes leading bytes from pass 7
      jl. w3     e2.   ; w2:=inbyte
c140: sl  w2     f130+1; f130 = no of 0th label
      jl.        c3.   ; goto stack label
      ls  w2     1     ;
c1:                    ; interprete
      al. w3     c0.   ; prepare return, w2 = table
      rs. w2     f0.   ;   pointer (main or continue)
      bl. w1  x2+g0.   ; f1 := bit 0-11 of table word
      hs. w1     f1.   ;
      bl. w1  x2+g1.   ;
      ad  w2    -6     ; w1 := bit 12-17 of tab.w.
      ls  w2    -18    ; w2 := bit 18-23 of tab.w.
      so  w2     1     ; if not last in sequense then
      al. w3     c2.   ; w3 := return to interprete next
      rs. w3     f2.   ; w3 = return (=c2 or c0)
      jl.     x2+b0.   ; switch to central actions
c2:                    ; interprete next
      rl. w2     f0.   ;
      al  w2  x2-2     ; table pointer := table pointer - 2
      jl.        c1.   ; goto interprete
                       ;
c103:                  ; spec interprete move
      rl. w2     f0.   ;
      al  w2  x2-2     ;
      rs. w2     f0.   ; move f0 = tab pointer
                       ;
c102:                  ; spec interprete
      bl. w1  x2+g0.   ; f0 = pointer
      hs. w1     f1.   ; f1 := bit  0-11 of tab.w.
      bl. w1  x2+g1.   ;
      ad  w2    -6     ; w1 := bit 12-17 of tab.w.
      ls  w2    -18    ; w2 := bit 18-23 of tab.w.
      jl.     x2+b0.   ; switch to cental actions

c3:   al  w0  x2       ;
      jl. w3     c86.  ; stack labelno
      jl.        c0.   ; return to next in

\f

;rc 27.01.71 fortran pass8                       page 22
;subroutines





; subroutines
; code sequenses jumped to from code or central actions, returns by w3 or f2

c88:                   ; w1,w2=appetite absword(w0,w2)
      rl. w1     f15.  ; w0 = absword, w2 = appetite
      al  w1  x1+2     ;
a38:  sh. w1    (f25.) ; rep: compare absword
      sn  w0 (x1)      ;      to abswords of segment
      jl.        a39.  ;
      al  w1  x1+2     ;
      jl.        a38.  ; repend
a39:  sh. w1    (f25.) ;
      am        -2     ; ajust appetite for new absword
      al  w2  x2+2     ;
      ds. w1     b16.  ; save  absw, absw. addr.
      jl      x3       ; return,w1=wanted a:absword,w2=appetite
                 0     ; saved absword, point, m.m
b16:             0     ; saved absword addr, point addr.

c89:                   ; w1=store absword
      dl. w1     b16.  ; get absw, addr. of absw.
      sh. w1    (f25.) ; if absw. addr <= last absw. then
      jl      x3       ; return
      rs. w1     f25.  ; last absw. := absword addr.
      rx  w0  x1       ;
      sh. w1    (f26.) ; if absw.addr <= top point then
      jl      x3       ; return,w1=a:absword
      rx  w0  x1       ;
c99:                   ; half down
                       ; called from store absword and store point
      ds. w1     b25.  ; save absw or point and addr.
      rl. w1     f7.   ;
      ws. w1     f14.  ;
      ls  w1    -2     ;
      ls  w1     1     ; displacement := left on segment //4  x  2
      hs. w1     b17.  ; store displacement.
      rl. w2     f14.  ; w2 := addr. of moving part
a41:  sh. w2    (f26.) ; loop: top point = last
      jl.        a42.  ;   word to be moved
      dl  w1  x2       ; move doubw.(points and constants)
b17=k+1                ;
      ds  w1  x2+0     ; displacement is stored in ap.
      al  w2  x2-4     ;
      jl.        a41.  ; goto loop
a42:  dl. w1     f26.  ; ajust moveable part, entry from half up
      rs. w1     b91.  ; save old next point address
      ba. w0     b17.  ;
      ba. w1     b17.  ;
      ds. w1     f26.  ; point base and top point
      rl. w1     f14.  ;
      ba. w1     b17.  ;
      rs. w1     f14.  ; last constant
      dl. w1     b25.  ;
      rl. w2     b91.  ;
      al  w2     x2+2  ; if old next point address+2 >=
      sl. w2     (f25.);   last absw address then
      rs. w0     (f25.);    store w0 as last absw.
      al  w0     1     ; pass inf2
      wa. w0     e9.+2 ;
      rs. w0     e9.+2 ;
      jl      x3       ; return
b91: 0                 ; saved old next point address

\f

;rc 26.10.70 fortran pass8                       page 23
;subroutines






c90:                   ; w1,w2=appetite point(w0,w2)
      rl. w1     f23.  ; w1 := point base = 0th point
a43:  al  w1  x1-2     ; loop: w1 = addr of point to comperation
      se. w1    (f26.) ; limit = top point = last point + 2
      sn  w0 (x1)      ;
      jl.        a44.  ;
      jl.        a43.  ; goto loop
a44:  sn. w1    (f26.) ;
      al  w2  x2+2     ; if new point ajust appetite
      ds. w1     b16.  ; save point, point addr.
      jl      x3       ; return,w1=a:point,w2=appetite
a45:  ds. w1     b16.  ; entry

c91:                   ; w1=store point
      dl. w1     b16.  ; get point, point addr.
      al  w2  x1-2     ;
      ws. w1     f23.  ;
      sl. w2    (f26.) ;
      jl      x3       ; if point = a stored point then return
      rs. w2     f26.  ; new top point
      al  w2     x2+2  ; if next point address+2 >=
      sl. w2     (f25.);     last absw address then
      rx  w0     x2    ;     store point
      al  w2     x2-2  ;
      sl. w2    (f25.) ;
      jl      x3       ; return,w1=a:point
      jl.        c99.  ; goto half down

c92:                   ; w2=appetite constant(w2)
      ds. w3     b19.  ; save appetite and return
      rl. w1     f23.  ; w1:=addr. of 1th stored const.
      rl. w2     f64.  ; w2 := length (=2,4 or 8)
      dl. w0     f13.+2; w3-0 = 1th - 2nd word of const.
      al  w1  x1-2     ;
                       ; compare constant to constants already stored on seg
a46:  al  w1  x1+2     ; loop:
      sn  w3 (x1)      ;  addr. of stored const.
      jl.        a48.  ; goto 1th word matching
a47:  sh. w1    (f14.) ; limit = last const
      jl.        a46.  ; goto loop
a49:  wa. w1     f64.  ; finish:
      al  w1  x1-2     ;
      rs. w1     b20.  ; stored claimed addr
      ws. w1     f14.  ;
      rl. w2     b18.  ;
      sl  w1     0     ;
      wa  w2     2     ; w2 := (ajusted) appetite
      jl.       (b19.) ; return
a48:  sn  w2     2     ; 1th word is matching:
      jl.        a49.  ; goto finish if length = 2
      se  w0 (x1+2)    ; test 2nd word
      jl.        a47.  ; if <> goto next
      sn  w2     4     ;
      jl.        a49.  ; if length = 4 goto finish
      dl. w0     f13.+6; w3-0 := word 3 and 4
      se  w3 (x1+4)    ; test 3rd word
      jl.        a47.  ;
      se  w0 (x1+6)    ; test 4th word
      jl.        a47.  ;
      jl.        a49.  ;
b18:             0     ; saved appetite
b19:             0     ; saved return
b20:             0     ; claimed addr. of const.

\f

;rc 18.11.70 fortran pass8                       page 24
;subroutines



c93:                   ; w1=store const
                       ; returns w1th w1=a:const rel to ith const
      rl. w2     b20.  ; get addr. of constant
      al  w1  x2       ;
      ws. w1     f23.  ; w1 := addr of const rel to 1th const.
      sh. w2    (f14.) ;
      jl      x3       ; if const = stored const then return
      rs. w3     b19.  ; save return
      rs. w2     f14.  ; last const
      am.       (f7.)  ; test last const < top instr.
      sl  w2    +2     ;                   <-- may be sl. w2 (f7) - - -
      jl. w3     c98.  ; else goto half up
      dl. w0     f13.+2; w3-0 := 1th and 2nd word
      rl. w2     f64.  ; w2 := length in bytes
      rs. w3    (f14.) ; store 1th word
      sn  w2     2     ;
      jl.       (b19.) ; return if 1 word
      sn  w2     4     ;
      jl.        a50.  ; goto store
      am.       (f14.) ;
      ds  w0    -4     ;
      dl. w0     f13.+6; w3-0 := 3rd + 4th word
a50:  ds. w0    (f14.) ;
      jl.       (b19.) ; return

c98:                   ; half up
                       ; called by store instr
      rl. w0    (f25.) ; prepare adjust moveable
      ds. w1     b25.  ;   part in half down
      rl. w1     f14.  ;
      ws. w1     f7.   ; w1 := claimed (neg)
      rs. w1     b20.  ;
      wa. w1     f25.  ;
      ws. w1     f26.  ; w1 := - left on segment :=
      ls  w1    -2     ;   claimed + last abs - top point
      ls  w1     1     ;
      ws. w1     b20.  ; w1 := displacement :=(-
                       ;   left on segment)//4 x2
                       ;   - claimed (neg)
      hs. w1     b17.  ; store displacement in half down
      hs. w1     b21.  ;   -        -       in half up
      rl. w2     f26.  ; w2 := word to be moved-2
a51:  sl. w2    (f14.) ; loop:
      jl.        a42.  ; goto ajust moveabel part in half down
      al  w2  x2+2     ;
      rl  w1  x2       ; move 1 word
b21=k+1                ;
      rs  w1  x2-0     ;
      jl.        a51.  ; goto loop

c94:                   ; store instr
                       ; store instr.word saved in f1
      rl. w2     f7.   ;
      al  w1  x2-2     ; test top instr > last const
      sh. w2    (f14.) ;
      jl. w3     c98.  ; goto half up
      sh. w1    (f27.) ; if top instr -2 <= line block then
      jl. w3     c101. ; goto store line inf
      rs. w1     f7.   ; store new top instr addr
      rl. w0     f1.   ;
      rs  w0  x1+2     ; store instruction word

\f

;rc 20.10.70 fortran pass8                       page 25
;subroutines



c.j0                   ; if in testing time
      rl. w2     e17.  ; begin
      sz  w2     1<5   ; if test mode then
      jl.        c138. ; goto instr print
z.                     ; end
      jl.       (f2.)  ; return

c101:                  ; store line inf
                       ; called from store instr
                       ; linecounter uses the last 8 bytes of each segment:
                       ; 13 bits: old linecount
                       ; 16*5 bits: linecounts per 16 instr words(max31)
                       ; 3 bits: 0 1 0 for linecount.
      al  w0  x3       ; save return
      rl. w3     e6.   ;
      rx. w3     f28.  ;
      ws. w3     f28.  ; w3 := line change = prev line - line count
j2=k+1                 ; max line change
      sl  w3     0     ; store pass inf = max line change
      hs. w3     j2.   ;
      sl  w3     32    ; if line change >= 32 then
      al  w3     31    ; line change := 31
      al  w2     0     ; w2-w3 = seg (line alarm addr)
j1=k+1                 ;
      ld  w3     3     ; line inf shifts = 3+5+5...
      aa. w3    (f29.) ;
      ds. w3    (f29.) ; add line inf in bit pattn.
      rl. w3     f27.  ; top of line block is
      al  w3  x3-34    ;   changed to next
      rs. w3     f27.  ;
      bl. w3     j1.   ; line inf shifts is
      al  w3  x3+5     ;   increased
      hs. w3     j1.   ;
      sh  w3     43    ; if line inf shifts <= 43
      jl        (0)    ; then return
      al  w3     0     ; else change alarm double-
      hs. w3     j1.   ;   word to next doubleword
      rl. w3     f29.  ;
      al  w3  x3-4     ;
      rs. w3     f29.  ;
      jl        (0)    ; return

c105:                  ; test
                       ; called from test and change, extest and change
      wa. w2     f14.  ; get w2 = appetite + last const
      ws. w2     f26.  ;   - next point
      wa. w2     f25.  ;   + last abs
j19=k+1                ; 2 for last used to w3,else 0
      al  w2  x2+0     ; pointw01:  :=2,last used:  :=0
      sh. w2    (f7.)  ; check   <= last instr.
      jl      x3+2     ; return: no change
      jl      x3       ;

c97:                   ; test and change
      rs. w3     b24.  ; save return
      jl. w3     c105. ; if test = change
      jl.       c110.  ; then goto segment change
      rl. w3     b24.  ; else return
      jl      x3+2     ;
b24:             0     ; saved return

\f

;rc 26.11.70 fortran pass8                       page 26
;subroutines






c100:                  ; segment change

                       ; called from test and change,funit and initiate.
;survey of segmentchange:
;save w01; fill unused points;
;get increment to constants and points(used by modifier);
; generate topword for segment; modify ref from instr to points and constants;
;store lineinf; store pass inf; change segment;
;save r:start of instructions on segment; initialize line inf and f-words;
;generate jump to next segment;get w01 and return by b24;

      rs. w3     b24.  ; save return
c110: ds. w1     b25.  ; entry from check and change, and end pass
                       ;   save w0-w1
      bl. w0     j19.  ; if parameters
      se  w0     0     ;
      jl.        a131. ; generate get last used
a132: rl. w0     f85.  ; fill unused points:
      rl. w1     f25.  ;   fill from last abs to point top
a61:  sl. w1    (f26.) ; loop:
      jl.        a60.  ;
      al  w1  x1+2     ;
      rs  w0  x1       ; points := point key f85
      jl.        a61.  ;
a60:  rl. w1     f23.  ;
      al  w0  x1+1     ;
      rs. w0     b26.  ; store increment for constants
      ws. w1     f15.  ;   - ref to last byte of constants
      hs. w1     b27.  ; store rel point base
      al  w1  x1-2     ; w1 = last point rel to seg.base
      rl. w2     f25.  ;
      ws. w2     f15.  ; w2 = last abs rel to seg.base
      rs. w2    (f15.) ; segment byte(1)
      hs. w1    (f15.) ; segment byte(0)
      rl. w1     f15.  ; modify ref. from instr. to
      al  w1  x1+503   ;   points and constants
      al  w2     44    ; w1 := last inst on segment w2 := tab word
   h. al  w0,ba w1 x3  ;
   w. jl. w3     a62.  ; goto modify code
      -2<12     +0     ; table increment
                       ;
      jl. w3     c101. ; store line inf:
      rl. w1     f7.   ; addr. of 1th instr rel to seg
      ws. w1     f15.  ;   - used in jl instr.
      al  w1  x1+2     ;
      hs. w1    f114.+1; instr = jl x3 + rel

c48:                   ; change segment, entry from start
c.510-e39              ; if short segment:
w.    rl. w3     f15.  ;
      al  w3  x3+e39   ; w3 := segment base := segment base + length
      bl. w1     j14.  ;
      al  w2    -1000  ;
      sn  w1     a106  ;
      jl.        6     ;
      sh. w3 (x2+e20.-4+1000); if segment base <= last on segment
      jl.        a66.  ; goto after change
z.                     ; end short segment
                       ;

\f

;rc 06.04.72 fortran pass8                       page 27
;subroutines
j17=k+1-1000           ;
j14=k+1               ;
a106=f161-k           ;
      jl. w3     f153. ; call gpa out segm. or global list
c142: am         -1000 ; called from directing byte pass7
      rl. w3     e20.-2+1000; w3 := segment base
a66:  rs. w3     f15.  ; after change: w3 = seg. base
      rl. w1     f28.  ; initialize line inf:
      ld  w1     30    ; 1th doub word(bit 1-17) := prev line
      ds  w1  x3+e39-6 ;
j3=k+1                 ; segment type is stored (3 bits)
      al  w2     2     ; w1 = 0; 2 is changed to 1 if external
      ds  w2  x3+e39-2 ; 2nd doub word(bit 20-23) := type
      al  w0     3     ; line inf shifts := 3
      hs. w0     j1.   ;
      al  w1  x3+e39-2 ; addr of line inf. doub.word
      rs. w1     f29.  ;
      al  w1  x3+e39-36;
      rs. w1     f27.  ; a: top instr of line inf block
                       ; initialize f-words
b27=k+1                ; rel point base, init =1/4 of segment
      al  w1  x3+e39>3<1;
      al  w2  x1-2     ; top point
      ds. w2     f26.  ; init point base, top point
      rs. w2     f14.  ; init last point
      rs. w3     f25.  ; init last abs := seg. base
      bl. w1     f24.  ;
      al  w1  x1-1     ;
      hs. w1     f24.  ; init current segment
      al  w1  x3+e39-10; init top instr := last of segment - 4 words
      rs. w1     f7.   ;
      rl. w1     f77.  ;
      se  w1     1     ;
      jl.        a122. ; if not format continue
      al  w1     3     ; else
      hs. w1     j4.   ; no instr. ref to next segment
      bl. w1     f114.+1;
      rx. w1     f1.   ; save bytes to be stored
      rs. w1     f73.  ; prepare continue bytes:=
    h.al  w1, 15<8+1   ; 15<8+1, rel to next segment
    w.hs. w1     f1.   ;
j4=k+1                 ;
a122: sh  w0     3     ; w0 = 3, operand = 0 after seg.change
      jl.        a55.  ; no ref to next segment
                       ; generate jump to next seg:
      rl. w1     f7.   ;
      al  w1  x1-4     ; 2 instr , 1 absword
      rs. w1     f7.   ;
      al  w3  x3+2     ;
      rs. w3     f25.  ;
      rl. w2     f114. ;
      rs  w2  x1+4     ; store jl x3 + rel
      ac  w2     e39-14; op = (x3+e39-12) - (x3+2)
      hs. w2     f108.+1;
      rl. w2     f108. ;
      rs  w2  x1+2     ; store rl. w3 a:abs.
      al  w2     1     ;
      ls  w2     12    ;
      wa. w2     f83.  ; absword = key + 1   ,   0
      rs  w2  x3       ; store absword
\f

;rc 09.08.71 fortran pass8                         page27a
;code


a55:  dl. w1     b25.  ; get w0-w1
      al  w2     0     ;
      hs. w2     j4.   ; after 1th segment := true
      jl.       (b24.) ; return

                 0     ;
b25:             0     ; saved w0-1
b26:             0     ; ref increment=a:1th point+1, used by modifier

b66:             0     ; saved f1
a131: rl. w1     f102. ; generate  get last used
      rx. w1     f1.   ;
      rs. w1     b66.  ;
      jl. w3     c136. ; store instr,return to a133
      rl. w1     b66.  ;
      rs. w1     f1.   ;
      jl.        a132. ;

\f

;rc 05.05.70 fortran pass8                       page 28
;subroutines






a62:                   ; modify:, called twice
                       ; from segment change
                       ; w2 = table word rel to g2
      hs. w0     b51.  ; w0 = 0, ba or bs w1 x3
a64:  rs. w1     b28.  ; next pattern: segment addr := w1;
a57:  rl. w0  x2+g2.   ; normallize: w0 := modifier pattern :=
      sn  w0     0     ;   modifier table(modifier index);
      jl.        a63.  ;   if mod pattern <> 0 then
      ns  w0  x3+1     ;   begin call1 := distance to next;
      la. w0     f31.  ;    modifier table(modifier index) :=
      rs. w0  x2+g2.   ;    normalized pattern - bit 22;
b51:  bs  w1  x3+1; or ba;  w1 := w1 +- distance to next;
      bl  w0  x1       ;
      wa. w0     b26.  ;    segment byte(w1) := segment byte(w1)
      hs  w0  x1       ;    + ref increment;
      jl.        a57.  ;    goto normalize
a63:  rl. w1     b28.  ;   end; w1 := segm addr;
      sh. w1    (f26.) ;   if segm addr <= top point then
      jl      x3+2     ;   return;
      al  w1  x1-23    ;   w1 := segm add := segm addr - 23;
      ba  w2  x3       ;   w2 := modifier index := modifier index + call 0;
      jl.        a64.  ;   goto next pattern;

b28:  0                ; segm addr

c96:  rl. w1     f7.   ; set modifier: w1 := top instr;
                       ; called when instr. refers to const. or points
      ws. w1     f15.  ; set byte modifier: w1 = top instr - 1.
      al  w1  x1+26    ;   w1 := w1 - segment base + 26;
a65:  al  w0     0     ; set: w0 = bit position := w1 mod 23;
      wd. w1     f32.  ;   w1 := modifier index := w1//23 x 2;
      ls  w1     1     ;
      al  w2     1     ;
      ls  w2    (0)    ;   modifier table (modifier index)
      wa. w2  x1+g2.   ;   := modifier table (modifier index)
      rs. w2  x1+g2.   ;   + 1 shift bit position;
      jl      x3       ;   return;

; modifier table  page 100


                      ; instr print p 100

; modifier table contains one bit for each byte on a segment, stored with
; 23 bits a word. the first part of the table corresponds to point bytes
; referencing constants*, the second part to instructions referencing points
; and constants. bit = 1 designates a byte to be modified with the final
; value of point base + 1. the bits are allocated like this:
;* not used in fortran
;           bit 22             bit 0
;     g2:  point base-23     point base-1
;     g2+2:point base-46     point base-24
;     g2+42:  480               458
;     g2+44:  503               481

; modifier table  page 100


                      ; instr print p 100

\f

;rc 14.12.70 fortran pass8                       page 29
;subroutines






c86:                   ; stack(w0)
      rl. w1     f35.  ; store w0 in stacktop and
      rs  w0  x1       ; change stacktop pointer.
      al  w1  x1-2     ; check for room
      rs. w1     f35.  ;
      sh. w1    (f33.) ;
      jl. w3     b23.  ; goto stack error
      am         2000  ;
      jl.        a143. ; goto print stacktop
                       ;
c87:                   ; w0=unstack
      rl. w1     f35.  ;
      al  w1  x1+2     ;
      rs. w1     f35.  ; change stack pointer
      rl  w0  x1       ; w0 := stacktop.
      am         2000  ;
      jl.        a146. ; goto print stacktop
                       ;
c82:                   ; w0=declare label
      al  w0     2     ;
      wa. w0     f24.  ;
      wa. w0     f7.   ;
      ws. w0     f15.  ; w0 := segno, rel
      jl      x3       ; return
                       ;
c83:                   ; declare and store label
                       ; store segno,rel in label table
      rs. w3     b22.  ; store return
      jl. w3     c82.  ; w0 := segno, rel
      al  w2  x2-f130  ; w2 = labelno
      ls  w2     2     ;
      wa. w2     f91.  ; w2 := last byte of part of labeltab
      rs  w0  x2-2     ; store segno, rel
      jl.       (b22.) ;
b22:             0     ; saved return
                       ;
c85:                   ; increase labelno and init
      rl. w2     f94.  ;
      al  w2  x2+1     ;
      rs. w2     f94.  ; ajust labelno
                       ;
c84:                   ; tabel init
      rl. w1     f33.  ;
      al  w1  x1+4     ;
      sl. w1    (f35.) ; if last of lab.tab >= stacktop then
      jl.        b23.  ; goto alarm in stack
      rs. w1     f33.  ; store new last of lab.tab.
      al  w0     0     ;
      rs  w0  x1-2     ; store bytes i lab.tab = 0
      rs  w0  x1       ;
      jl      x3       ; return
                       ;

\f

;rc 09.10.70 fortran pass8                       page 30
;subroutines





c9:   am         1000  ;
      hs. w1     b53.  ; store operand in used skip instr
      jl.       (f2.)  ;
c107: rs. w3     b52.  ; prepare skip instr
c104:                  ; skip instr.
                       ; called from action 18,50,52,54
      rl. w1     f75.  ; w1 := rel addr of skip instr or -1
      sl  w1     0     ;
      jl.        a30.  ;
      jl. w3     f135. ; inbyte skipinstr no
      ls  w2     1     ;
      al  w1  x2       ; w1:=r:skipinstr
a30:  al  w1  x1+1000  ;
      rl. w2  x1+g103. ;
      rs. w2     f1.   ; f1 := instruction
      rl. w1     b52.  ;
      rs. w1     f2.   ; f2 := saved return
      jl.        c94.  ; goto store instruction
b52:             0     ; saved return

c114:                  ;extest and change
      rs. w3     b55.  ;save return
      jl. w3     c105. ;if test=change
      jl.        a81.  ;then goto prep. seg. change
      rl. w3     b55.  ;else return
      jl      x3+2     ;
b55:             0     ;saved return
a81:  al. w3     a82.  ;prepare seg. change:
      rs. w3     b24.  ;store return after seg. ch.
      al  w3     3     ;
      hs. w3     j4.   ;no ref to next segment
      jl.        c110. ;goto segment change
a82:  bl. w1    f114.+1;after segment change
      rs. w1    (f7.)  ;store ref to next segment
      rl. w1     f7.   ;
      al  w1  x1-2     ;
      rs. w1     f7.   ;
      jl.       (b55.) ;return

c136:                  ; store instr., return to w3
      rs. w3     b68.  ;
      al. w1     a134. ;
      rx. w1     f2.   ;
      rs. w1     b69.  ;
      jl.        c94.  ; goto store instr.
b68:               0   ; saved w3
b69:             0     ; saved f2
a134: rl. w1     b69.  ;
      rs. w1     f2.   ;
      jl.       (b68.) ;

\f

;rc 78.05.08 fortran pass8                       page 31
;central actions






; centrale actions
c50:                   ; 0: store instructions and operands
                       ;    entry: f1=instr and wmx  , -
                       ;           w1=addr. modefication(usualy 0)
                       ;           f64,f65,f66=operand description
                       ;           f13,...,=operand
                       ;    action:test free bytes on segment for operand
                       ;           and instruction;
                       ;           store instr.,wmx ,operand and modification;
      hs. w1     f1.+1 ;
      rl. w1     f1.   ;
      lo. w1     f65.  ; only for bytes
      rs. w1     f1.   ; f1 := instr + const. op.
a5:   rl. w2     f158. ; rep: w2:=appetite
      sn  w2     2     ;   if appetite amodify = 2 then
      jl.       (f66.) ;     switch to part of action 0;

      rl. w3     f0.   ;
      bl. w1  x3+g1.   ;   if current table entry
      sz  w1     1     ;     is last in sequence then
      al  w3     g96   ;       table pointer := <do nothing> + <stop>;
      am        +2000  ;
      hs. w3     b85.  ;   save table pointer in am-code;

      al. w0     a128. ;
      rs. w0     f2.   ;   set return to amodify code;

      jl.       (f66.) ; switch to part of action 0
b29:                   ; operand = byte:
      jl. w3     c97.  ; goto test and change
      jl.        a5.   ; goto rep if change
      rl. w1     f13.  ;
      ba. w1     f1.+1 ; add 1th word of operand
      hs. w1     f1.+1 ; f1 := instr word
      jl.        c94.  ; store instr., return to (f2)
b30:                   ; operand = litteral:
      jl. w3     c92.  ; w2 := appetite constant
      jl. w3     c97.  ; goto test and change
      jl.        a5.   ; goto rep if change
      jl. w3     c93.  ; w1 := store const
      ws. w1     f7.   ;
      ba. w1     f1.+1;
      jl.        a135. ;
b31:  ws. w1     f7.   ; entry
a135: hs. w1     f1.+1 ; modulo 1<12
      rl. w1     f1.   ;
      lo. w1     f110. ; f1 := instr, wmx, modefication, ref. to op. and  .
      rs. w1     f1.   ;
      jl. w3     c96.  ; goto set modifier
      jl.        c94.  ; goto store instr
b75:                   ; operand= ext
      rl. w2     f13.  ; get extno
      jl.        c108. ; goto action 34
b32:                   ; operand = common:
      rl. w1     f1.   ;
      lo. w1     f111. ; add  ( )
      rs. w1     f1.   ;
b33:                   ; operand = addr. of common:
      rl. w0     f13.  ;
      wa. w0     f84.  ; w0 := absword := operand + key
      jl. w3     c88.  ; w2 := appetite absword
      jl. w3     c97.  ; goto test and change
      jl.        a5.   ; goto rep if change
b34:                   ; entry,  entry a.20
      rl. w1     f1.   ;
      lo. w1     f110. ; add  .
      rs. w1     f1.   ;
      jl. w3     c89.  ; w1:= a:stored absword
b35:  ws. w1     f7.   ; entry 
      hs. w1     f1.+1 ; f1 := instr, wmx,  ref to abs-wmx incl.
      jl.        c94.  ; goto store instr, return via f2
\f

;rc 26.11.70 fortran pass8                    page 32
;central actions


c51:                   ; 2: goto code
                       ;    entry: f1=a:code relative to f0  , -
                       ;    action:goto code;
      bl. w2     f1.   ;
      jl. w3  x2+f0.   ; x2=addr-f0
      jl.       (f2.)  ;
c52:                   ; 4: store instr, inbyte rs entry no,
                       ; store absw. and ref.
                       ;    entry: f1=instr. and wmx  , -
                       ;           w1=1 for rs gotopoint if rs segment
                       ;              0   -    takeexpr       -
                       ;           f96,...,= rs table
                       ;    action:inbyte rs no;
                       ;           test free bytes on segment for absw.and instr.
                       ;           store absw. and instr. as follows:
                       ;           rs in corestore:
                       ;                <instr>.wx (r:absw for rs)
                       ;           rs on segments(relev. for instr jl):
                       ;                rl. w1       r: poinrw for rs
                       ;                <instr>. wx (r:a: for rs takeexp/gotop);
      jl. w3     f135. ; w2 := rs entry no=1,...,96
      al  w0  x2       ;
b36:  rl  w1     0     ; entry from action 8, w1 := w0 := rs
sl w1 75
al w1 x1+75-d21
      sh  w1     48    ; lookup in rs table = 2 double words
      jl.        a23.  ; bit = 1 for rs on segments
      al  w1  x1-48    ; bit = 0 for rs in corestore
      am         4     ;
a23:  dl. w3     f96.+2;
      ac  w1  x1-1     ;
      ld  w3  x1       ;
      sz  w3     1     ;
      jl.        a24.  ; goto rs on segments
b67:  wa. w0     f78.  ; rs in corestore, w0 := absword + key, entry
b82:  ls  w0     12    ; entry
      wa. w0     f82.  ;
a6:   al  w2     2     ; rep:
      jl. w3     c88.  ; w2 := appetite absword
      jl. w3     c97.  ; goto test and change
      jl.        a6.   ; goto rep if change
      rl. w1     f1.   ;
      lo. w1     f111. ; add  ( )  to instr.
      rs. w1     f1.   ;
      jl.        b34.  ; goto action 0
a24:                   ; rs on segments:
      sl  w0     49    ;
      am         4     ;
      dl. w3     f100.+2;
      ld  w3  x1       ;
      rl  w2     0     ;
      wa. w2     f78.  ; w0=-(rsno,x1=rs-1(-48))
      so  w3     1     ;
      jl.        a141. ;  rs procedures
      ws. w2     f80.  ;  w2=rs+externals, operands:
      jl.        b41.  ;
a141: ls  w2     12   ; procedures
      rs. w2     f73.  ;
      al. w2     a25.  ;
      rx. w2     f2.   ;
      rs. w2     f20.  ; save old return
      al  w0     d10   ; rs take expression 
      jl.        b36.  ; goto store absw. and instr.
a25:  rl. w2     f20.  ;
      rs. w2     f2.   ;
      rl. w1     f116. ;
      rs. w1     f1.   ;
      rl. w0     f73.  ; get saved rs no
      jl.        b47.  ; goto a.26 to store point and instr
\f

;rc 06.11.71 fortran pass8                    page 33
;central actions





c53:                   ; 6: inbyte and store bytes wmx and op. kind
                       ;    entry: f1=  wmx  , -. w1=operand kind
                       ;    action:inbytes and store operand in f13,...;
                       ;           store operand descr.in f64,f65,f66;
      al. w2     b29.  ; operand kind is represented
      sn  w1     1     ; as addr. of entry in action 0
      jl.        a7.   ; operand kind = byte
      al. w2     b75.  ;
      sn  w1     0     ;
      jl.        a7.   ; operand kind=external
      al. w2     b30.  ;
      sh  w1     16    ;
      jl.        a7.   ; operand kind = litteral
      al. w2     b32.  ; operand kind = common
a7:   rs. w2     f66.  ; store operand kind
      bl. w2     f1.   ;
      ls  w2     12    ;
      rs. w2     f65.  ; store wmx part,0
      la. w1     f134. ; w1 := length of operand
      rs. w1     f64.  ;
      sh  w1     1     ;
      jl.        a8.   ; get operand = byte only
a9:   al  w1  x1-1     ; loop: inbyte length times and store
      jl. w3     f135. ; w2 := inbyte,
      hs. w2  x1+f13.  ;
      se  w1     0     ;
      jl.        a9.   ; goto loop
      jl.       (f2.)  ; return
a8:   jl. w3     f135. ; get and store byte
b37:  rs. w2     f13.  ; entry
      jl.       (f2.)  ; return

c54:                   ; 8: rs entry no from tab. or const,
                     ;    store instr, absw. and ref.
                       ;    entry: f1=instr. and wmx  , - . w1=rs no
                       ;    action as action 4;
      al  w0  x1       ;
      sn  w0     0     ;
      rl. w0     f13.  ; if const
      jl.        b36.  ; goto action 4, w0 = rs no

c55:                   ; 10: store instr, wmx and const. op.
                       ;    entry:f1=instr and wmx, - . w1=operand
                       ;    action:test free bytes for instr on segment;
                       ;           store instr,wmx and operand;
      hs. w1     f1.+1 ;
a10:  al  w2     2     ; rep: w2 := appetite
      jl. w3     c97.  ; goto test and change
      jl.        a10.  ; goto rep if change
      jl.        c94.  ; goto store instr.
\f

;rc 11.11.70 fortran pass8                    page 34
;central actions





c56:                   ; 12: inbyte and stack word or byte
                       ;    entry: w1=no of bytes =1 or 2
                       ;    action:inbyte and stack word or byte;
      jl. w3     f135. ;
      al  w0  x2       ; w0 := 1th byte
      al  w2     0     ;
      se  w1     1     ;
      jl. w3     f135. ; w2 := 2nd byte or 0
      hs  w2     0     ; store in (byte 0)
      jl.        a124. ; goto a.56 to stack and return

c58:                   ; 16: check free bytes and contin. impl.
                       ;    entry:f1=a:next tab.word to be implemented+2 rel to g0
                       ;           w1=no of wanted free bytes on segment
                       ;    action:test free bytes on segment;
                       ;           change table pointer;
      bl. w2     f1.   ;
      rs. w2     f0.   ; change next tabel implementation
a11:  al  w2  x1       ; rep: w2 := appetite
      jl. w3     c97.  ; goto test and change
      jl.        a11.  ; goto rep if change
c57:                   ; 14: do nothing
      jl.       (f2.)  ; return

c59:                   ; 18: check free bytes,
                       ; store next inst., store skip
                       ;    entry: f1=a:skipinstr. rel to1th skipinstr or
                       ;           -1 if a*skipinstr is to be inbyted
                       ;           w1=no of wanted free bytes on segment
                       ;           next tableword=instrandwmx,operand<6+11
                       ;    action:test free bytes on segment;
                       ;           implement next tablew.(ac.10);
                       ;           store skipinstr.;
      al  w2  x1       ; rep: w2 := appetite
      jl. w3     c97.  ; goto test and change
      jl.        c59.  ; goto rep if change
      al. w2     a12.  ;
      rx. w2     f2.   ; store return in f2
      rs. w2     b52.  ; store old f2 = return after skip
      bl. w1     f1.   ;
      rs. w1     f75.  ; store skip no
      jl.        c103. ; goto interprete next tab.
a12:  jl.        c104. ; return from store next instr.
                       ; goto store skip instr. return in b27

\f

;rc 12.02.73 fortran pass8                       page 34a
;central actions
b42:             0     ; saved segmno,rel
b48= b42+1             ;






c60:                   ; 20: store goto, segno + rel from stack
                       ;    entry: stacktop=segno,rel
                       ;    action:test free bytes on segment for instr(and absw);
                       ;           store goto as follows:
                       ;           segno<>actual: jl.   rel.
                       ;           segno<>actual: rl.w3 r:absw for segno
                       ;                          jl    x3+rel;
      rs. w1     f74.  ; store if skip := 0
      rl. w1     f2.   ;
      rs. w1     f20.  ; save f2 = return
b38:  jl. w3     c87.  ; entry from action 50
                       ; w0 := segno, rel from stack
b39:  rs. w0     b44.  ; entry from action 22, 24; w1 := rel
a14:  rl. w0     b44.  ; rep:
      bl  w1     1     ;
      ws  w0     2     ; w0 := segno, 0
      se. w0    (f24.) ; if segno <> actual segno then
      jl.        a13.  ; goto later segment
      rl. w2     f97.  ;
      se  w2     1     ;
      jl.        a136. ;
      al  w0     0     ;
      rs. w0     f1.   ;
      jl. w3     c136. ;
      bl. w1     b70.  ;
a136: wa. w1     f15.  ; goto, actual segment
      ws. w1     f7.   ;
      sn  w1     2     ; if jump to actual position
      jl.       (f20.) ; no instr
      wa. w1     f101. ;
      rs. w1     f1.   ; instr := jl.  rel.
      al  w2     2     ; 
      wa. w2     f74.  ; add 2 if skip instr
      jl. w3     c97.  ; w2 := appetite, goto test and change
      jl.        a14.  ; goto rep if change
      jl.        c94.  ; goto store instr
b40:  jl. w3     c107. ; entry for action 50, 52, 54:
      jl.       (f20.) ; store skip instr and return
a13:                   ; later segment, goto
      rs. w0     b42.  ; save segno
      wa. w1     f107. ;
      rs. w1     f1.   ; instr := jl w3 x3 + rel
a15:  jl. w3     b57.  ; rep: w0:=absw
      al  w2     4     ;
      wa. w2     f74.  ; add 2 if skip to appetite
      jl. w3     c88.  ; w2 := appetite absw
      jl. w3     c97.  ; goto test and change
      jl.        a15.  ; goto rep if change
b43:                   ; entry from 22, 24
      jl. w3     c136. ; store instr , return
      rl. w1     f74.  ; 
      se  w1     0     ;
      jl. w3     c107. ; if skip then goto skipcode
      rl. w1     f108. ; w1 := rl. w3 
      rl. w2     f20.  ;
      rs. w2     f2.   ;
      rs. w1     f1.   ;
      jl.        b34.  ; goto action 0

\f

;rc 11.11.70 fortran pass8                       page 35
;central actions


                       ; 22: store goto, inbyte labelno

                       ;    entry: -
                       ;    action:inbyte labelno; get tablewords for label;
                       ;           test free bytes on segment for instr
                       ;                  and (absw.)
                       ;           store goto as follows:
                       ;           label declared:  as ac.20
                       ;           lab not decl. : rl.w3 r:absw for globelno
                       ;                           jl    x3+chain
                       ;                , globalno and chain is stored in label table;
b44:             0     ; tabel words: segno, rel
b70=b44+1              ;
                 0     ; globalno, chain
                 0     ; a: last byte of table words
b71=b44+2              ;
b72=b44+4               ;
c61:  rs. w1     f74.  ; entry, f74 := 0 for no skip
      rl. w1     f2.   ;
      rs. w1     f20.  ; save return
b49:  jl. w3     f135. ; entry from 52, w2 := labelno
b45:
b92=b45-2047
      jl. w3     b60.  ; entry from 24, get lable table
      bl. w2     b44.+1; w2 := rel
      se  w2     0     ; if label is declared then
      jl.        b39.  ; goto action 20, w0 = segno, rel
                       ; earlier label:
      jl. w3     b61.  ; w2:=globalno
      al  w1    -3     ; store -3 for labeltable
a17:  hs. w1     j18.  ; store -3 or -1 , entry
      rl. w2     f107. ; w0-1 = tabel words
      rs. w2     f1.   ; instr := jl w3 x3
a18:  al  w2     4     ; rep:
      wa. w2     f74.  ; add 2 to appetite if skip
      bl. w3     b44.  ;
      ls  w3     12    ; w3 := segno, 0
      se. w3    (f24.) ; note segno was stored when
                       ;      label was refered to
      jl.        a19.  ; goto generate absword
                       ; label has been refered to from this segment
      jl. w3     c97.  ; goto test and change
      jl.        a18.  ; goto rep if change
      bl. w2     b44.+3; get chain = a:r:absword
      wa. w2     f15.  ;
      rs. w2     b16.  ; store a: absw for dummy store absw.
      bl  w3  x2+1     ;
      hs. w3     f1.+1 ; store absw. chain in instr.
      rl. w0     f7.   ;
      ws. w0     f15.  ;
      ba. w0     1     ;
      hs  w0  x2+1     ; store instr chain in absword
      jl.        b43.  ; goto action 20 to store jl instr and rl instr
a19:  bl. w0     b44.+2; 1th ref to label on this segment
      ls  w0     12    ;
      wa. w0     f7.   ;
      ws. w0     f15.  ;
      ba. w0     1     ;
      wa. w0     f81.  ; w0 := absword := globalno or ext.no, a:r:next instr + key
      jl. w3     c88.  ; w2 := appetite absword
      jl. w3     c97.  ; goto test and change
      jl.        a18.  ; goto rep if change
      rl. w1     b16.  ;
      ws. w1     f15.  ;
      hs. w1   (b44.+4); store a:r:absw as chain
\f

;rc 11.11.70 fortran pass8                    page36
;central actions




      rl. w1     f24.  ; store actual segno in tab.
      ls  w1    -12    ;
      am.      (b44.+4);
j18=k+1                ;
      hs  w1    -3     ;
      jl.        b43.  ; goto action 20 to store jl instr, absw and rl instr
c62:                   ; 24: store goto, labelno from stack
                       ;    entry: stacktop=labelno
                       ;    action:as ac.22;
      rs. w1     f74.  ; f74 := 0 for no skip
      rl. w1     f2.   ;
      rs. w1     f20.  ;
b46:  jl. w3     c87.  ; entry from 54, w0 := labelno
      rl  w2     0     ; w2 := labelno
      jl.        b45.  ; goto action 22

c63:                   ; 26: externalno from stack,
                       ; store instr, point and ref.
                       ;    entry: f1=instr and wmx  , -
                       ;           stacktop=externalno
                       ;    action:check free bytes on segment forpointw and instr;
                       ;           store pointw and instr:
                       ;                 <instr>.wmx  r:pointw for extno;
      jl. w3     c87.  ; w0 := unstack
      wa. w0     f80.  ; add no of globals
b58:  ls  w0     12    ; entry from 32: w0 := externalno, 0
b47:  wa. w0     f86.  ; w0 := point incl key, entry
a73:  al  w2     2     ; rep:
      jl. w3     c90.  ; w2 := appetite point
      jl. w3     c97.  ; goto test and change
      jl.        a73.  ; goto rep if change
b59:  jl. w3     c91.  ; entry from 32: w1 := a: stored point rel to point base
      jl.        b31.  ; goto action 0 to store instr
\f

;rc 06.04.72 fortran pass8                    page 37
;central actions





c64:                   ; 28: store instr,absw. seg,rel from a:20
                       ;    entry: f1=instr and wmx  , -
                       ;           word of action 20=segno, rel
                       ;    action:check free bytes;
                       ;           store: <instr>. wmx r:absw. for segno   
      jl. w3     b57.  ; rep: goto action 20 to get absword
      al  w2     2     ;       from stored segno
      jl. w3     c88.  ; w2:=appetite absword
      jl. w3     c97.  ; goto test and change
      jl.        c64.  ; goto rep if change
      jl.        b34.  ; goto action 0 to store instr
                       ;     and absword

c65:                   ; 30: goto external. inbyte extno
                       ;    entry: -
                       ;    action:inbyte externalno;
                       ;           store: jl  and absw, by ac.22;
      jl. w3     f135. ; inbyte operand external (not used)
      jl. w3     f135. ; inbyte extno
b41:  rl. w0     f2.   ; entry from ac.4
      rs. w0     f20.  ;
      al  w1  x2       ;
      wa. w1     f80.  ;
      hs. w1     b44.+2; store in action 22
      ls  w2     1     ;
      wa. w2     f89.  ; w2:= last byte preceeding exttab
      rs. w2     b44.+4; store in action 22
      rl  w0  x2       ; get tableword
      rs. w0     b44.  ; store seg in action 22
      hs. w0     b44.+3; store chain
      al  w1     0     ;
      rs. w1     f74.  ; no skip instr
      al  w1    -1     ; j18:=-1 for ext table
      jl.        a17.  ; goto action 22

c66:                   ; 32: store instr,point. labelno from stack
                       ;    entry: f1=instr and wmx, - . stacktop=labelno
                       ;    action:check free bytes and store pointw and instr:
                       ;              pointw for globalno if label not declared
                       ;                -     -  seg,rel  -    -   is  - ;
      jl. w3     c87.  ; w0:=stacktop=labelno
      rl  w2     0     ;
      jl. w3     b60.  ; get label table
      bl  w3     1     ; w3:=rel
      se  w3     0     ;
      jl.        a108. ; goto label is declared;
                       ; not declared:
      jl. w3     b61.  ; get globalno to w2
      al  w0  x2       ;
      jl.        b58.  ; goto action 26 to store instr and point
a108:                  ; declared:
      rl. w0     b44.  ; rep:
      ws. w0     f24.  ;
      wa. w0     f85.  ; w0=rel segno, rel  +key
      al  w2     2     ;
      jl. w3     c90.  ; w2:=appetite point
      jl. w3     c97.  ; goto test and change
      jl.        a108. ; goto rep if change
      jl.        b59.  ; goto action 26 to store instr and point
\f

;rc 78.04.18 fortran pass8                    page 38
;central actions


c67:                   ; 34: store instr,ref and absword for inbyted extno(permanent core)
                       ;    entry: f1=instr and wmx ,  -
                       ;    action:inbyte extno; test free bytes on segment
                       ;           store:
                       ;           <instr>.wx (r:absw for core store ext)
      jl. w3     f135. ; inbyte extno
c108: al  w0  x2       ;entry:
      wa. w0     f80.  ; add no of globals
      jl.        b82.  ; goto action 4

c68:                   ; 36: store const in f13,
                       ;    addr. and length from tab
                       ;    entry: f1=a:constant  rel to f0  , -
                       ;           w1=length  (=2 or =4)
                       ;    action:get constant and store in f13
                       ;           store operand descr. in f64,f65,f66;
      al  w2     0     ;
      rs. w2     f65.  ; wmx part := 0
      rs. w1     f64.  ; length := 2, got from tab
      al. w2     b30.  ; operand kind := litteral =
      rs. w2     f66.  ;   addr. in action 0
      bl. w2     f1.   ;
      rl. w0  x2+f0.   ; fo as stepping stone
      rs. w0     f13.  ; store constant
      rl. w0  x2+f0.+2 ;
      rs. w0     f13.+2;
      jl.       (f2.)  ; return

c69:                   ; 38: as 0, am if necessary
                       ; entry: f1=instr and wmx,  -
                       ;        w1=addr.modefication (0 or -4 usualy)
                       ;        f64,f65,f66=operand descr.
                       ;        f13,...,=operand
                       ; action:if operand type<>commen or external and & no() in operand
                       ;        then goto action 0
                       ;        else store   f1, modegication
                       ;                     am, operand
      rl. w2     f66.  ;
      se. w2     b75.  ;
      sn. w2     b32.  ;
      jl.        a68.  ; operand =commen or external
      bl. w2     f65.  ; w2=wmx part of operand
      so  w2     1<2   ;
      jl.        c50.  ; goto action 0
a68:                   ; operand=commen ! () in operand
      hs. w1     f1.+1 ; f1=instr+instwmx,modefication
a36:  al  w2     6     ; rep:
      jl. w3     c97.  ; test and change
      jl.        a36.  ; goto rep if change
      jl. w3     c136. ; store f1 instr
    h.al  w1,    am    ;
    w.hs. w1     f1.   ;
      al  w1     0     ;
      jl.        c50.  ; goto action 0

c70:                   ; 40: as 8, rs=d0 
      al  w0     d0    ;
      jl.        b36.  ; goto a.4
c71:                   ; 42: as 8, rs=d13
      al  w0     d13   ;
      jl.        b36.  ; goto a.4
c72:                   ; 44: as 8, rs=d14
      rl. w2     f158. ;
      al. w0     a128. ;
      se  w2     2     ; if appetite>2 then
      rs. w0     f2.   ; return:=ammodify code
      al  w0     d14   ;
      jl.        b36.  ; goto a.4
\f

;rc 25.09.70 fortran pass8                    page 39
;central actions




c73:                   ; 46: read and send ext lists
                       ;    entry: f1=a:no of elelments  , -
                       ;           w1=no of bytes per element
                       ;    action:store list of elements, the bytes of
                       ;             the elements on the same segment;
                       ;             - used for globallists,externallists,
                       ;             commonlists, zonecommonlists specified by f1.
      rs. w1    f64.   ; store no of bytes
      bl. w1    f1.    ;
      rs. w1    f66.   ; store type of list=a:elements
      sn  w1    f80-f0 ; if global list
      jl.       a83.   ; no inbytes
      jl. w3    f135.  ; inbyte, stepping stone
      jl. w3    f135.  ; inbyte no of elements
      rs. w2 x1+f0.    ;
a84:  rs. w2    f71.
      al. w3    a87.   ;
      rx. w3    f2.    ; save return
      rs. w3    f20.   ;

a85:  rl. w2    f71.   ; loop for elements:
      sn  w2    0      ;
      jl.      (f20.)  ; return from action
      al  w2 x2-1      ;
      rs. w2    f71.   ;
a86:  rl. w2    f64.   ; rep: appetite:=no of bytes in elements
      jl. w3    c114.  ; goto extest and change
      jl.       a86.   ; goto rep if change
      rl. w2    f64.   ;
      ls  w2    -1     ; no of words in element
      rs. w2    f73.   ;
a87:  rl. w2    f73.   ; loop for words:
      sn  w2    0      ;
      jl.       a85.   ; goto element loop
      al  w2 x2-1      ;
      rs. w2    f73.   ;
      rl. w1    f66.   ;
      sn  w1    f80-f0 ;
      jl.       a88.   ; if global list
      sn  w1    f142-f0;
      jl.       a89.   ; if zone commen
a90:  jl. w3    f135.  ;
      hs. w2    f1.+1  ;
      jl. w3    f135.  ;
a91:  hs. w2    f1.    ;f1:=inbyte2, inbyte 1
      jl.       c94.   ; goto store instruction, return to word loop
\f

;rc 16.11.70 fortran pass8                    page 40
;central actions




a89:  se  w2    j10>1-1; zone commen:
      jl.       a90.   ;
      al  w0    0      ;
      rs. w0    f1.    ;
      jl. w3    f135.  ;
      wa. w2    f80.   ; add no of globals to external no
      hs. w2     f1.+1;
      jl.       c94.   ; return to loop

a83:  rl. w1    f91.   ; prepare for global list:
      al  w1 x1-1      ; w1:=ord byte
      al  w2 x1        ;
a92:  al  w2 x2+4      ; loop:
      sl. w2   (f33.)  ;w1=:a last globalno=0
      jl.       a93.   ; goto after loop
      bl  w3 x2        ;
      se  w3    0      ;
      jl.       a92.   ;
      al  w1 x1+4      ; w2=a:globalno=0
      dl  w0 x1        ; update w1 and change
      ds  w0 x2        ;
      jl.       a92.   ;
a93:  rs. w1    f13.   ; after loop: store last a: globalno=0
      rl. w2    f80.   ;
      rs. w2    f13.+2 ; store last global no
                       ;
      jl.       a84.   ; return to general lists

a88:  rl. w1     f13.+2;
      rl. w2     f67.  ;
      sn  w1     1     ;
      se  w2     0     ;
      jl.        a113. ;
      rs. w2     f1.   ; globalno=1&no data
      jl.        c94.  ; store globalelement:=0
a113: rl. w1    f13.   ; global list: get globalelement for
      al  w2 x1        ; global no (f13.+2)
a94:  al  w2 x2+4      ;
      bl  w3 x2        ;
      se. w3   (f13.+2);
      jl.       a94.   ;
      al  w1 x1+4      ;
      rl  w0 x2-1      ;
      ws. w0    f70.   ; sub 1th code segment
      rs. w0    f1.    ;
      dl  w0 x1        ; change
      ds  w0 x2        ; f13=a:last sent global elem
      rs. w1    f13.   ;
      rl. w1    f13.+2 ;
      al  w1  x1-1     ;
      rs. w1    f13.+2 ;
      jl.       c94.   ; goto store instr
\f

;rc 23.10.70 fortran pass8                    page 41
;central actions



c74:                   ; 48:
c75:                   ; 50: as20, skip no from tab.
                       ;    entry: f1=a:skipinstr relative to 1th skipinstr , -
                       ;           if f1=-1 then inbyte a:skipinstr
                       ;    action:check free bytes for skip and goto;
                       ;           store skipinstr and goto as in ac.20 -
                       ;               skipinstr preceeding jl instr.
  
      al. w0     b38.  ; return to action 20
      jl.        b50.  ; goto action 54

c76:                   ; 52: as22, skip no from tab.
                       ;    entry: as ac 50
                       ;    action:as ac 50,22;
      al. w0     b49.  ; return to action 22
      jl.        b50.  ; goto action 54

c77:                   ; 54: as24, skip no from tab.
                       ;    entry: as ac 50
                       ;    action: as ac 50,24;
      al. w0     b46.  ; return to action 24
b50:  al  w1     2     ; entry
      am         -1000
      rs. w1     f74.+1000  ; f74 := 2 for skip instr := true
      am         -1000
      bl. w1     f1.+1000   ;
      sl  w1     0     ;
      jl.        a139. ;
      am         -1000
      jl. w3     f135.+1000 ;
      ls  w2     1     ;
      al  w1  x2       ;
a139: am         -1000
      rs. w1     f75.+1000; f75:=a:skip instr rel to oth
                       ;   skip instr 
      al. w2     b40.  ; return to action 20, used
      am         -1000
      rx. w2     f2.+1000   ;   for jump to actual segment
      am         -1000
      rs. w2     f20.+1000  ;
      jl        (0)    ; goto action 20, 22 or 24

\f

;rc 77.10.31 fortran pass8                       page 42
;central actions



c78:                   ; 56: stack actual segno, rel
                       ;    entry: -
                       ;    action:stack actual segno,rel
      am         -1000
      jl. w3     c82.+1000  ; w0 := segno, rel
a124: am         -1000
      jl. w3     c86.+1000; stack(w0)
      am         -1000
      jl.       (f2.+1000)  ; return

c79:                   ; 58: macro algoritmes
                       ;    entry: f1=a:table entry for 1th instr  , -
                       ;    action:analyse operand and choose one of two instr:
                       ;           if operandtype=litlength=1th byte=0
                       ;           ! operand type=bytwmx=0
                       ;                 then choose 1th instr
                       ;                 else 2nd instr;
      am         -1000
      bl. w2     f1.+1000   ;
      am         -1000
      rl. w0     f66.+1000  ; w0 := operand kind
      se. w0     b29.  ;
      jl.        a20.  ;
      am         -1000
      rl. w1     f65.+1000  ; w1 := wmx part
      la. w1     b83.  ; if x register = 0 then
      sn  w1     0     ;
      jl.        a21.  ; goto use 1th table word
a20:  am         -1000
      rl. w1     f13.+1000 ; operand = byte x <> 0
                       ; ! operand <> byte
      se. w0     b30.  ;
      jl.        a22.  ; goto use 2nd table word
     sh  w1    2047   ;    (byte-range is:  -2047<=byte<=2047,
     sh  w1   -2048   ;     because of:  subw1 const => al w1 x1-const)
      jl.        a22.  ;
      al. w0     b29.  ; operand = short litt, change kind to byte op.
      am         -1000
      rs. w0     f66.+1000  ;
      jl.        a21.  ; goto use 1th table word
a22:  al  w2  x2+2     ;
a21:  am         -1000
      rs. w2     b54.+1000 ; save table pointer store pointer to tab word
      am         -1000
      jl.        c102.+1000 ; goto spec interpreter

b83:  3<12             ; mask for x register

c80:                   ; 60: store instr, wmx, const op.
                       ; and inbyted op.
                       ;    entry: f1=instr and wmx , -.
                       ;           w1=modifier of operand(usualy=0)
                       ;    action:inbyte operand; add modifier;
                       ;           check free bytes for instr on segment
                       ;           store instr, wmx and operand;
      am         -1000
      jl. w3     f135.+1000 ; w2 := inbyte
      wa  w1     4     ; w1 := w1+w2 = const op. + inbyted op
      am         -1000
      jl.        c55.+1000  ; goto action 10

c81:                   ; 62: store byte = bit 0-11
                       ;    entry: f1=operand
                       ;    action:store operand and operand specification:
                       ;               wmx=0, lentgh=1, type=byte;
      am         -1000
      rs. w1     f65.+1000  ; wmx part := 0
      al. w1     b29.  ;
      am         -1000
      rs. w1     f66.+1000  ; store op. kind := op. byte
      am         -1000 ;
      bl. w2     f1.+1000;
      jl.        b37.  ; goto action 6 to store byte



c.j0                   ; if testing time
c138: jl.        c95.  ; stepping stone
z.                     ;

\f

;rc 78.05.16 fortran pass8                       page 44
;main control table






; main control table
; each entry consist of  12 bit, 6 bit, 6 bit = action
; and it is interpreted by interpreter, action is jumped to  by
; swich. interpretation of preceeding tab word when action is even

;  contents of table   ;  inbyte no, name  , no of bytes when>1
g1=k+1,h.              ;
g0:0,1                 ;  0,not used
g86=g0-1000            ; stepping stone
   c120-f0 ,         3 ;  1, end 7
   c106-f0 ,         3 ;   , pass7      ,2
   g67     ,        16 ;   , unit 7
   g68     ,        16 ;   , funit 7   ,   8
g105=k>1-g0>1          ;
   g106    ,        16 ;   , newline
g9=k-c0                ;
   c119-f0 ,         3 ;   , gloentry,   list . last byte tobe saved for cat
   f141-f0 ,j9<6   +47 ;   , comlist,    list
   g69     ,        16 ;   , comzones,   list
   f140-f0 ,j8<6   +47 ;   , extlist,    list
   g38     ,        16 ; 10, entryvalue, list
   g35     ,        16 ;   , labvarlist, list
   g36     ,        16 ;   , entrypoint
   c113-f0 ,         3 ;   , dataentry
   c23-f0  ,         3 ;   , dataexist
   g77     ,12<6   +16 ;   , suite,      2
   0       ,        57 ;   , entry
g83=k>1-g0>1           ;
   c29-f0  ,         3 ;   , label,      2  *
   g32     ,        16 ;   , locinit
   rl w1   ,         1 ;   , rlw1
   c17-f0  ,         2 ; 20, cominit
   g34     ,        16 ;   , zoninit    , 6
   g30     , 14<6  +16 ;   , starray    , 4
   g101    ,        16 ;   , extzone   , 3
   0       , 1<6   +7  ;   , opx0       , 2
   aw x1   , 1<6   +7  ;   , opx1       , 2
   aw x2   , 1<6   +7  ;   , opx2       , 2
   aw x3   , 1<6   +7  ;   , opx3       , 2
   aw ()   , 1<6   +7  ;   , opx0i      , 2
   aw (x2) , 1<6   +7  ;   , opx2i      , 2
   aw (x3) , 1<6   +7  ; 30, opx3i      , 2
   0       ,18<6   +7  ;   , opcommon   , 3
   0       , 0<6   +7  ;   , opext      ,2
   0       , 2<6   +7  ; ,  , litt2      , 3
   0       , 4<6   +7  ;   , litt4      , 5
   0       , 8<6   +7  ;   , litt8      , 9
   g104    ,       59  ;   , hlw1
   hs w1   ,        1  ;   , hsw1
   rs w1   ,        1  ;   , rsw1
   g13     ,       59  ;   , loadw1
   g14     ,       59  ; 40, addw1
   g15     ,       59  ;   , subw1
   0       ,       15  ;   , (not used)
b64:g93    ,        16 ;   , mulw1 changed if spill alarm
   g110    ,        16 ;   , divw1

\f

;rc 78.05.08 fortran pass8                       page 45
;main control table



   al w1   ,        1  ;   , alw1
   ac w1   ,        1  ;   , acw1
   g11     ,       59  ;   , lsw1
   g12     ,       59  ;   , ldw1
   g26     ,       16  ;   , notw1
   g27     ,       16  ; 50, notw01
   la w1   ,        1  ;   , law1
   g87     ,       16  ;   , law01
   lo w1   ,        1  ;   , low1
   g88     ,       16  ;   , low01
   dl w1   ,        1  ;   , dlw1
   ds w1   ,        1  ;   , dsw1
   fa w1   ,        1  ;   , faw1
   fs w1   ,        1  ;   , fsw1
   fm w1   ,        1  ;   , fmw1
   fd w1   ,        1  ; 60, fdw1
   aa w1   ,        1  ;   , aaw1
   ss w1   ,        1  ;   , ssw1
   g28     ,       16  ;   , signlong
   rl w0   ,       43  ;   , signdoub
   g16     ,       59  ;   , loadw0
g70=k-g0               ; initzones
   rl w3   ,        1  ;   , rlw3
   rs w3   ,        1  ;   , rsw3
   g17     ,       59  ;   , addw3
   ds w1   ,d3<6   +9  ;   , regtouv
   g66     ,       16  ; 70, regtouv0
   dl w1   ,d3<6   +9  ;   , uvtow01
   g80     ,       16  ;   , drload
   g81     ,       16  ;   , drstore
   g73     ,       16  ;   , draddr
   g64     ,       16  ;   , i conv l
b65:g96    ,       16  ;   , l conv i ,changed if spill alarm
   ci w1   ,       11  ;   , i float r
b84:g71    ,       16  ;   , r trunc i
   g65     ,       16  ;   , r conv c
   dl w1   ,       43  ; 80, c trunc r
   g18     ,       59  ;   , shw0
   g10     ,       59  ;   , shw1
   g42     ,       59  ;   , slw1
   sh w0   ,-1<6  +11;   , shw0-1

\f

;rc 78.05.16 fortran pass8                       page 46
;main control table





   g29     , 6<6  +16  ;   , relation    , 2
   g90     ,      +16  ;   , amodify     , 6
   g25     ,14<6  +16  ;   , chlower  (room for: ls,sh,const,sh,const,jl,abs)
   g22     ,      +16  ;   , zindex
   g21     ,16<6  +16  ; 89, zrechk
   g20     ,12<6  +16  ;   , chzono
   0       ,       57  ;   , xxforw
   0       ,       21  ;   , goforw
   g78     , 4<6  +16  ;   , databack
   0       ,       25  ;   , gosimple
   -1      ,       55  ;   , goif        , 2
   -1      ,       51  ;   , go if forw  , 2
   rl w1   ,       33  ;   , prepjump
   c39-f0  ,        3  ;   , xxbackw
   c40-f0  ,        3  ;   , gobackw
   0       ,       31  ;   , goexternal  , 2
   g75     ,       16  ; 101,goformal
   g24     ,       16  ;   , complist    , list
   rs w2   ,        1  ;   , boolean first := false
   wm w1   ,        1  ;   , domul
   g43     , 4<6  +16  ;   , doclear (room for: se w2 (x2-rel), ld-65 )
   g44     ,       16  ;   , do go forw
   c38-f0  ,        3  ;   , xxchange
     0     ,       15  ;   , (not used)
     0     ,       15  ;   , (not used)
     0     ,       15  ;110, (not used)
     0     ,       15  ;   , (not used)
     0     ,       15  ;   , (not used)
     0     ,       15  ;   , (not used)
     0     ,       15  ;   , (not used)
     0     ,       15  ;   , (not used)
   g100    ,       16  ;   , parproc
   g99     ,       16  ;   , last used
   g76     , 2<6  +16  ;118, pointw01    , 3
   rs w2   , d1<6   +9 ;   , return
g84=k>1-g0>1
   c131-f0 ,        3  ;   , endformat   , 3
   c129-f0 ,        3  ;   , contform    , 3
   g89     ,       16  ;   , begform open, 3
   c130-f0 ,        2  ;   , beg form closed, 3,  continue
   jl w3   ,        5  ;   , gors        , 2
   jl w3   ,d15<6  +9  ;125, trouble
   c141-f0 ,        2  ; 126, trouble operand




; modifier table
w.
g2:     0 ; modifier table, 23 words, described in set modifier
      r.23;



j6=k-e0                ; entry pass8
      jl.         g82.  ; stepping stone

\f

;rc 21.08.71 fortran pass8                       page 47
;continuation table



; continuation table
;
; format as main control table, the name of the inbyte which
; uses a section  is placed at the end of the section. interpreta-
; tion proceeds upwards.
h.
   g39      ,        16;
   al w0 x2 ,         0;
   rs w0 x2 , -4<6  +10;
g41=k-g0               ; entry for main entry only
   rl w1 x2 , -4<6  +11;
   c112-f0  ,         2; goto next in if no.entries-1+data=0
g39=k-g0               ; return for main entry
   al w0 x2 ,        10;
   c18-f0   ,         2; code for entryvaluelist and ba
   rs w0 x2 , -4<6  +10;
   c24-f0   ,         2; code for entry point list
   0        ,  1<6   +6; inbyte 1th  -s:value
g60=k-g0               ; after entry point tab
   g6       ,        50; generate goto if snw10
   ls w1    ,  1<6  +10;
   c34-f0   ,         2; stack saved stack
   c25-f0   ,         2; code for appetite and place entry table
   jl       ,        40; rs goto point
   c33-f0   ,         2; save stack
   0        ,        56; declare main entry
   c26-f0   ,         2; code : if no.entries-1+data=0 goto g60
g38=k-g0               ; entry value

   rs w2    , d1<6   +9  ;
   jl w3    ,d20<6   +8; release zones
   jl w3    ,d19<6   +8  ; return from data
   c21-f0   ,         2; code - returns to c0
   0        ,        56; stack entry point
   am       ,  1<6  +10;
g37=k-g0               ; for am code
   c21-f0   ,         2; goto next in  if 1 entry only
   0        ,        56; stack entry point
   al w0    ,        10;
   c22-f0   ,         2; code for check appetite, and stack no of entries
   rl w2    , d1<6   +8;
   g13      ,        58; load macro
   f70-f0   ,  2<6  +36;  litt2:=-stacksize
   jl w3    , d2<6   +8;
   rs w2 x1 ,        10;
   ds w1 x2 , -2<6  +10;
   g13      ,        58; load macro
   f157-f0  , 2<6   +36; litt2:=size param area
   rs w1 x2 ,-6<6   +10;
g61=k-g0               ; no data
   c9-f0    ,         2; ajust used skip instr
   g62      ,        50;
   c10-f0   ,         2; data jump to after formal
g36=k-g0               ; entry point
   rl w1    ,        27;
   c41-f0   ,         2;
   rs w1 x2 ,        60; inbyte operand,store instr
g56=k-g0               ;
   c20-f0   ,         2;
g35=k-g0               ; labvarlist

   al w1 x2 ,        11;
   g14      ,        58; add
   c137-f0  ,         2;
g32=k-g0               ; locinit

\f

;rc 1.4.71 fortran pass8                       page 48
;continuation table



   al w1 x1 ,          1;
   -h5      ,         62;
   al w0     , 1<6  + 10;
   c11-f0    ,         2; goto next in if no of zones>0
   0        ,  1<6   +6; inbyte no of zones
   ds w1    , d3<6   +8; return from single zones
   al w1 x1 ,         0;
   h5       ,        62; store length of zonedescr.
   g16      ,        58;
   0        ,  2<6   +6; inbyte bufsize
   rs w0 x1 ,         0;
   h0+2     ,        62; store addr. of bufsize
   al w0    ,        60;
   rs w0 x1 ,         0;
   h0       ,        62; store addr. of no of shares
   rl w0    ,        26;
   0        ,  1<6  +12; inbyte and stack external
   al w3    ,        10;
   ds w0 x1 ,         0;
   h4+2     ,        62; store addr. of blockproc
g59=k-g0               ;
   g59      ,  4<6  +16; 2 instr,w3
   jl w3    , d4<6   +8; rs init zones
g34=k-g0               ; zoneinit

   al w3    ,        61; inbyte typemask
   la w3    ,        10;
   se w3    ,        60; inbyte compare
   jl w3    , d5<6   +8;
g31=k-g0               ;
   g31      , 10<6  +16; appetite for jump and w3
   g4       ,        50; skip, goto name
   ls w0    , -5<6  +10;
   g15      ,        58; sub macro
   0        ,  1<6   +6; inbyte length
   jl.      , 14<6  +10;
   0        ,        56; stack addr. of name
   rl w3 x1 ,        10;
   ba w1    ,        10; reg 0
   rl w0 x1 , -2<6  +10;
   ws w0 x1 ,        10;
   rl w1 x1 ,        10;
   wa w1    ,  6<6  +10; reg 3
g30=k-g0               ; starray

   am       , -1<6  +11;
   -1       ,  4<6  +19; inbyte skipno, store am and skip
   al w1    ,  1<6  +10;
g29=k-g0               ; relation

   jl.      ,  6<6  +11;
   g58      ,  4<6  +19; check free bytes, store next and skip
   al w0    ,  1<6  +10;
   g5       ,  8<6  +18;
g28=k-g0               ; sign long

\f

;rc 78.05.16 fortran pass8                       page 49
;continuation table






   lx w1    ,         1;
   f76-f0   ,  2<6  +36; store litt2 = 2.11...1
g26=k-g0               ; not w1

   lx w0    ,         0;
   f76-f0   ,  2<6  +36; store litt = 2.11...1
g27=k-g0               ; not w01

   g10      ,        59; sh code
   jl w3    , d6<6   +8; rs index err
g25=k-g0               ; chlower

   sh w1    ,        11;
   al w1    ,  1<6  +10;
   k-g0     ,  4<6  +16;
   sl w1    ,         0;
   al w1    ,         0; operand = no of labels
   k-g0     ,  4<6  +16;
   as w1    ,  2<6  +10;
   jl.   x1 , -2<6  +10;
   c46-f0   ,         2;
   0        ,        22; inbyte labelno, goto
g57=k-g0               ;
   c12-f0   ,         2;
   0        ,  1<6   +6; inbyte label no
g24=k-g0               ; complist

   sh w1(x3),         1;
   h3+4     ,        62; store addr. of record length
   sh w1    ,        10;
   jl w3    , d7<6   +8; rs zone alarm
   wa w1 x3 ,         0;
   h3       ,        62; store addr. of record base
g21=k-g0               ; zrechk
   sh w1    ,        11;
   jl w3    , d8<6   +8;
   k-g0     , 10<6  +16; (check room for: sh, const, sh, jl, abs)
   wm w1    ,         0;
   f162-f0  ,  2<6  +36; store litt = h5 (size of zone descr)
g22=k-g0               ; zindex

   bl w1    ,        11;
   al w0 x1 ,  1<6  +10;
   g18      ,        58; sh code
   jl w3    , d9<6   +8;
g20=k-g0               ; chzono

\f

;rc 78.05.16 fortran pass8                       page 50
;continuation table



   se w2 (),       39  ;   skip unless first time in doloop
   ld w1   , -65       ;   clear w0w1
   c42-f0  ,        2  ;   store next instruction
g43=k-g0               ; doclear:


   g8      ,       51  ;   skip, goto after init;
   c43-f0  ,        2  ;   move opand-byte to skip instruction;
g44=k-g0               ; do go forw:

\f

;rc 78.05.16 fortran pass8                       page 51
;continuation table

   bl w0    , 2<6   +11;
   bl w0    ,        10;
g64=k-g0               ; i conv l

   ds.w1 () ,         43;
   ld w1    ,         0;
   65       ,        62;
   ds.w1 () ,         44;
g65=k-g0               ; r conv c

   0      ,           57; stack externallist entry
   c118-f0,            2; outbyte 1th head word
   c116-f0,            2; outbyte 2 nd head word
   f80-f0 ,j11<6     +46; global list
g67=k-g0                ; unit

   0      ,           57;stack funitseg,rel
   c111-f0  ,         2; code
g68=k-g0                ;funit

   f142-f0,j10<6     +47;zonecommenlist
   c117-f0,            2;outbyte creationdate
   c115-f0,            2;data global and creationtime
g69=k-g0                ;comzones
 
   rl w1    ,     1  ; w01:=formals
   al w0    ,    10  ; stack:=0
   jl       ,    40  ; rs goto point
g75=k-g0               ; goformal

   rl w0    ,        29; ref to absw
   rl w1    ,         0;
   c122-f0  ,         2; litt2:=paramno*4,  rel +1
   0        ,  2<6   +6; litt2:=paramno
   ds w1 x3 ,  4<6  +10;
   c121-f0  ,   2<6   +2; code j19:=2
g76=k-g0               ; point w01

   g77      ,22<6   +17;
   c125-f0  ,         2;
g77=k-g0               ; suite
\f

;rc 78.05.08 fortran pass8                   page 52
;continue table




   se w3 (),         1;
   jl.      , -12<6 +10;
g79=k-g0               ; 
   se w3 () ,         1;
   jl.      , -6<6  +10;
   c124-f0  ,         2; code: goto g79 if regstore=drstore
g78=k-g0               ; databack

   dl w1    ,         1;
   c135-f0  ,         2;
   ds w1    ,        44;
   dl w1    , -4<6  +38;
   c134-f0  ,  6<6  + 2; (appetite amodify: rlw3,wa.w3,const,dlw1,ds.w1,abs,dlw1)
   ds w1    ,        42;
g80=k-g0               ; drload

   dl w1    ,        45;
   ds w1    ,         0;
   c135-f0  ,         2;
   dl w1    ,        42;
   ds w1    , -4<6  +38;
   c134-f0  ,  6<6  + 2; (amodify appetite: rlw3,wa.w3,const,dsw1,dl.w1,abs,dsw1)
g81=k-g0               ; drstore

   c132  -f0,        3; store f132
   c132+2-f0,        2; store f131
   c129-f0 ,         2; as contform
g89=k-g0              ; begform closed

   al w1    ,         9;
   d14      ,        62; w1:=a:dr
g73=k-g0               ; draddr

b85=k-2000             ; (continuation address after amodify)
     0      ,        16;   goto continue after amodify code (often = g96)
   rl w3 x2 ,         0;
b63=k-2000             ;
g91=k-g0               ;
     0      ,        62; 1 byte is stored=<-s:base>, entry for index=one byte
   wa w3    ,         0;
g92=k-g0               ;
   f160-f0  , 2<6   +36; litt2:=saved index, entry for index=two bytes
   c133-f0  ,         3; goto code for appetite ect.
   aw   x3  , 2<6    +6; litt2, x3
g107=k-g0              ;
   rl w3 x2 ,-2<6   +10; if parameter
   c139-f0  ,         2;
g90=k-g0               ; amodify

   wm w1    ,         1;
g93=k-g0               ; no spill alarm
   c135-f0  ,         2;
   sh w1    ,-1<6   +10;
   am       ,-1<6   +10;
   se w0    ,        10;
   jl.w3    ,d17<6   +8;
   c134-f0  , 10<6   +2; (appetite amodify: rlw3,wa.w3,const,wmw1,shw1,am,sew0,jl,abs)
g94=k-g0               ;
   g94      ,10<6   +16;
g95=k-g0               ; mult

   la w1    ,         1;
   c135-f0  ,         2;
   la w0    , -2<6  +38;
   c134-f0  ,  2<6   +2; (appetite amodify: rlw3,wa.w3,const,law1,law0)
g87=k-g0               ; law01:

   lo w1    ,         1;
   c135-f0  ,         2;
   lo w0    , -2<6  +38;
   c134-f0  ,  2<6   +2; (appetite amodify: rlw3,wa.w3,const,low1,low0)
g88=k-g0               ; low01:
\f

;rc 78.04.18 fortran pass8                    page 53
;central actions





   0        ,        15; nothing
g96=k-g0               ; no spill alarm
   sh w1    ,-1<6   +10;
   am       ,-1<6   +10;
   se w0    ,        10;
   jl.w3    ,d17<6   +8;
g97=k-g0               ;
   g97      ,10<6   +16;
g98=k-g0               ; l conv i

   rl w3    ,        11; w3 := sign (operand)
   sh w3    ,-1<6   +10;
   fm.w1    ,         0; w0w1 := abs (operand)
   f163-f0  , 4<6   +36; (operand = floating -1.0)
   fs.w1    ,         0;
   f164-f0  , 4<6   +36; (operand = floating 0.5)
   cf w1    ,        10; w1 := entier ( abs (operand))
   sh w3    ,-1<6   +10;
   ac w1 x1 ,        10; w1 := ifix(operand)
   k-g0     ,22<6   +16; (room for whole sequence)
g71=k-g0               ; r trunc i:
   cf w1    ,        11;
g72=k-g0               ; r conv i:

   rl w3 x2 ,-2<6   +11;
   c121-f0  , 0<6    +2; code j19:=0 
g99=k-g0               ; last used

   rl. w1   ,        27;
   0        , 1<6   +12;
   0        , 1<6    +6; inbyte operand external (not to be used)
g100=k-g0              ; parproc

   al.w1    ,        35;
   rs w1    ,         0;
   aw x2    , 1<6    +6; inbyte stack rel
g101=k-g0              ; extzone
   rs w1    ,         9;
   d16      ,        62;
g66=k-g0               ; reg to uv0
 
   b74-f0   ,         3; goto label for format test
   e1-f0    ,         2;
g106=k-g0              ; new line
   bl w0    , 2<6    +11; extend sign
   bl w0    , 0<6    +10;  from w1 to w0
   wd w1    ,         0;
g110=k-g0              ; div w1




\f

;rc 06.11.70 fortran pass8                       page 54
;macro




; macro instruction tabel
;
; format as main and continuation table. entry is used for operand-
; byte and x = 0  or operand = short litteral, for other cases entry+2
; is used (action 58).

g10=k-g0               ; sh w1
   sh w1    ,         1;
   sh w1 ( ),        39;

g18=k-g0               ; sh w0
   sh w0    ,         1;
   sh w0 ( ),        39;

g42=k-g0               ; sl w1
   sl w1    ,         1;
   sl w1 ( ),        39;

g11=k-g0               ; ls w1
   ls w1    ,         1;
   ls w1 ( ),        39;

g12=k-g0               ; ld w1
   ld w1    ,         1;
   ld w1 ( ),        39;

g13=k-g0               ; load w1
   al w1    ,         1;
   rl w1    ,         1;

g16=k-g0               ; load w0
   al w0    ,         1;
   rl w0    ,         1;

g14=k-g0               ; add w1
   al w1 x1 ,         1;
   wa w1    ,         1;

g17=k-g0               ; add w3
   al w3 x3 ,         1;
   wa w3    ,         1;

   al w1 x1 ,         1;
g15=k-g0               ; sub w1
   c15-f0   ,         2;
   ws w1    ,         1;

g104=k-g0              ; hl w1
   al w1    ,         1;
   hl w1    ,         1;

\f

;rc 78.05.16 fortran pass8                       page 55
;skip instr




; skip instructions
; the first 16 instructions is used in relations and logical mask, addr.
; relative to g3 is inbyted.

w.


g3:   so  w0     1     ;
g103=g3-1000           ;
      sh  w0     0     ;
g58=k-g3               ;
      se  w0     0     ; signlong
      sh  w0    -1     ;
g7=k-g3                ;
      sl  w0     0     ; dotest
g62=k-g3               ;
b53=k+1-1000           ;
      sn  w0     0     ; entrypoint
      sl  w0     1     ;
      sz  w0     1     ;
      so  w1     1     ;
      sh  w1     0     ;
g5=k-g3                ;
      se  w1     0     ; signlong
      sh  w1    -1     ;
      sl  w1     0     ;
g6=k-g3                ;
      sn  w1     0     ; entryvalue
      sl  w1     1     ;
      sz  w1     1     ;
g4=k-g3                ;
      so  w0   2.11000 ; starray
g8=k-g3                ;
b86=k+1-2000           ;
      sn  w2 (x2+0-0-0); skip if first do loop


\f

 ;rc 85.09.30 fortran pass 8                    page 55a
; test print



a147: ds. w2     a118. ;
      al. w1     g108. ;
a143=a147-2000         ;
      jl.         6    ;
a148: ds. w2     a118. ;
      al. w1     g109. ;
a146=a148-2000         ;
      ds. w0     a145. ;
      al  w2    -2000  ;
      al  w2  x2-1000  ;
      rl. w0  x2+e17.+3000;
      so  w0     1<2   ;
      jl.        a119. ; return if not details
c.j20                   ; if test mode then load
w.
      jl. w3  x2+e4.+3000 ; write text
      bl. w0     a145.    ;
      jl. w3  x2+e16.+3000; write contents of stacktop
      rl. w0     a145.    ;
      jl. w3  x2+e16.+3000;
      rl. w0  x2+e9.+4+3000; write length of stack
      ws. w0  x2+f35.+3000;
      jl. w3  x2+e16.+3000;
z.
a119: dl. w2     a118. ;
      rl. w0     a145. ;
      jl.        (a144.); return
a144:            0     ; saved w3
a145:            0     ; saved w0
                 0     ;
a118:            0     ; saved w1,w2
g108:<:                          stack<0>:>
g109:<:                        unstack<0>:>

\f

;rc 85.09.30 fortran pass8                       page 55b
;subroutines


c.j0 b. b12,a2          ; if test mode then load:
w.
c95:  al  w1  x1+2     ; instr print: return in f2, w0 = instr, w1 = addr - 2.
                       ; called from store instr,
                       ;  writes:rel addr,segno, instr,wmx,operand,nl
      al  w2    -2000  ;

      ws. w1  x2+f15.+2000;   w0 := rel address := top instr + 2 - segment base;
      rx  w1     0     ;   w1 := instr;
      al. w2  x2+c0.+2000;   w2 := stepping stone to gpa;
      al  w3     10    ;
      rs  w3  x2+e42-c0;   print count := 10;
      jl  w3  x2+e16-c0;   print byte (rel address);
      am        -2000  ;
      bz. w0     f24.+2000;
      jl  w3  x2+e14-c0;   write integer (current segm,
      32<12     +6     ;   blanks, max 6 positions);

      al  w3     0     ;
      al  w0  x1       ;   w0 := instr;
      ld  w0     6     ;   w3 := basic operation part
      ls  w3     1     ; * 2   
      rl. w1  x3+b0.   ;
      rs. w1     b1.   ;   text1 := mnemonics (basic operation part);
      al  w3     0     ;
      ld  w0     3     ;   w3 := w part and relative mark
      ls  w3     1     ; * 2   
      rl. w1  x3+b6.   ;
      rs. w1     b2.   ;   text 2 := w table(w3);
      rl. w1     b8.   ;
      sh  w0    -1     ;
      rl. w1     b9.   ;   end text := if relative mark then
      rs. w1     b5.   ;   <:)nl:> else <:nl:>;
      al  w3     0     ;
      ld  w0     3     ;   w3 := indirect and xpart
      ls  w3     1     ; * 2   
      rl. w1  x3+b7.   ;
      rs. w1     b3.   ;   text3 := xtable(w3);
      rl. w1     b10.  ;   w1 := sign := <:+:>;
      sl  w0     0     ;   if  displacement <0 then
      jl.        a0.   ;   begin
      rl. w1     b11.  ;    w1 := sign := <:-:>;
      ac  w0    (0)    ;    displacement := displacement
a0:   ls  w0    -12    ;   end;
      rs. w1     b4.   ;   text4 := sign;
      al. w1     b1.   ;
      jl  w3  x2+e13-c0;   writetext (text1 to 4);
      jl  w3  x2+e14-c0;   writeinteger (displacement, nuls, max 4 pos.);
      0<12      +4     ;
      al. w1     b5.   ;
      jl  w3  x2+e13-c0;   writetext (end text);
      am         -2000 ;
      jl.       (f2.+2000);   return;

b1:0,b2:0,b3:0,b4:0,b5:0       ; text 1,...text 4, end text
b6:<: w0.w0 w1.w1 w2.w2 w3.w3:>; w table
b7:<:    x1 x2 x3(  (x1(x2(x3:>; x table
b8:<: :>, b9: <:):>            ; end texts
b10:<:+:>  , b11:<:-:>         ; sign of displacement

b0: <: 00 do el hl la lo lx wa ws am wm al ri jl jd je:> ; mnemonics
    <: xl es ea zl rl sp re rs wd rx hs xs gg di ap ul:> ;
    <: ci ac ns nd as ad ls ld sh sl se sn so sz sx gp:> ;
    <: fa fs fm ks fd cf dl ds aa ss dp mh lk ix 62 63:> ;
e.z.                   ; end test mode

\f

;rc 07.07.70 fortran pass8                       page 56
;ext tab and lab tab



w.

j8 =k+1   ;a:byte preceeding external table


;external table


;the table consists of 2 bytes per externalno and per rs entry:
;                                                  
; !      !                           !                          !
; !ext   --------------------------------------------------------
; !no    ! seg. for last ref. to ext.!       g:absword          !
; v      --------------------------------------------------------
;        !                           !                          !
;
;the table is placed and initiated for every program unit.




;label table

;the table consists of 4 bytes per program label and per pass8 label
;
;  !              !             !              !            !
;  ----------------------------------------------------------      !
;  !     segno    !      rel    !   globalno   !   g:absword!      !  lab
;  ----------------------------------------------------------      !
;  !              !             !              !            !      v  no
;
;the table bytes for the programlabels(given by pass5) is placed and 
;initiated;  pass8 labels(used in doloops and data) gets a labelno  and
;the tablewords is filled with zeroes when they turns up.
;for defined labels segno,rel means place of definition.
;for undefined labels is rel=0 and segno=seg for last reference. undefined
;labels gets a globalno once they are refered to, g:absword is used for
;chains.
;
\f

;rc 18.09.70 fortran pass8                   page 57
;do loop labels






; do loop labels

; survey of pass8 labels and xxlabels(labels saved in stack and not in
;label table) used in doloops and implied loops:
;* notes that a label is used undefined(is a global)
;(p1 is stored in f94, and p2 is stored in f95)


;
;   type of loop    labelno  pass8 labels        xxlabels
;   ------------    -------  ------------        --------

;   do general        p2-1    afterdo             step
;                     p2      step    *           doloop
;                     p1      test    *
;
;   do special        p2-1    afterdo             test
;                     p2      step    *  
;
;  implied general    p2-1    loop    *           impinit
;                     p2      test    *           step
;                                                 step
;                                                 afterdo
;
;  implied special    p2-1    loop    *           impinit
;                     p2      test    *           afterdo
;

\f

;rc 18.09.70 fortran pass8                   page 58
; do loop labels






;algoritmes for leading bytes:
;
;doinit(do gen,imp gen):
;      declare tes tand store in labeltable;
;      generate goto step;
;      generate instructions;
;dotest(do gen):
;      declare step and store in label table;
;      generate goto afterdo;
;      generate skip goto doloop;
;      stack segno,rel for step;
;      p2:=old p2, saved as afterdo s globalno;
;      (implied):
;      save stacktop; declare and stack step; stack saved top;
;      generate goto afterdo;
;      generate skip goto loop;
;dofalse(do gen, imp gen):
;      generate 2 instructions;
;dostep(do gen):
;      declare and stack doloop;
;      p1:=p1+1; initiate labeltable for p1;
;      generate goto test;
;      test free bytes and generate 4 instructions;
;doend(do gen, do spec):
;      p1:=p1+1; initiate labeltable for p1; globalno:=p2;
;      p1:=p1+1; initiate label table for p1;
;      p2:=p1;
;      declare afterdo and store in labeltable;
;      generate goto step;
;      fimp:=false;
;dospec(do spec):
;      declare step and store in label table;
;      generate goto test;
;      p2:=old p2 saved as globalno for afterdo;
;prepafter(dospec,imp spec):
;      get segno,rel for afterdo from action 20;
;      generate rl a:absw if segno<> actual segno;
;goafter(do spec, imp spec):
;      store segno,rel for afterdo in action 20;
;      test free bytes;
;      generate jl instr;

\f

;rc 18.09.70 fortran pass8                   page 59
;do loop labels



;impbeg(imp gen,imp spec):
;      fimp:=false;
;      declare loop and store in label table;
;      generate goto impinit;
;      p2:=stacktop;
;impinit(imp gen):
;      save stacktop; declare and stack impinit; stack saved top;
;      generate goto step;
;impstep(imp gen):
;      fimp:=true;
;      stack old p2;
;      declare and stack afterdo;
;      p1:=p1+1;  initiate label table for p1;
;            --              -- ;
;      genenrate goto test;
;      test free bytes and generate  instr;
;xximp(imp spec):
;      declare test and store in label table;
;imploop(imp spec):
;      save stacktop; declare and stack impinit; stack saved top;
;      generate goto loop;
;goimp(do spec):
;      stack old p2;
;      declare and stack afterdo;
;      p1:=p1+1; initiate label table for p1;
;         --                 --;
;      p2:=p1;
;      generate goto test;
;      fimp:=true;

\f

;rc 24.09.70 fortran pass8                    page 60
;use of stack


;use of stack

; 1)during handling of units the stack is used for temporary
;   savings of xxlabels
; 2)for every unit entrypoints are saved as follows:
;
;   !                                   !
;   !                                   !  n-1 th unit
;   ----------------------------------------
;   !    unit seg     !       rel       !
;   -------------------------------------
;   !   program seg   !       rel       !
;   -------------------------------------
;   ! last entry seg  !       rel       !
;   -------------------------------------
;   !        .        !        .        !
;   !        .        !        .        !    n th unit
;   !        .        !        .        !
;   -------------------------------------
;   !  2nd entry seg  !       rel       !
;   -------------------------------------
;   ! main entry seg  !       rel       !
;   -------------------------------------
;   ! end of unit seg !  no of entries  !
;   ----------------------------------------
;   !                                   !   n+1 th unit
;   !                                   !


\f

;rc 78.04.18 fortran pass8                       page 61
;initialisation




;initialisation
g82:  al. w3     j18.  ; stepping stone
      al  w3  x3+c0-j18;
     rl  w1  x3+f98-c0 ;
     al  w1  x1+e39    ;
     rs  w1  x3+f98-c0 ;length of useable part of segment
      al. w1     j8.   ;
      rs  w1  x3+f89-c0; label table start
      sl  w1 (x3+e9+4-c0);
     jl      x3+b23-c0 ;goto alarm <:stack:>
      al  w1     0     ;
      rs  w1  x3+e9-c0 ; 0 in pass inf 1 and 2
      rs  w1  x3+e9+2-c0;
      rl  w1  x3+e9+4-c0;
     rs  w1  x3+f35-c0 ;stacktop:=last of core
     rs  w1  x3+f36-c0 ;
     rl  w1  x3+e6-c0  ;
     rs  w1  x3+f28-c0 ;prevline:=line count
     al  w0     g72    ;
     rl  w1  x3+e29-c0 ; if trunc.no then
     so  w1     1<0    ;
     hs. w0     b84.   ; change r trunc i
      rl  w1  x3+e17-c0; w1=mode bits
      so w1     1<6   ; if overflow alarm
      jl.       a130. ;
      al  w0    g95   ; change mult
      hs. w0     b64.  ;
      al  w0    g98   ; change l conv i
      hs. w0     b65.  ;
a130:                   ; creation time
      dl  w1  x3+e74-c0 ;
      ds  w1  x3+f151-c0;
      jl     x3+c0-c0  ;next in as return

j5=k-e0                ;length of pass 8

e30 = e30 + j5      ; length := length + length pass 8;


i.

e.                     ;end pass 8
m. rc 85.09.30 fortran, pass 8
▶EOF◀