Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

[ANN] tbas, the new BASIC interpreter for UNIX, is out

63 views
Skip to first unread message

Antonio Maschio

unread,
Sep 23, 2017, 3:23:03 AM9/23/17
to
Antonio and Ian are proud to tell you all that tbas is out in its Alpha
version.

tbas is a lightweight console interpreter, that can deal with a lot of
BASIC statements, structured programming and modern features.

tbas is free, with sources and documentation. It needs only gcc to be
compiled, and a Linux/UNIX machine to properly run.

Try it out and let us know!

You can find it here:
http://digilander.libero.it/tonibinhome/tbas/index.html

Mail to ing.anton...@gmail.com

It's GPL: enjoy!

-- Antonio and Ian

Bruce Axtens

unread,
Oct 9, 2017, 2:51:20 AM10/9/17
to
Hello Antonio and Ian

I am using the bash shell that can be installed into Windows 10.
Building is currently impossible, as below.

Kind regards,
Bruce.

uname -a gives

Linux BUGMAGNET-i7-ASUS 4.4.0-43-Microsoft #1-Microsoft Wed Dec 31
14:42:53 PST 2014 x86_64 x86_64 x86_64 GNU/Linux

gcc -v gives

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu
4.8.4-2ubuntu1~14.04.3'
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib
--enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --disable-libmudflap --enable-plugin
--with-system-zlib --disable-browser-plugin --enable-java-awt=gtk
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64
--with-arch-directory=amd64
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc
--enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64
--with-multilib-list=m32,m64,mx32 --with-tune=generic
--enable-checking=release --build=x86_64-linux-gnu
--host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3)

Running make gives

gcc -Wall -lm tbas.c -o tbas
/tmp/ccJvi5kc.o: In function `OPTION':
tbas.c:(.text+0x39ee): undefined reference to `pow'
tbas.c:(.text+0x4417): undefined reference to `pow'
/tmp/ccJvi5kc.o: In function `getFunc':
tbas.c:(.text+0x2115f): undefined reference to `acos'
tbas.c:(.text+0x2126f): undefined reference to `asin'
tbas.c:(.text+0x213b5): undefined reference to `sqrt'
tbas.c:(.text+0x213c6): undefined reference to `log'
tbas.c:(.text+0x21486): undefined reference to `sqrt'
tbas.c:(.text+0x21497): undefined reference to `log'
tbas.c:(.text+0x21519): undefined reference to `atan'
tbas.c:(.text+0x216cc): undefined reference to `log'
tbas.c:(.text+0x21794): undefined reference to `acos'
tbas.c:(.text+0x2191e): undefined reference to `sqrt'
tbas.c:(.text+0x2192f): undefined reference to `log'
tbas.c:(.text+0x219fb): undefined reference to `asin'
tbas.c:(.text+0x21aaf): undefined reference to `sqrt'
tbas.c:(.text+0x21ac0): undefined reference to `log'
tbas.c:(.text+0x21bb1): undefined reference to `atan2'
tbas.c:(.text+0x21be4): undefined reference to `atan'
tbas.c:(.text+0x21d85): undefined reference to `log'
tbas.c:(.text+0x21e7d): undefined reference to `pow'
tbas.c:(.text+0x22073): undefined reference to `cos'
tbas.c:(.text+0x22139): undefined reference to `sin'
tbas.c:(.text+0x222a1): undefined reference to `exp'
tbas.c:(.text+0x222c2): undefined reference to `exp'
tbas.c:(.text+0x22356): undefined reference to `exp'
tbas.c:(.text+0x22379): undefined reference to `exp'
tbas.c:(.text+0x22507): undefined reference to `tan'
tbas.c:(.text+0x225e3): undefined reference to `exp'
tbas.c:(.text+0x22604): undefined reference to `exp'
tbas.c:(.text+0x22633): undefined reference to `exp'
tbas.c:(.text+0x22654): undefined reference to `exp'
tbas.c:(.text+0x22c95): undefined reference to `erfc'
tbas.c:(.text+0x22d48): undefined reference to `exp'
tbas.c:(.text+0x230b4): undefined reference to `tgamma'
tbas.c:(.text+0x23543): undefined reference to `lgamma'
tbas.c:(.text+0x23664): undefined reference to `log'
tbas.c:(.text+0x23785): undefined reference to `log10'
tbas.c:(.text+0x24522): undefined reference to `pow'
tbas.c:(.text+0x2459f): undefined reference to `pow'
tbas.c:(.text+0x2466e): undefined reference to `cos'
tbas.c:(.text+0x24764): undefined reference to `exp'
tbas.c:(.text+0x24785): undefined reference to `exp'
tbas.c:(.text+0x24a21): undefined reference to `sin'
tbas.c:(.text+0x24aa5): undefined reference to `exp'
tbas.c:(.text+0x24ac6): undefined reference to `exp'
tbas.c:(.text+0x24ba7): undefined reference to `sqrt'
tbas.c:(.text+0x24fcc): undefined reference to `tan'
tbas.c:(.text+0x25050): undefined reference to `exp'
tbas.c:(.text+0x25071): undefined reference to `exp'
tbas.c:(.text+0x250a0): undefined reference to `exp'
tbas.c:(.text+0x250c1): undefined reference to `exp'
tbas.c:(.text+0x25164): undefined reference to `pow'
/tmp/ccJvi5kc.o: In function `gregDayNumber':
tbas.c:(.text+0x30807): undefined reference to `floor'
tbas.c:(.text+0x3082d): undefined reference to `floor'
tbas.c:(.text+0x30876): undefined reference to `floor'
/tmp/ccJvi5kc.o: In function `printNUM':
tbas.c:(.text+0x310e7): undefined reference to `pow'
/tmp/ccJvi5kc.o: In function `setAddr':
tbas.c:(.text+0x32bac): undefined reference to `pow'
tbas.c:(.text+0x32c17): undefined reference to `pow'
/tmp/ccJvi5kc.o: In function `power':
tbas.c:(.text+0x32e97): undefined reference to `pow'
tbas.c:(.text+0x32ed0): undefined reference to `pow'
/tmp/ccJvi5kc.o:tbas.c:(.text+0x32f92): more undefined references to
`pow' follow
collect2: error: ld returned 1 exit status
make: *** [tbas] Error 1

Robert Wolfe

unread,
Oct 13, 2017, 7:08:08 PM10/13/17
to
It's a good day to die, Bruce, isn't it?

ž Quoting message from Bruce Axtens to All
ž [14:51 at 09-Oct-17]

> From: Bruce Axtens <sne...@hotmail.com>

> Hello Antonio and Ian

> I am using the bash shell that can be installed into Windows 10.
> Building is currently impossible, as below.

> --- Internet Rex 2.31
> * Origin: A noiseless patient Spider (1:116/18.1)

Have you been able to build this under CygWin?

Best regards, Robert.


Antonio Maschio

unread,
Oct 17, 2017, 10:39:32 AM10/17/17
to
On 13/10/17 17:50, Robert Wolfe wrote:
> It's a good day to die, Bruce, isn't it?
>
> þ Quoting message from Bruce Axtens to All
> þ [14:51 at 09-Oct-17]
>
>> From: Bruce Axtens <sne...@hotmail.com>
>
>> Hello Antonio and Ian
>
>> I am using the bash shell that can be installed into Windows 10.
>> Building is currently impossible, as below.
>
>> --- Internet Rex 2.31
>> * Origin: A noiseless patient Spider (1:116/18.1)
>
> Have you been able to build this under CygWin?
>
> Best regards, Robert.
>
>
Hi Robert,

I report here what Ian did suggest to Bruce

**************
It looks like the linker did not pick up the math library.

You could try changing:

> gcc -Wall -lm tbas.c -o tbas

to

gcc -Wall tbas.c -o tbas -lm

As described here:

https://stackoverflow.com/questions/11336477/gcc-will-not-properly-include-math-h
***************

I hope this helps.

Ciao!

-- Antonio

Marcos Cruz

unread,
Oct 19, 2017, 3:27:35 AM10/19/17
to
["Followup-To:" header set to comp.lang.basic.misc.]

En/Je/On 2017-09-23, Antonio Maschio <ing.anton...@gmail.com>
escribi'o/skribis/wrote:

> Antonio and Ian are proud to tell you all that tbas is out in its Alpha
> version.

> tbas is a lightweight console interpreter, that can deal with a lot of
> BASIC statements, structured programming and modern features.
>
> tbas is free, with sources and documentation. It needs only gcc to be
> compiled, and a Linux/UNIX machine to properly run.

My first impressions:

tbas compiled like a charm on Raspbian. The documentation is excellent.
And even a Vim syntax file is included!

The language provides modern `do loop` structures, a versatile `sub` and
many other useful features.

I've searched the manual for `locate` and `merge`, but it seems they are
still missing from this alpha version, right?

The `man` page seems to suggest the input file is optional, since it is
showed in brackets, but it's mandatory. Will a future version of tbas
provide a command line interface?

It's the first time I see patterns of `using` based on a numbered line,
marked with `:` or `image`. It looks an unusual syntax, but may be it's
useful to make the code more legible in some cases. By the way, I always
wondered why the classic BASIC's `using` is just a modifier of `print`
instead of an independent function, say `using$()`, which would be more
versatile.

Finally, the non-standard special characters "&" (suspend loading) and
"@" (stop loading) seem useful to include source documentation, but why
two of them? I mean, maybe "&" could suspend loading not only until the
next "&", but also until the end of file -- whatever comes first, thus
making "@" almost unnecessary.

I'll try tbas further and I'll follow its development.

Congratulations to the tbas team!

Antonio Maschio

unread,
Apr 29, 2018, 2:57:36 AM4/29/18
to
(Sorry for the late answer...)

Thanks for your message!

I'm the programmer of tbas. LOCATE is a very strange command, that may
work differently on different systems. Anyway, if you give me a
specific, I can try to implement it the way you like it.

For what about MERGE, the team is developing an interactive session
shell with the MERGE command built-in (and others of course). DUring a
session, tbas will work as a numbered-lines interpreter, but without
loss of power in terms of language. Of course, you may not want to use
the shell. No problem, tbas will work as always, because the shell is
activated by option -i

In any case, have you taken a look at the LIBRARY statement? Does it
meet any of your needs?

Ciao!

-- Antonio

Antonio Maschio

unread,
Apr 29, 2018, 3:01:43 AM4/29/18
to
On 29/04/18 08:57, Antonio Maschio wrote:
> It's the first time I see patterns of `using` based on a numbered line,
> marked with `:` or `image`. It looks an unusual syntax, but may be it's
> useful to make the code more legible in some cases. By the way, I always
> wondered why the classic BASIC's `using` is just a modifier of `print`
> instead of an independent function, say `using$()`, which would be more
> versatile.

The : (colon) comes from DEC and IMAGE comes from another compiler (I
don't remember which, now), and both were conceived in the Seventies, if
I'm right...

> Finally, the non-standard special characters "&" (suspend loading) and
> "@" (stop loading) seem useful to include source documentation, but why
> two of them? I mean, maybe "&" could suspend loading not only until the
> next "&", but also until the end of file -- whatever comes first, thus
> making "@" almost unnecessary.

Well, You are right. Maybe I'll develop the & and @ comments in the
sense you've indicated, but let me investigate the matter.

Thanks.

Marcos Cruz

unread,
May 31, 2018, 4:18:38 PM5/31/18
to
En/Je/On 2018-04-29, Antonio Maschio <ing.anton...@gmail.com>
escribi'o/skribis/wrote:

> LOCATE is a very strange command, that may work differently on
> different systems. Anyway, if you give me a specific, I can try to
> implement it the way you like it.
>
> For what about MERGE, the team is developing an interactive session
> shell with the MERGE command built-in (and others of course).
>
> In any case, have you taken a look at the LIBRARY statement?

I've just downloaded the latest version 1.0.alpha3, which has many
improvements, including `locate`.. I'll try it ASAP.
0 new messages