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.