From owner-freebsd-stable Tue Aug 20 15:14:50 2002 Delivered-To: freebsd-stable@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A7CAC37B400 for ; Tue, 20 Aug 2002 15:14:47 -0700 (PDT) Received: from ws3-6.us4.outblaze.com (205-158-62-90.outblaze.com [205.158.62.90]) by mx1.FreeBSD.org (Postfix) with SMTP id D060543E4A for ; Tue, 20 Aug 2002 15:14:46 -0700 (PDT) (envelope-from donxc@verizonmail.com) Received: (qmail 27179 invoked by uid 1001); 20 Aug 2002 22:14:34 -0000 Message-ID: <20020820221434.27178.qmail@verizonmail.com> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Mailer: MIME-tools 5.41 (Entity 5.404) Received: from [67.248.200.124] by ws3-6.us4.outblaze.com with http for donxc@verizonmail.com; Tue, 20 Aug 2002 17:14:33 -0500 From: "Donald Creel" To: stable@FreeBSD.org Date: Tue, 20 Aug 2002 17:14:33 -0500 Subject: Re: freebsd ficl extra-words X-Originating-Ip: 67.248.200.124 X-Originating-Server: ws3-6.us4.outblaze.com Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article <20020820094136.31418.qmail@verizonmail.com>, Donald Creel 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 Right, postfix mode. Thanks a million. Donald Creel -- _______________________________________________ Talk More, Pay Less with Net2Phone Direct(R), up to 1500 minutes free! http://www.net2phone.com/cgi-bin/link.cgi?143 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message