- prom_interpret (
- /* All values in this forth code are in hex */
- "hex "
- /* Those are a few utilities ripped from Apple */
- ": D2NIP decode-int nip nip ;\r" // A useful function to save space
- ": GPP$ get-package-property 0= ;\r" // Another useful function to save space
- ": ^on0 0= if -1 throw then ;\r" // Bail if result zero
- ": $CM $call-method ;\r"
- );
-
- /* Some forth words used by the release method */
- prom_interpret (
- " \" /chosen\" find-package if "
- "dup \" memory\" rot GPP$ if "
- "D2NIP swap " // ( MEMORY-ihandle "/chosen"-phandle )
- "\" mmu\" rot GPP$ if "
- "D2NIP " // ( MEMORY-ihandle MMU-ihandle )
- "else "
- "0 " // ( MEMORY-ihandle 0 )
- "then "
- "else "
- "0 0 " // ( 0 0 )
- "then "
- "else "
- "0 0 " // ( 0 0 )
- "then\r"
- "value mmu# "
- "value mem# "
- );
-
- prom_interpret (
- ": ^mem mem# $CM ; "
- ": ^mmu mmu# $CM ; "
- );
-
-#if DEBUG
- prom_printf ("OF interface initialized.\n");
-#endif
+ prom_interpret (
+ /* All values in this forth code are in hex */
+ "hex "
+ /* Those are a few utilities ripped from Apple */
+ ": D2NIP decode-int nip nip ;\r" // A useful function to save space
+ ": GPP$ get-package-property 0= ;\r" // Another useful function to save space
+ ": ^on0 0= if -1 throw then ;\r" // Bail if result zero
+ ": $CM $call-method ;\r"
+ );
+
+ /* Some forth words used by the release method */
+ prom_interpret (
+ " \" /chosen\" find-package if "
+ "dup \" memory\" rot GPP$ if "
+ "D2NIP swap " // ( MEMORY-ihandle "/chosen"-phandle )
+ "\" mmu\" rot GPP$ if "
+ "D2NIP " // ( MEMORY-ihandle MMU-ihandle )
+ "else "
+ "0 " // ( MEMORY-ihandle 0 )
+ "then "
+ "else "
+ "0 0 " // ( 0 0 )
+ "then "
+ "else "
+ "0 0 " // ( 0 0 )
+ "then\r"
+ "value mmu# "
+ "value mem# "
+ );
+
+ prom_interpret (
+ ": ^mem mem# $CM ; "
+ ": ^mmu mmu# $CM ; "
+ );
+
+ DEBUG_F("OF interface initialized.\n");