+
+
+# transfer table linkage routine
+#
+ .globl _qlinker
+_qlinker:
+ .word 0xfc0 # save all possible registers
+# movab qlinbuf,r0 # profiling
+# jsb mcount # profiling
+ tstl _exception # any pending exceptions
+ jeql noexc
+ tstl _sigintcnt # is it because of SIGINT
+ jeql noexc # if not, just leave
+ pushl $2 # else push SIGINT
+ calls $1,_sigcall
+noexc:
+ movl 16(fp),r0 # get return pc
+ addl2 -4(r0),r0 # get pointer to table
+ movl 4(r0),r1 # get atom pointer
+retry: # come here after undef func error
+ movl 8(r1),r2 # get function binding
+ jleq nonex # if none, leave
+ tstl _stattab+2*4 # see if linking possible (Strans)
+ jeql nolink # no, it isn't
+ ashl $-9,r2,r3 # check type of function
+ cmpb $5,_typetable+1[r3]
+ jeql linkin # bcd, link it in!
+nolink:
+ pushl r1 # non, bcd, call interpreter
+ calls $1,_Lfuncal
+ ret
+
+linkin:
+ ashl $-9,4(r2),r3 # check type of function discipline
+ cmpb $0,_typetable+1[r3] # is it string?
+ jeql nolink # yes, it is a c call, so dont link in
+ movl (r2),r2 # get function addr
+ movl r2,(r0) # put fcn addr in table
+ jmp 2(r2) # enter fcn after mask
+
+nonex: pushl r1 # non existant fcn
+ calls $1,_Undeff # call processor
+ movl r0,r1 # back in r1
+ jbr retry # for the retry.
+
+