.weakref Example

The following example makes three weak references to a C language library function called _A_Internal_function and shows how two user modules implement the weak references.

In the library:

_A_Internal_function()
<{>
...................
<}>
.weakref Intfunc1, _A_Internal_function
.weakref Intfunc2, _A_Internal_function
.weakref Intfunc3, _A_Internal_function

In user module 1:

jsr IntFunc1       #__A_Internal_function is called
                  #here
jsr IntFunc2         #IntFunc2 is called.
.end

In user module 2:

.globl IntFunc2
IntFunc2:          #IntFunc2 preempts the weak
                  #reference.
.......
.end