Instead insert the fake copyright just before we call the client with go and remove it before control is returned back to the interpreter.
This effectively hides the notice from everyone except for bootloaders.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- openbios-devel/arch/ppc/qemu/init.c | 3 +++ openbios-devel/arch/ppc/qemu/qemu.fs | 12 +++++------- 2 files changed, 8 insertions(+), 7 deletions(-)
diff --git a/openbios-devel/arch/ppc/qemu/init.c b/openbios-devel/arch/ppc/qemu/init.c index 2b5b8e1..1a1aecb 100644 --- a/openbios-devel/arch/ppc/qemu/init.c +++ b/openbios-devel/arch/ppc/qemu/init.c @@ -601,6 +601,9 @@ go(void) { ucell addr;
+ /* Insert fake copyright notice for OS 9 and below */ + fword("insert-fake-copyright"); + feval("saved-program-state >sps.entry @"); addr = POP();
diff --git a/openbios-devel/arch/ppc/qemu/qemu.fs b/openbios-devel/arch/ppc/qemu/qemu.fs index 9e2479d..da273c2 100644 --- a/openbios-devel/arch/ppc/qemu/qemu.fs +++ b/openbios-devel/arch/ppc/qemu/qemu.fs @@ -121,18 +121,16 @@ variable keyboard-phandle 0 keyboard-phandle ! active-package! ;
+: (exit) + \ Clean up before returning to the interpreter + delete-fake-copyright +; + \ ------------------------------------------------------------------------- \ Adler-32 wrapper \ -------------------------------------------------------------------------
: adler32 ( adler buf len -- checksum ) - \ Since Mac OS 9 is the only system using this word, we take this - \ opportunity to inject a copyright message that is necessary for the - \ system to boot. - insert-fake-copyright - - ( adler buf len ) - " (adler32)" $find if execute else