freebsd-dev/share/examples/bootforth/loader.rc
John Baldwin 0889b9be41 - Add 'fwrite' and 'fseek' words for writing to and seeking on files.
- Change the 'fopen' keyword to accept a mode parameter.  Note that this
  will break existing 4th scripts that use fopen.  Thus, the loader
  version has been bumped and loader.4th has been changed to check for a
  sufficient version on i386 and alpha.  Be sure that you either do a full
  world build or install or full build and install of sys/boot after this
  since loader.old won't work with the new 4th files and vice versa.

PR:		kern/32389
Submitted by:	Jonathan Mini <mini@haikugeek.com>
Sponsored by:	ClickArray, Inc.
2001-12-11 00:49:34 +00:00

35 lines
644 B
Plaintext

\ Example of the file which is automatically loaded by /boot/loader
\ on startup.
\ $FreeBSD$
cr .( Loading Forth extensions:)
\ Load configuration file words
cr .( - loader.4th...)
include /boot/loader.4th
\ Load the screen manipulation words
cr .( - screen.4th...)
s" /boot/screen.4th" O_RDONLY fopen dup fload fclose
\ Load frame support
cr .( - frames.4th...)
s" /boot/frames.4th" O_RDONLY fopen dup fload fclose
\ Load our little menu
cr .( - menuconf.4th...)
s" /boot/menuconf.4th" O_RDONLY fopen dup fload fclose
\ Initialize loader.4th stuff
cr cr .( Initializing loader.4th...)
initialize drop
\ Show the menu
cr
main_menu