From mboxrd@z Thu Jan 1 00:00:00 1970 Message-Id: <5F6CBD28-FC04-4D68-AA60-B36568DE7005@mac.com> From: Pietro Gagliardi To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> In-Reply-To: Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Sun, 4 May 2008 21:45:56 -0400 References: <20080504074224.C796685B2@okapi.maths.tcd.ie> <775b8d190805040518w947ffc6g12fbe4da693de8a1@mail.gmail.com> <2CA5005D-3B72-44C0-B1A5-89F72C2C6E7F@mac.com> Subject: Re: [9fans] A new language for Plan 9 Topicbox-Message-UUID: 9eeb0cc4-ead3-11e9-9d60-3106f5b1d025 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.