This allows us to optionally intercept and execute code before returning back to the Forth interactive console.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- openbios-devel/forth/system/ciface.fs | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/openbios-devel/forth/system/ciface.fs b/openbios-devel/forth/system/ciface.fs index fd6c54e..85a6076 100644 --- a/openbios-devel/forth/system/ciface.fs +++ b/openbios-devel/forth/system/ciface.fs @@ -326,6 +326,14 @@ external
: exit ( -- ) ." EXIT" + + \ Execute (exit) hook if one exists + s" (exit)" $find if + execute + else + 2drop + then + outer-interpreter ;