Re: Larkin, Power BASIC cannot be THAT good:



On Sun, 21 Jun 2009 04:53:06 +0100, Nobody <nobody@xxxxxxxxxxx> wrote:

On Sat, 20 Jun 2009 18:17:55 -0700, John Larkin wrote:

The thing about Basic is that it's not frozen in time like C is. Modern
Basics can and do do all that stuff: structs, CASE, WHILE, TRY, THREAD,
formal subs, and great inherents like strings and graphics and SORT.

And I'd guess that most of it is incompatible with other Basics, and not
related to any formal standard.

And that matters?

It matters if you need to make the code run on a given platform, rather
than being forced to choose the platform according to what the code runs
on.

In the few months I've been reading this group, I've seen several
posts regarding the need to maintain legacy PCs because of code which
won't run on current systems.

C has most of this in the standard, so you can use the same code with gcc,
icc, msvc, ...


Why on earth would I want to do that? I'm an electronics designer.

I take it that you're not using PowerBasic to write embedded software?

No, we'd never use Windows in an embedded system. But we do use PB for
engineering apps, to run test racks, and our company material control
system is written in PB.

Because you can use C for that (although using it on an 8-bit CPU is
pushing it).

With even a little bit of care, you can write code which will work on
anything from a cellphone to a mainframe. With more care you can get it to
work on an 8-bit microcontroller or soft CPU core.

But we make scientific and aerospace instruments. Real electronics.
And once a product is designed, we don't port it to another platform.
We sell it and design something else. Our products are analog-centric;
FPGAs and uPs and embedded code just push the data around.


Not all electronic engineering is at the level of gates and latches.

This isn't just gates and latches:

http://www.highlandtechnology.com/DSS/T346DS.html

I did the hardware and firmware for this. The firmware is 68K
assembly; it parses and executes almost 400 distinct serial commands.
I wrote some PB programs to help generate some of the assembly source,
like waveform tables. I did the rom builder utility, a linker of
sorts, in PB too... easy. The test/cal program is PB too. There's also
a "virtual instrument" thing we did in Java, which is truly platform
independent; well, the same executable works on Windows and Linux
after some pounding.


An
increasing amount of hardware is designed to communicate with PCs, and the
protocols aren't getting any simpler. The line between electronic devices
and computers is getting ever more blurred; TVs and video recorders have
already got to the point of requiring an OS; another decade or two and
anything with a plug on it will have one.

We have a bunch of Ethernet-enabled products. One system going
together now has Linux on a mini-ITX board buried inside. That will be
programmed in C, and not by me. It did take a month to get one Linux
driver (furnished by the chip vendor and claimed correct) to work...
more time than I usually spend on an entire firmware project. And
that's just one driver. It involved recompiling the Linux kernel, of
course. Something about different device driver models between 2.1.4.1
and 2.1.4.2 or some such nonsense. So much for portability.

John


.



Relevant Pages


Loading