piclist 1999\10\18\152200a >
Thread: Assembler Verses Pbasic
www.piclist.com/techref/language/index.htm?key=basic
flavicon
face BY : Lawrence Lile email (remove spam text)



Hi Mathew,

Here is one C programmer's humble opinion of the pros and cons  of Pbasic
and Assembler.  I've used both, and you notice (clever lad, aren't you?)
that I use C now.

ASSEMBLER - PRO

You have to know assembler before you can be truly effective with any other
high level language for the PIC.

Assembler will usually <if you are good at it> result in the tightest, least
memory hogging code.

You will never have any problems porting Assembler between a 12 bit core and
a 12 bit core.  (or 14 to 14, etc.)

Assembler is free.

ASSEMBLER-CON

Assembler is the slowest and least productive way to program a PIC.

You will always have problems porting from a 14 bit core to a 12 bit core.

Assembler has the steepest learning curve of any language I know, except
English <G>

Try implementing this pseudocode in assembler, which you could type in 2
minutes in Pbasic:

long counter2;
long counter5;
signed long counter8;
if  ( (portC BITWISE_AND 0b0001101 >= 0x67) OR  (counter1 == 0c47)  )


         Counter2 = (counter5 * counter6) + (480 * counter8);
   }




PBASIC -PRO

You can probably already program in basic.  If you can't  then you should
learn it.

You can easily port between different PICs.

You can understand your program flow very easily.

You can write code a lot faster than with assembler.

PBASIC - CON

PBasic costs money.

Pbasic will tend to write less memory efficient code.  I made quite a bit of
money one time porting Pbasic code to C to eliminate code bloat.

You still hafta know assembler first.

An EXTRA FREEBEE:  C - PRO:

C is portable to any processor from a lowly 12C508 to a pentium XXXXXiiii
5000 MHZ (not available in stores yet..<G>)

C *CAN* be as tight as assembler (if you know what you are doing)

I cannot afford to write in Assembler - it takes too long.  I can write C as
fast as I can type (40 wpm) and compile usually without any bonehead errors.
Not so with assembler.


C - CON

C has a steeper learning curve than Pbasic

You still gotta know assembler before you can be effective with C.

C costs money.



{Original Message removed}
<002c01bf199d$b632b6c0$5301010a@6840cck4k019.toastmaster.com> 7bit

See also: www.piclist.com/techref/language/index.htm?key=basic
Reply You must be a member of the piclist mailing list (not only a www.piclist.com member) to post to the piclist. This form requires JavaScript and a browser/email client that can handle form mailto: posts.
Subject (change) Assembler Verses Pbasic

month overview.

new search...