uBasic and banners

16 views
Skip to first unread message

The Beez

unread,
Oct 23, 2023, 5:53:10 AM10/23/23
to 4tH-compiler
Hi 4tH-ers!

I still follow c.l.f and at times I encounter something I've encounters before. Like text banners. Now, this is quite an old routine. It features a *lot* of "C," - which weren't available at the time this thing was added. I added "C," in 2007.

The only way I could enter those values was by converting them into numbers and add a CREATE table. For that I needed to shift the values right, because (a) the lower bit of characters was never used and (b) it was much easier than entering negative values.

Now I saw that code almost 20 years later, I realized I could stick much closer to the original. Added advantage: although it was a great solution for a 32 bit system, it wasted a lot of space on a 64 bit system - which the original prevented by using C,

So I re-converted the library and got myself a more compact routine. Simple.

Furthermore, I needed an ISO 8601 encoding. And realized I could use the number generating module for it. Works fine, lots of different formats available.

Finally I added the RADIX command to uBasic. Yeah, it was quite a pain to enter binary or hexadecimal values to uBasic. At first I thought "It can't be as easy as adding a RADIX command, can it" - but actually it was.

Everything worked as if it were designed for it - assignment, expression evaluation, output - you name it. That's probably due to the fact it was built on top of a system that already offered that functionality.

The only drawback is it works on *EVERYTHING* - including GOTO and GOSUB. So although the linenumbers itself aren't affected, jumping to them is. And NO: RADIX itself is *NOT* affected. it only works in decimal.

That's all from me for the moment, CU!

Hans Bezemer
Reply all
Reply to author
Forward
0 new messages