anchor.diff:  
   libc sleep int (int) sleep
   libc cwrite int ptr int (int) write
  -1 lastname count cwrite .
  +1 lastname count cwrite . cr
   1 sleep .
   [then]
  
positive.code: 
  : lastbody ( -- addr )
     lastname name>xt xt>body ;
  
  : fn ( libhandle "name" -- )
     lastbody 9 cells + \ args
     here cell- @ \ ret
     here cell-  lastbody 9 cells +  - 1 cells / \ nargs
     lastbody cell+ \ cif  
     ffprep abort" Unable to prepare function call" 
     0 parse rot dlsym dup 0= abort" Unable to lookup symbol" lastbody ! ;
  
  : int ( -- ) ffint , ;
  : int64 ( -- ) ffint64 , ;
  : sf ( -- ) fffloat , ;
  : df sf ; \ XXX
  : ptr ( -- ) ffptr , ;
  : (int) ( -- ) ffint , fn ;
  : (int64) ( -- ) ffint64 , fn ;
  : (float) ( -- ) fffloat , fn ;
  : (ptr) ( -- ) ffptr , fn ;
  : (void) ( -- ) ffvoid , fn ;
  
  : newfun ( lib -- )
     create 0 , 8 cells allot \ func|cif, will be filled by "ret"
     does> dup @ swap cell+ ffcall ;
  
  : trylib
     s" lib" pad place 2swap pad append pad append  pad count dlopen ;
  
negative.code:    2drop r>
     dup 0= abort" Unable to open library" ;
  
  : libname 3 cells + ;
  
  : restorelib ( lib -- )
     dup libname count openlib over ! 
     dup libfuncs begin @ dup while 2dup link>fun funresolve repeat 2drop ;
  
  
  \ Structure: handle|liblink|funclink|name
  : library ( "forthname" "libname" ) 
     create here 
     0 ,             \ handle
     libs linked     \ link
     0 ,             \ funcs
     0 parse s, \ name
     restorelib
     does> newfun ;
  : link>lib cell- ;
  
  
  create 0buffer 256 allot
  
  :noname
     libs begin @ dup while dup link>lib restorelib repeat drop
     deferred coldchain ; is coldchain
  
  0 [if]
  