From owner-freebsd-current@FreeBSD.ORG Thu Jan 6 21:21:21 2005 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 04F1316A54D for ; Thu, 6 Jan 2005 21:21:21 +0000 (GMT) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D76A43D2F for ; Thu, 6 Jan 2005 21:21:20 +0000 (GMT) (envelope-from jhb@FreeBSD.org) Received: (qmail 18888 invoked from network); 6 Jan 2005 21:21:20 -0000 Received: from dsl027-160-063.atl1.dsl.speakeasy.net (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) encrypted SMTP for ; 6 Jan 2005 21:21:19 -0000 Received: from [10.50.41.243] (gw1.twc.weather.com [216.133.140.1]) (authenticated bits=0) by server.baldwin.cx (8.12.11/8.12.11) with ESMTP id j06LKeBE083753; Thu, 6 Jan 2005 16:21:14 -0500 (EST) (envelope-from jhb@FreeBSD.org) From: John Baldwin To: freebsd-current@FreeBSD.org, peadar@FreeBSD.org Date: Thu, 6 Jan 2005 16:00:59 -0500 User-Agent: KMail/1.6.2 References: <41DA2AE0.3020108@elischer.org> <41DAF53A.5000300@elischer.org> <34cb7c840501041736570afdfa@mail.gmail.com> In-Reply-To: <34cb7c840501041736570afdfa@mail.gmail.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200501061600.59601.jhb@FreeBSD.org> X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on server.baldwin.cx cc: Julian Elischer cc: current@FreeBSD.org Subject: Re: Is there a boot sector guru in the house? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Jan 2005 21:21:21 -0000 On Tuesday 04 January 2005 08:36 pm, Peter Edwards wrote: > I don't have a box I can test this on, but this looks like a definite > candidate to get > 3 more bytes: > > --- boot0.S 24 Nov 2004 15:39:04 -0000 1.12 > +++ boot0.S 5 Jan 2005 01:27:31 -0000 > @@ -314,8 +314,7 @@ > cmpw $MAGIC,0x1fe(%bx) # Bootable? > jne main.10 # No > pushw %si # Save > - movw $crlf,%si # Leave some > - callw puts # space > + callw putn # Leave space > popw %si # Restore > jmp *%bx # Invoke bootstrap > > If my arithmetic is correct, that leaves us wanting one more byte. > I don't get the save/restore of %si at the end, and judging by the > comment, someone else didn't either. It could be of some use to the > chained loader, but our boot1.S doesn't do anything with it. This actually changes behavior I think (the earlier code outputs two blank lines, the second only one). However, the push and pop of %si probably can go. I think the save/restore there is just pedantic save/restore around puts. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org