From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <775b8d190805042132i7b2493c7n60d2f07e8d047423@mail.gmail.com> Date: Mon, 5 May 2008 14:32:16 +1000 From: "Bruce Ellis" To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: <5F6CBD28-FC04-4D68-AA60-B36568DE7005@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20080504074224.C796685B2@okapi.maths.tcd.ie> <775b8d190805040518w947ffc6g12fbe4da693de8a1@mail.gmail.com> <2CA5005D-3B72-44C0-B1A5-89F72C2C6E7F@mac.com> <5F6CBD28-FC04-4D68-AA60-B36568DE7005@mac.com> Subject: Re: [9fans] A new language for Plan 9 Topicbox-Message-UUID: 9f04c146-ead3-11e9-9d60-3106f5b1d025 wow, sounds like a freshman assignment. don't steal ".b" from limbo, use limbo. brucee On Mon, May 5, 2008 at 11:45 AM, Pietro Gagliardi wrote: > I put up a new Bentley. This has support for, hopefully, all control > structures: > > if e then if..then > s > if e then if..then..else > s > else > s > while e do while..do > s > loop loop (infinite loop) > s > repeat repeat..until (like > do..while(!)) > s > until e > for i := e to e [by e] do like in pascal, but > with steps > s > for i := e downto e [by e] do like in pascal, but with steps > s > > The file asm.b is a simple demonstration of the last two. > > The Bentley compiler, when built, is named #b, so the 386 compiler (and the > only one so far) is 8b. The name is changed on build. This is used exactly > like the C compilers: > > 8b asm.b > 8l -o asm asm.8 > asm > > The -S option produces an Assembly listing, but does not build (the C > compilers do). > > My only regret so far is that for loops generate a medium sized piece of > spaghetti (yum). See the comment in 8.c for details. > > Set for the next release: arguments in procedures, functions, a more > sophisticated stack size algorithm, bit arrays. > > >