basic vs c vs assembly


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Nov 2005
    Location
    Bombay, India
    Posts
    967


    Did you find this post helpful? Yes | No

    Default Re: basic vs c vs assembly

    Assuming you are equally new to each of the languages, this is what you would encounter.

    Assembly is the lowest level code and is the hardest to master. The time taken to deliver a project maybe the longest if you use assembly language. However, it is akin to driving a Top Notch racing car and you can get the best output if you know how to use it.

    Basic is a (HLL)higher level language. It bundles a group of assembly language instructions into a single HLL command. Time taken to deliver a project is many times faster compared with assembly. There may be limitations on the math you could possibly do with basic. You need to check the specific dialect of basic you use to see if it allows you to handle integer, floating point math. Most low cost basics are simply integer basic. No support for floating point math. Many dialects including PicBasicPro have commands to handle various peripherals.

    C is a more universal HLL. Similar to basic, it bundles a group of assembly language instructions into a single HLL command. Time to deliver is comparable with what you could achieve with Basic or any HLL. Most C dialects would support floating point math which may be needed for that once-in-a-while project. The biggest advantage you get with C - most code snippets online across microcontrollers would very often be in C. So, you are in a crowd and will get example code easily. You need to choose a dialect that has commands to handle the peripherals you use.

    Whichever language you choose, be sure your compiler supports inline assembly so that you can tweak code when you really need to. If you code for a living, any HLL is better than assembler since you can code that much faster. The compiler takes care of the data sizes and most times you do not have to remember if you are adding 2 bytes or a byte and an integer etc.

  2. #2
    Join Date
    Jan 2005
    Location
    Montreal, Quebec, Canada
    Posts
    3,170


    Did you find this post helpful? Yes | No

    Default Re: basic vs c vs assembly

    N-bit math thanks to DT:
    http://www.picbasic.co.uk/forum/showthread.php?t=12433

    (Links in chat for 32 bit multiply & division by DT)

    Robert

Similar Threads

  1. Moving from Basic Stamp and MIKROE basic to PicBasic PRO
    By CuriousOne in forum mel PIC BASIC Pro
    Replies: 40
    Last Post: - 6th March 2013, 05:27
  2. Mixing basic and assembly
    By ManInMotion in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 23rd September 2008, 09:48
  3. from assembly to basic
    By shantanu in forum Off Topic
    Replies: 4
    Last Post: - 1st February 2007, 14:50
  4. How do you do this in Assembly
    By ice in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 10th May 2005, 06:47
  5. Assembly?
    By Dwayne in forum General
    Replies: 11
    Last Post: - 4th January 2004, 18:18

Members who have read this thread : 0

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