Continue to Site

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.

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

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

Status
Not open for further replies.
So it is better to spend more money to do the development in ASM and have a competitor release first ?
I do not think so.

When it comes to debugging, a decent ASM programmer in my experience can do it much faster if the code is modular written.
The mind of such a good programmer is fixed on looking for stack call irregularities and corrupt/used registers.
A C programmer can be very ignorant to whats actually going on and assume what they have written is correct.
The Silabs USB routines are a good example.
 
When it comes to debugging, a decent ASM programmer in my experience can do it much faster if the code is modular written.

The C language can be structured in a modular fashion but you have to plan it that way just like a good ASM programmer would.

To recap, modular programming consists of separating implementation from interface and hiding information in the implementation. In C this is achieved by placing the interface definition in a header file and the implementation in a source file. Disciplined use of static is used to hide implementation details. The interface definition forms the link between a module and its clients. The module includes its own interface definition to confirm that it implements the advertised interface; a client module imports/includes the interface definition to verify that it is using the interface correctly.

**broken link removed**

I find it easier to write the C code first in a large file with this in mind then spilt the source into functional sections later. With a modular language (like Modula-2) you usually have to define the interfaces first with code stubs and fill in the actual implementation code later.
 
To the Ineffable All,

I am a control freak when it comes to programming. High level languages really turn me off, and Assembler turns me on. It appears to me that many of the things folks are disparaging here about Assembler can be overcome. So I invite everyone to state why they prefer high level to low level. I will then try to put forth a counter argument. Ready?

Ratch
 
Last edited:
The ultimate truth is that writing solid code on time allows one to spend more time with family and friends.

In industry programmers and engineers seldom have language choice.

True beauty flows from the mind of the programmer, not the language tools.

A good programmer can and will program in any language required or requested.

Use what turns your crank, but think twice prior to pushing your choice on others.

If this thread takes a turn for the worse it will be closed. (me as moderator)
 
Last edited:
3vo,

The ultimate truth is that writing solid code on time allows one to spend more time with family and friends.

And a good tool like Assembler helps the programmer do that.

In industry programmers and engineers seldom have language choice.

Use what turns your crank, but think twice prior to pushing your choice on others.

Yes, that is what industry should follow.

True beauty flows from the mind of the programmer, not the language tools.

Good tools help implement the innovation.

If this thread takes a turn for the worse it will be closed. (me as moderator) .

All good things eventually come to an end.

Ratch
 
Not all the kids are like that. We mentor some classes at the local high-schools and help them compete in the "First Robotics" programs. These kids love working at the nuts and bolts level with electronics and controllers.
**broken link removed**

You're correct there spooky. The academically educated seem to be missing something. I had a young Elec Eng. produce simulated solutions of large systems but doesn't know that an LM7805 requires a DC supply. He insisted that small 3 pin reglators can go from 120VAC to 5VDC in one step. Sad, but that is what new graduates seem to be capable of.
 
Last edited:
On the matter of Hi lvl vs low lvl languages. It's a matter of resources and scope and application.

Certain questions need to be answered. What are the order of priorities?

1) How fast the app can be produced?
2) How much resources (ram, CPU speed, I/O) the app uses?
3) How maintainable or portable is the code?
4) Are you required to document the code.?

Weigh in on those with a score and u can develop a matrix that guides the selection of the language type. Of course, if u are only comfortable with one you can always make do.
The difference here is if u only gonna know one it's best to go with asm as it is capable of more than a hi lvl language. Especially when it comes to microsecond sensitive applications and timing precision/response.
 
Last edited:
Mosiac,

1) How fast the app can be produced?

That depends on the skill of the programmer. I think I can write as fast in Assembler using templates, procs, previous code, cut and paste, APIs, and a well stocked library of routines. In other words, it is not fair to give an identical task to a high level (HL) programmer and a Assembler programmer, especially two neophytes, and tell them to go at it while you compare the time to code. The HL already has those "helps" within it. But a well oiled Assembler shop should also have developed those aids and be competitive with respect to speed.

How much resources (ram, CPU speed, I/O) the app uses?

If you code in good assembly, you are doing the best that can be done. HL is bound to be slower.

3) How maintainable or portable is the code?

Now you have me in a pinch. No doubt about it, portability is easier with HL, but not as good as some claim. It all depends on the difference in platforms. If the high level program performs bit fiddling, then you will probably have to dig deep into the code to match the function on the destination machine.

4) Are you required to document the code.?

Always, always, always, and especially with Assembler. HL has a certain amount of documentation built into its syntax, but it still can be confusing looking at it cold.

Weigh in on those with a score and u can develop a matrix that guides the selection of the language type. Of course, if u are only comfortable with one you can always make do.
The difference here is if u only gonna know one it's best to go with asm as it is capable of more than a hi lvl language. Especially when it comes to microsecond sensitive applications and timing precision/response.

I already made my preference known. If I need to support several platforms, I would assign a coder, not a programmer, to translate the assembly code to another platform. Yes, assembly is the fastest that can be done, but sometimes HL fast is good enough. That has to be considered also when weighing the pros and cons.

Ratch
 
You're correct there spooky. The academically educated seem to be missing something. I had a young Elec Eng. produce simulated solutions of large systems but doesn't know that an LM7805 requires a DC supply. He insisted that small 3 pin reglators can go from 120VAC to 5VDC in one step. Sad, but that is what new graduates seem to be capable of.

When I interviewed for the job I'm currently at 20+ years ago I had my secret weapon in the bag. After all the questions about qualifications and education I was asked about hobbies so I showed the guy my S100 wirewrap 8080 cpu and TLL logic ntsc video card I designed and built for a DIY game machine that played mastermind. (yes, it was coded in 8080 assembly) https://en.wikipedia.org/wiki/Mastermind_(board_game)
**broken link removed**

I was given an offer and after a little back and forth on a few issues was accepted that day. The value of building things seems to be lost on some in academia with the massive push of theory and math problems instead of practical applications created from real hardware and software. I was on the electronics technicians advisory board for the San Diego CC district and was always pushing for more lab time for students instead of just stupid tricky questions that only show you can take a test.
 
Last edited:
nsaspook . . . I suggest you go to "Resume Dilema" and relate your story. What you have said is exactly what I related. A project is worth a thousand words.
 
So I invite everyone to state why they prefer high level to low level.

I prefer C, which is not a high level language. I really hate things like the "Arduino IDE".
 
Except C IS a high level language - how can you suggest otherwise?.

C is only a high level language to a assembly language programmer. ;) C has minimalism as it's base principle.
**broken link removed**

BCPL, B, and C all fit firmly in the traditional procedural family typified by Fortran and Algol 60. They are particularly oriented towards system programming, are small and compactly described, and are amenable to translation by simple compilers. They are `close to the machine' in that the abstractions they introduce are readily grounded in the concrete data types and operations supplied by conventional computers, and they rely on library routines for input-output and other interactions with an operating system. With less success, they also use library procedures to specify interesting control constructs such as coroutines and procedure closures. At the same time, their abstractions lie at a sufficiently high level that, with care, portability between machines can be achieved.
 
Last edited:
I really hate things like the "Arduino IDE".

The IDE itself could use some improvement, definitely - but for it's core audience, it works extremely well, and those improvements would likely only cause further confusion for that audience.
 
hi,
The 'C' language has been referenced as a high language ever since assembly superseded typing in machine code from a hand written hex/object code list.

Basic which uses a compiler is considered a high language and C is just another form of that original Basic family.

https://www.webopedia.com/TERM/H/high_level_language.html
 
Last edited:
I consider any computer language, which emanates an instruction sequence that cannot be duplicated by "procs" or "macros", a high level language. I believe C is in that catagory because it can generate instructions to implement a high level construct that cannot be duplicated by procs or macros no matter how skillful the programmer is. This is especially true of array manipulation, when HL automatically requests more storage from the OS.

Ratch
 
hi Ratch,
If I am understanding correctly what you saying regarding 'complexity' , its a fact that 'C' libs are written using assembler.

So surely someone must be able to write these 'complex' libs using assembler.

Your post #119 is a little ambiguous. [ to me] are you defining the actual program or the compiler directives.?

E.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top