From owner-freebsd-current Mon Dec 21 02:45:28 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id CAA06102 for freebsd-current-outgoing; Mon, 21 Dec 1998 02:45:28 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dingo.cdrom.com (castles336.castles.com [208.214.167.36]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id CAA06097 for ; Mon, 21 Dec 1998 02:45:25 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (LOCALHOST [127.0.0.1]) by dingo.cdrom.com (8.9.1/8.8.8) with ESMTP id CAA00452; Mon, 21 Dec 1998 02:37:37 -0800 (PST) (envelope-from mike@dingo.cdrom.com) Message-Id: <199812211037.CAA00452@dingo.cdrom.com> X-Mailer: exmh version 2.0.2 2/24/98 To: "Daniel C. Sobral" cc: mike@smith.net.au, current@FreeBSD.ORG Subject: Re: BootFORTH - demo floppy In-reply-to: Your message of "Mon, 21 Dec 1998 02:32:03 PST." <199812211032.CAA11540@newsguy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 21 Dec 1998 02:37:36 -0800 From: Mike Smith Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > At Mon, 21 Dec 1998 01:08:54 -0800, you wrote > > >Commonsense suggests the two major problems: > > [This is really irrelevant; in particular, my "experience" disagree with the > "common sense" of the second statement; but the first statement must be > correct for the sake of correct use of FICL. IMHO, anyway] > > > - the count is usually too small (in the ANS Forth case, it's one byte) > > Most string words in Forth take their count from the stack, so it's one cell, > not byte. I suppose FICL uses 32 bits integers as cells, right? /* ** Strings in FICL are stored in Pascal style - with a count ** preceding the text. We'll also NULL-terminate them so that ** they work with the usual C lib string functions. (Belt & ** suspenders? You decide.) ** STRINGINFO hides the implementation with a couple of ** macros for use in internal routines. */ typedef unsigned char FICL_COUNT; #define FICL_STRING_MAX UCHAR_MAX typedef struct _ficl_string { FICL_COUNT count; char text[1]; } FICL_STRING; I *think* that Ficl will have to move to using 64-bit cells, at least on the Alpha (since it stores pointers in them). > So, Unicode Forths would have 65535-sized counted strings. Indeed, some Forths > use 32 bits characters. This is definitely something to take up with John Sadler. The whole reason that it's an issue from my perspective is that there are some cases where I can see it being desirable to be able to handle strings longer than 255 bytes with the bootloader, and that means that the scripting language has to be able to deal with them. Thanks for the clarification. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message