From owner-freebsd-hackers@FreeBSD.ORG Sun Feb 24 14:59:40 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C1FD216A401 for ; Sun, 24 Feb 2008 14:59:40 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id A6FAB13C447 for ; Sun, 24 Feb 2008 14:59:40 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id 8593C1CC033; Sun, 24 Feb 2008 06:59:40 -0800 (PST) Date: Sun, 24 Feb 2008 06:59:40 -0800 From: Jeremy Chadwick To: freebsd-hackers@freebsd.org Message-ID: <20080224145940.GA41037@eos.sc1.parodius.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Subject: loader and ficl/Forth help X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Feb 2008 14:59:40 -0000 So I've finally gotten around to attempting a feature I mentionted back in June 2007: using ASCII line-drawing characters for the borders around beastie/fbsdlogo in frames.4th: http://lists.freebsd.org/pipermail/freebsd-hackers/2007-June/020851.html I was hoping there might be some folks familiar with the existing Forth pieces in /boot who could help, since debugging this is incredibly difficult. This is my first time with Forth, which is probably where the true problem lies... My idea was to implement a loader_logo_lines loader variable, which you could set to "ascii" to achieve the desired effect -- but simultaneously retaining support for the PC98 character set, and the CP437 (IBM PC ANSI) set if the variable isn't defined, or is set to something it doesn't understand. So far I've managed to crash loader(8) doing the below, with the message "sh_el not found" from ficl on the serial console, then either an infinite register dump or an automatic reboot. I moved the PC98 and CP437 line constants into routines named pc98_lines and cp437_lines repectively, and made one called ascii_lines. The main code piece I changed in frames.4th became this: s" loader_logo_lines" getenv dup -1 = if drop s" arch-pc98" environment? if drop pc98_lines else drop cp437_lines then then 2dup s" ascii" compare-insensitive 0= if 2drop ascii_lines then 2drop cp437_lines I suspect this is what's broken, causing none of the routines to get executed, thus sh_el never gets defined. The version is here: http://jdc.parodius.com/freebsd/frames.4th.new -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |