Coding practice High Level vs Assembler


+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2022
    Posts
    73

    Default 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

  2. #2
    Join Date
    Feb 2022
    Posts
    73


    Did you find this post helpful? Yes | No

    Default 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.

Similar Threads

  1. Programing code - need a "best practice" advice
    By flotulopex in forum General
    Replies: 4
    Last Post: - 15th December 2015, 16:28
  2. RA3 won't get a high level.
    By selbstdual in forum mel PIC BASIC Pro
    Replies: 14
    Last Post: - 22nd August 2014, 21:41
  3. Using (software)UART Driven vs. Open ? Whats best practice?
    By rayzrocket in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 11th December 2013, 06:42
  4. high voltage high frequency H-Bridge
    By George in forum Off Topic
    Replies: 6
    Last Post: - 27th April 2009, 12:50
  5. "High level" ( LOL ) Arithmetics ...
    By Acetronics2 in forum General
    Replies: 1
    Last Post: - 2nd February 2008, 20:33

Members who have read this thread : 5

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts