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.

Choosing a language

Status
Not open for further replies.
Assembly for me. It was the first programming language I learned many years ago on an 8086. C is great because you can do complex tasks with only a few lines of code. Assembly often gets highly tedious. I like the way assembly provides very tight control over the size and functionality of code. I find assembly easier because I never have to deal with function librarys or the cryptic syntax of C. All I need is the instruction set documented on a couple three pages in the data sheet. However, those C librarys are huge time savers, especially when porting or revamping projects. That's why C is the industry standard. Though, with some dependance on the tool, you can still program in a modular fashion with assembly using relocatable code. You can even create pseudo-libraries, it does not have to be monolithic at all. I've mainly been doing stuff with PICs. I really like ASM30 for the 16 bit PICs provided by MPLab, but not so much for the MPASM used on the 8 bit PICs.

Oh, and no comment on the stuff for general computing. I've done very little of that on my own other than the languages I learned in college. It's only been the embedded stuff for me.
 
Last edited:
CraigHB: I find assembly easier because I never have to deal with function librarys or the cryptic syntax of C.

What you learn first always seems easier. That is part of the dilemma about choosing a first language.

Not that it matters much but you do not have to use libs in c and c syntax is less complex then learning a set of opcodes, addressing modes, and restrictions!

I have been thinking for some time that we need to teach c without the bells and whistles.
 
Last edited:
What you learn first always seems easier. That is part of the dilemma about choosing a first language.

Not that it matters much but you do not have to use libs in c and c syntax is less complex then learning a set of opcodes, addressing modes, and restrictions!

I have been thinking for some time that we need to teach c without the bells and whistles.

Agreed! I've been very deliberately using the simplest form of C for years (I call it C--) as it integrates with inline assembler and is easy enough to convert to asm or other languages. One of the flaws of C is that it allows many ways to write an operation to do the same thing.

There's no set rules to "C--" apart from using simple and easy to understand commands and keeping the code quite vertical (with one operation per line) as the vertical nature allows commenting each line, and converts to assembler quite well. That type of C coding also encourages a "mindset" where the user breaks tasks down into simple operations in sequence and codes it as such. That's what makes it so easy undertsand and convert to asm or basic etc and makes it particularly suited to limited hardware (like a PIC).
 
Hmm, very interesting. I coded my first dual-sequence LED sequence today before class. It's so rewarding seeing those babies light up! I think I'm going to learn both and put them up against each other. Nothing wrong with being good at 2 things instead of 1.
 
Hmm, very interesting. I coded my first dual-sequence LED sequence today before class. It's so rewarding seeing those babies light up! I think I'm going to learn both and put them up against each other. Nothing wrong with being good at 2 things instead of 1.

Would you consider showing us what you did? I know I'm curious to see what a "dual-sequence LED sequence" is.

Cheerful regards, Mike
 
Would you consider showing us what you did? I know I'm curious to see what a "dual-sequence LED sequence" is.

Cheerful regards, Mike

Hahahaha, literally just 2 different LED flash sequences. All off and on off and on e.t.c and a knight rider wave effect using a switch. I just didn't know what to call it. :3
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top