From: "Sergio Masci"
Subject: Re: Which basic compiler to buy?
X-Newsreader: Microsoft Outlook Express 5.00.2615.200
Date: Tue, 10 Dec 2002 15:16:42 -0000
NNTP-Posting-Date: Tue, 10 Dec 2002 15:10:19 GMT
Organization: ntlworld News Service
Steve Andrew wrote in message
> Parmin wrote:
> > I am quite proficient to write in BASIC and PASCAL language,
> > but I think to keep things simple I should stick to the
> > BASIC language only. Am I right? or there is a simpler way?
> > Would C language be easier to use? I dont know C language
> > but am willing to learn if it is better for my use.
> Generally, C will produce more compact code than most other compiled
> languages, and will usually produce code that runs faster.
A very good structured BASIC or PASCAL compiler specifically written
for a given processor will produce much more efficient code than an average
C compiler ported from an incompatible processor. You must be very careful
when you select a C compiler for embedded work.
> C is also more
> portable than some other languages.
Kind of true. This really depends on the compiler, its specific extensions
the underlying target system you are writing code for. Just because you're
writing in C this does not automatically enable your code to be recompiled
and work directly on another target. There is often a lot of work involved.
> For embedded software, I think C is one
> of the more logical choices, considering the low level you wish to work
> regarding on-board systems such as serial ports, timers or whatever.
This reinforces my previous point. As soon as you get this embroiled in low
level work with C and the target you loose the portability that everyone
immediately thinks is an automatic given with C. Think of it in terms of how
much code can be salvaged rather than write once run everywhere.
> If you
> have no problems with pascal then you should find C an easy language to
> learn. I have no axe to grind as over the years I have used C, C++,
> assembler, and numerous dialects of BASIC. For embedded systems work, I
> always use C, or assembler when I am forced too :)
The XCSB (structured BASIC) compiler for the PIC directly supports 8,
6 and 32 bit integers and 32 bit IEEE 754 floating point. It generates
it will convert
arr[j+5] = arr[j+5] | (1 << (2 + 1))
The LITE version of XCSB is available FREE of charge for personal
non-commercial use at: http://www.xcprod.com/titan/XCSB