1. Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
    Dismiss Notice

hardware is still coded with machine/assembly language for efficiency, speed, etc.

Discussion in 'General Electronics Chat' started by PG1995, Mar 25, 2012.

Thread Status:
Not open for further replies.
  1. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    The new guy does what he is told unless he is the only programmer in the shop. Even then the hardware guy may be telling him what to do.

    In general many more man hours are spent maintaining code then writing it. In the embedded world this is not quite as true but once a development group starts with a language it is rare for them to change. The will want to leverage their existing work for the next design.

    Back in the Z80 days we did not have built in hardware peripherals. But we did have much the same sort of IC peripheral available. The programming model was much the same as it is today.
     
    Last edited: Apr 12, 2012
  2. Ratchit

    Ratchit Well-Known Member

    Joined:
    Mar 12, 2008
    Messages:
    1,955
    Likes:
    83
    3vo,

    Shouldn't be. All any programmer needs is the documentation for the subroutine. No need to analyze it. Just use it according to the documentation.

    Ts
     
  3. misterT

    misterT Well-Known Member Most Helpful Member

    Joined:
    Apr 19, 2010
    Messages:
    2,697
    Likes:
    368
    Location:
    Finland
    Yes.. I can't even re-use my own code if I don't document it well. Good naming of variables and functions helps a bit, but documentation is very important.
     
  4. dave

    Dave New Member

    Joined:
    Jan 12, 1997
    Messages:
    -
    Likes:
    0


     
  5. nsaspook

    nsaspook Well-Known Member

    Joined:
    Mar 24, 2010
    Messages:
    1,141
    Likes:
    219
    Location:
    Fairview, Or

    That sounds like C. ;)
     
  6. jlpelect5

    jlpelect5 New Member

    Joined:
    Apr 1, 2012
    Messages:
    25
    Likes:
    0
    Location:
    Michigan, USA
    Bottom line, If you just want to be a coder, and want to be at the mercy of other ppl's programs, not knowing what is really going on with the hardware, then that is the way to go.

    If you want to be a real programmer, get into assembly language where you are in total control of your programming and know exactly what the hardware is doing. The precision and control is at your finger tips. You won't be fooling around with someone's syntax.

    jlpelect5
     
  7. misterT

    misterT Well-Known Member Most Helpful Member

    Joined:
    Apr 19, 2010
    Messages:
    2,697
    Likes:
    368
    Location:
    Finland
    Writing code is not programming. Read a little computer science and you understand what a real programmer does.
     
  8. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Documentation is an interesting thing.

    We all know we should have it.

    But it is the first thing to suffer when schedules are tight.

    Try explaining to your boss that you missed the deadline because you wanted more time to document the code. Or try to get a few weeks or a month to go back and document a project after it is finished.

    All you need is the documentation and you can build a space shuttle. It is easier to step into a HLL project.
     
  9. Ratchit

    Ratchit Well-Known Member

    Joined:
    Mar 12, 2008
    Messages:
    1,955
    Likes:
    83
    nsaspook,

    Nope, that's true of any language.

    Ratch
     
  10. nsaspook

    nsaspook Well-Known Member

    Joined:
    Mar 24, 2010
    Messages:
    1,141
    Likes:
    219
    Location:
    Fairview, Or
    http://lib.ru/ANEKDOTY/quiche.txt :rolleyes:
     
  11. Ratchit

    Ratchit Well-Known Member

    Joined:
    Mar 12, 2008
    Messages:
    1,955
    Likes:
    83
    3vo,

    If the documentation is done while the code is being written, then you don't have that problem. Otherwise management is pushing you to do a haphazard job.

    Nope, the later also needs hardware fabrication skills and special machine equipment. By the way, NASA has had some tight schedules. Do you think they don't have blueprints of all the vehicles they sent into orbit?

    Ratch
     
  12. RichTheDude

    RichTheDude Active Member

    Joined:
    Jun 8, 2010
    Messages:
    304
    Likes:
    53
    Location:
    UK
    I have already stated my stance – development time is far more important to me, hence I use C. I use assembly for optimisation where needed, and nowhere else.

    The only time I would ever consider using assembly would be for a cheap toy or gadget that sells millions, this is the type of place where using the cheapest micro could save you lots of money and you have no real concerns of how quickly you get to market.

    For hobby work I would recommend people start with the best micro-controller they can get their hands on (in terms of CPU speed, peripherals and memory, and a floating point unit if possible) and write in C. You will have far more time to spend on higher level algorithm development rather than worrying about how it’s done. Most people want results with their embedded system, and for that I would recommend C.

    I have seen people scared away from micro’s at electronics clubs in the past thanks to the compulsory resident assembly stalwart. If someone has a good experience in hobby project (which is far more likely in C), and wishes to learn how a micro-controller (and hence computer) works, they will but I would rather not force people in at the deep end.

    At the end of the day for hobby projects, who cares what you use as long as you get the result you wanted, and saving a pound on a one off project for a cheaper micro is not going to be a concern for any sane person.

    Oh and if someone says they can develop quicker in assembly rather than C, they are lying. Further to this sloppy assembly can be MUCH slower than optimised C.
     
  13. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Apart from the peripherals we do not care what the hardware is doing. So long as everything gets done on time and in the right order we do not care!
     
  14. jlpelect5

    jlpelect5 New Member

    Joined:
    Apr 1, 2012
    Messages:
    25
    Likes:
    0
    Location:
    Michigan, USA
    nsaspook,

    ROFLMAO, if want to be a programmer, read the the post from nsaspook.:D

    jlpelect5
     
  15. RichTheDude

    RichTheDude Active Member

    Joined:
    Jun 8, 2010
    Messages:
    304
    Likes:
    53
    Location:
    UK
    Totally agree !
     
  16. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Management is always pushing schedules, and as belts tighten they will push even harder. It takes more time to code and document in ASM. It makes the schedule tighter.
    FWIW Blueprints are documentation. My point is that that the documentation only goes so far. If you take a project team and replace enough members there is a very good chance that it will be easier for them to start from scratch rather then continue with the existing code base.
     
  17. Ratchit

    Ratchit Well-Known Member

    Joined:
    Mar 12, 2008
    Messages:
    1,955
    Likes:
    83
    3vo,

    Certainly. My point is that no matter how hard the deadline was, NASA never discarded making blueprints (documentation).

    Ratch
     
    Last edited: Apr 12, 2012
  18. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    see previous post
     
  19. 3v0

    3v0 Coop Build Coordinator Forum Supporter

    Joined:
    Jul 14, 2006
    Messages:
    9,404
    Likes:
    227
    Location:
    OKLAHOMA USA
    Lets try this from another direction.

    If ASM is all we need why have so many people written so many languages over oh so many years?
     
    Last edited: Apr 12, 2012
  20. jlpelect5

    jlpelect5 New Member

    Joined:
    Apr 1, 2012
    Messages:
    25
    Likes:
    0
    Location:
    Michigan, USA
    RichThe Dude, your statement as follows,

    I have already stated my stance – development time is far more important to me, hence I use C. I use assembly for optimisation where needed, and nowhere else.

    If your programming in C is so great why do you have to waste time optimizing your program with assembly programming when you should have done it right in the first place?

    Basically what you are telling us is that without assembly programming you would be lost, development time would skyrocket.

    jlpelect5
     
  21. jlpelect5

    jlpelect5 New Member

    Joined:
    Apr 1, 2012
    Messages:
    25
    Likes:
    0
    Location:
    Michigan, USA
    Hello 3v0,

    HLL was an idea for the industry to get "coders" to produce programs at a 9 to 5 job, sort of speak.
    This was back in the days where microprocessors were the dominate hardware.
    Technology has changed so much now with built in features of the microcontroller that it is bringing back assembly language especially with robotics of which we are just seeing the tip of the iceburg.
    The prescion and the control of the hardware is far more important now then it has ever been.

    jlpelect5
     
Thread Status:
Not open for further replies.

Share This Page