Date: Tue, 20 Aug 2002 08:29:26 -0700 (PDT) From: John Polstra <jdp@polstra.com> To: stable@freebsd.org Cc: donxc@verizonmail.com Subject: Re: freebsd ficl extra-words Message-ID: <200208201529.g7KFTQKB083038@vashon.polstra.com> In-Reply-To: <20020820094136.31418.qmail@verizonmail.com> References: <20020820094136.31418.qmail@verizonmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <20020820094136.31418.qmail@verizonmail.com>, Donald Creel <donxc@verizonmail.com> wrote: > I am trying to use some of the FreeBSD "extra words" in loader, > in particular fopen, fload, fread. I do not understand how to get > the file descriptor fd to pass to fload, fread, fclose. I am also > having trouble getting addr to pass to fopen. I have tried passing > some random numbers for fd, len, and addr but only get error message > "stack underflow". Any help will be appreciated. It sounds like you might need to read a forth tutorial. They're easy to find on the web. All values are passed via the stack, and it's important to understand what each word expects to find on the stack and what it will leave there. Also, there are some examples in /usr/share/examples/bootforth. In particular see "boot.4th" in that directory, which shows how to load a file and interpret its contents: s" /boot/frames.4th" fopen dup fload fclose John Polstra (definitely _not_ a forth expert) -- John Polstra John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208201529.g7KFTQKB083038>