PDA

View Full Version : PBP or ASM?



mcbeasleyjr
- 19th January 2009, 19:42
What is the difference in writing a program using the basic like language used in Microcode studio and writing a program using assembly language? I mean, once a program is written in basic, it is converted to both assembly and hex for programming. So is there still a significant difference?

Archangel
- 19th January 2009, 20:45
What is the difference in writing a program using the basic like language used in Microcode studio and writing a program using assembly language? I mean, once a program is written in basic, it is converted to both assembly and hex for programming. So is there still a significant difference? I cannot speak for all flavors of basic or C, the biggest difference is going to be your time. Assembly requires many times more lines of code to be written by YOU the programmer. PBP is a carefully written compiler which generates assembly code which is then converted into the Intel HEX file required by the PIC. The issue BASIC vs C or BASIC vs assembly goes back decades to the early BASIC languages used by the PC where they ran through an interpreter and that ran quite slow.
PBP does not do that, it is a real compiler and produces a fairly compact code. Can you write better more compact code in assembler or C ? Yes IF you know what you are doing, and are careful, you can. Why is that ? Because people are still smarter than computers. You will get programs up and running much faster in basic.

mcbeasleyjr
- 19th January 2009, 23:31
Thank you for that. Many people have told me that I should use assembly language because it is much faster. But working with PBP, as I have always done, seems to work just fine. The only problems I tend to have with it is when I try to use interrupts. Other than that, I have no problems.

b1arrk5
- 20th January 2009, 00:09
Morris,
Give Darrel's Instant Interrupts a try! Look in the code example section, you'll see five or six pages of good questions and answers regarding using Instant Interrupts. Darrel has examples showing you how to blink an LED using timers, and how to do multiple interrupts in the same program. It works great, and makes using interrupts so simple you will love it!

Jerry.

mjmccarron
- 20th January 2009, 00:14
I can't speak highly enough of PBP either! I started out about 9 years ago programming in assembly, the old 16C chips. About a year ago, I found PBP and have not regretted the money spent yet. I think it helps to know somewhat about assembly so you have a better idea of what is going on and how to make the things happen that you want. PBP, however, saves major time. A project that would have taken a week in assembly usually only requires about a day with PBP. You can learn a great deal by reading this forum also. There is a lot of collective knowledge here. I guess what I'm trying to say is, use PBP but take the time to learn a bit of assembly too.