OpenBSD uses the addr word to retrieve the address of several framebuffer variables during initialisation. Provide an implementation of addr which allows OpenBSD to initialise the framebuffer correctly on SPARC32 and SPARC64.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@ilande.co.uk --- forth/util/util.fs | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
diff --git a/forth/util/util.fs b/forth/util/util.fs index 8247c7d..54dbf91 100644 --- a/forth/util/util.fs +++ b/forth/util/util.fs @@ -102,3 +102,18 @@ 2dup " tell" is-relay 2drop ; + +\ ------------------------------------------------------------------------- +\ Miscellaneous +\ ------------------------------------------------------------------------- + +[IFDEF] CONFIG_SPARC32 1 [ELSE] [IFDEF] CONFIG_SPARC64 1 [ELSE] 0 [THEN] [THEN] [IF] + +\ Return the address of a named constant or value +: addr ( <word> -- addr ) + parse-word $find if + cell + + then +; + +[THEN]