Author: stepan Date: 2008-08-07 01:24:48 +0200 (Thu, 07 Aug 2008) New Revision: 223
Modified: openbios-devel/forth/system/ciface.fs Log: add set-callback for Aurora 2.0
Modified: openbios-devel/forth/system/ciface.fs =================================================================== --- openbios-devel/forth/system/ciface.fs 2008-08-06 18:24:51 UTC (rev 222) +++ openbios-devel/forth/system/ciface.fs 2008-08-06 23:24:48 UTC (rev 223) @@ -11,6 +11,8 @@ \ private stuff \ -------------------------------------------------------------
+variable callback-function + : ?phandle ( phandle -- phandle ) dup 0= if ." NULL phandle" -1 throw then ; @@ -267,7 +269,12 @@ \ ." --- " cr ;
-\ : set-callback ( newfunc -- oldfunc ) ; +: set-callback ( newfunc -- oldfunc ) + callback-function @ + swap + callback-function ! +; + \ : set-symbol-lookup ( sym-to-value -- value-to-sym ) ;