Coding practice High Level vs Assembler
usually like most of hobbyist I write my programs
in basic high level instructions as shown in the programing manual
eg: For A = x to y
next A
so far my understanding of the compiler is, that it take the high level instructions
generate an assembler instructions file then compile it to an hex file ready to be
uploaded to the microcontroller.
my question is: (at the end when the microcontroller is uploaded and running)
adding assembler code is it to learn a different way of writing code, because both should be running equaly and as efficient from both level.
what are the real benefits of using assembler code.
Thanks to all
Re: Coding practice High Level vs Assembler
answer found !
from thread: PBP or ASM?
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.