summaryrefslogtreecommitdiffstats
path: root/src/roms/openbios/forth/system/main.fs
diff options
context:
space:
mode:
authorTimothy Pearson <tpearson@raptorengineering.com>2019-05-11 15:12:49 -0500
committerTimothy Pearson <tpearson@raptorengineering.com>2019-05-11 15:12:49 -0500
commit9e80202352dd49bdd9e67b8b906d86f058431505 (patch)
tree5673c17aad6e3833da8c4ff21b5a11f666ec9fbe /src/roms/openbios/forth/system/main.fs
downloadhqemu-master.zip
hqemu-master.tar.gz
Initial import of abandoned HQEMU version 2.5.2HEADmaster
Diffstat (limited to 'src/roms/openbios/forth/system/main.fs')
-rw-r--r--src/roms/openbios/forth/system/main.fs60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/roms/openbios/forth/system/main.fs b/src/roms/openbios/forth/system/main.fs
new file mode 100644
index 0000000..122ab1f
--- /dev/null
+++ b/src/roms/openbios/forth/system/main.fs
@@ -0,0 +1,60 @@
+\ tag: misc useful functions
+\
+\ Open Firmware Startup
+\
+\ Copyright (C) 2003 Samuel Rydh
+\
+\ See the file "COPYING" for further information about
+\ the copyright and warranty status of this work.
+\
+
+variable PREPOST-list
+variable POST-list
+variable SYSTEM-list
+variable DIAG-list
+
+: PREPOST-initializer ( xt -- )
+ PREPOST-list list-add ,
+;
+
+: POST-initializer ( xt -- )
+ POST-list list-add ,
+;
+
+: SYSTEM-initializer ( xt -- )
+ SYSTEM-list list-add ,
+;
+
+: DIAG-initializer ( xt -- )
+ DIAG-list list-add ,
+;
+
+
+\ OpenFirmware entrypoint
+: initialize-of ( startmem endmem -- )
+ initialize-forth
+
+ PREPOST-list begin list-get while @ execute repeat
+ POST-list begin list-get while @ execute repeat
+ SYSTEM-list begin list-get while @ execute repeat
+
+ \ evaluate nvramrc script
+ use-nvramrc? if
+ nvramrc evaluate
+ then
+
+ \ probe-all etc.
+ suppress-banner? 0= if
+ probe-all
+ install-console
+ banner
+ then
+
+ DIAG-list begin list-get while @ execute repeat
+
+ auto-boot? if
+ boot-command evaluate
+ then
+
+ outer-interpreter
+;
OpenPOWER on IntegriCloud