In order to implement static methods it is necessary to add a new Forth-C binding that allows 2 parameters to be passed to the C bindings.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- libopenbios/clib.fs | 10 ++++++++++ 1 file changed, 10 insertions(+)
diff --git a/libopenbios/clib.fs b/libopenbios/clib.fs index 04dd0aa..4f34c7b 100644 --- a/libopenbios/clib.fs +++ b/libopenbios/clib.fs @@ -34,3 +34,13 @@ swap ['] (lit) , , ['] (lit) , , ['] call , is-func-end ; + +\ is-2arg-cfunc installs a function with 2 arguments +: is-2arg-cfunc ( funcarg2 funcarg1 funcaddr word word-len -- ) + is-func-begin + rot ['] (lit) , , + swap ['] (lit) , , + ['] (lit) , , + ['] call , + is-func-end +;