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.

Anyone else like assembly language?

Status
Not open for further replies.

carbonzit

Active Member
Kind of a meta-question for this forum, with possible religious connotations, I know: does anyone else here actually like using assembly language to program micros, instead of so-called "high-level" languages? To be specific, by preference I mean using assembly even if another language (C, Basic, etc.) is available for your processor.

I do; my MCU of choice is the SX-28 (which brings up another question: does anyone else here use this device? I see hardly anything about it out there on the interwebs.) I think I can generate code as quickly and clearly as any monkey grinding out C++ or whatever. (Hint: they're called "comments".)
 
Hi, carbonzit. I started with Assembly for a PIC, but it is not very useful for larger, more complicated programs. That is why I am trying to learn C, as well. I don't know much about the SX-28, but for PIC, ASM is definitely not the greatest programming language.
Der Strom
 
Well, as I said, it's really a religious topic (like, say, whether one likes that horrible piece of software known as "vi"). If you say it (ass'y lang.) doesn't work for you, I absolutely believe you. However, I've worked on fairly large projects in assembly language (8086, for PC) which were quite manageable.

Like they used to say, different strokes for different folks ...
 
hi cz,
I prefer assembler programming for PIC's and MCU's.
For quickie programs, Oshonsoft Basic gets the job done and asm subroutines can be easily added to the Basic for those 'special' parts of code.

There are so many versions of 'C', all claiming to be the best, it must be confusing for wannabes in choosing which is best to meet their need.
 
I started in asm too: back then micros' were too small to support HLLs. I write on Freescale 908/9S08 uCtrlrs, previously Z8s. ~99% of time in absolute asm.

My axiom: if you want to evaluate a micros' power, write in asm and see how many times you say "how am I going to get away with This?" Addressing modes are big too; indexed is a minimum, indirect is a Lot more powerful (I miss it...). H.C. <<<)))
 
My assembly language experience comes from some 38 years ago. I "hand assembled" COSMAC 1802 assembly. I used the PDP-8, PDP-11 and Motorola 6800 languages. The 8086 mneumoics made little sense and seemed counter-intuitive. Generally, it makes sense to use a high-level language and combine assembly where necessary. Speed and memory usage is just one tradeoff. The high level language generally improves readability, although I've seen high level programs that were unreadable too.
 
My favorite language is the one I am currently using.

I am one of the old timers here. I have programed ASM on many of the 8 bit micro processors. Also on PDP11's and even the IBM360 (very large instruction set).

Many people who favor ASM do so because they are good at it. If they were better at some other language they might favor it. I have no problem with people liking what they are good at. But like does not do much to determine how it ranks against anything else in whatever way you care to measure it. We are biased in favor of what we like... and we like it because we know it and are comfortable with it.

If programming is your hobby or your are working on your own use whatever floats your boat. As a computer science student and engineer I used the tools/language specified or required by the job. There was seldom a choice.

Back prior to decent affordable C compilers for micro processors forth had gained a following. Anyone here beside me use it ?
 
I have no preference.

I am no PIC expert either, but I started out learning and my first books were with assembly. This proved quite taxing mathematically (I'm not good with numbers) but it was good fun, especially when you find it hard to believe one bit in the wrong register can make such a big difference to whether a piece of code works.

Anyway, I've always had a bit of interest in programming, and when I realised I could get away with using C, this of course was a more attractive option, with a lot of 'complexities' standardised.

Of course, this could be seen as 'cheating', but then again any program that uses routines or library's are too. My only excuse is I'm out there to get a job done, not always to find a different way of doing things.

I tried a bit of basic too, but not to any great length. I've also used flowcode, which provides imo very rapid prototyping but can be inflexible.

I got involved with pic's because I wanted to get some tasks done that I didn't want to entrust to mechanical systems, and I got a taster at college. I use the various languages to their strengths and will shamelessly admit that I will use whatever language will get me the results in the shortest time.

As shameless as that is, and I think I've said it before, even if you don't want to go in depth with assembly such as trying to handle numbers outside the typical 8 bit boundaries, it still pays to have a hand in as even with other languages out there, you will never escape having to set up registers and the like, and I assume this applies to other controllers too.

So yeah, I like assembly language but it's not my favourite. I think it's important to keep 'your hand in' so to speak even if you don't use it predominantly.
 
Until a couple of days ago, I was an assembly language afficionado and I think I had it pretty-well down-pat.

However now that I've started using C (only just started), I don't think I will go back to assembly.

It is just so much easier and quicker to write, with a speed and memory tradeoff (with a PIC18F4685 it doesn't really matter :)
 
i looked at all the different languages out there for a looooong while, gosh, there is alot out there, i finally chose assmembly, (PIC) both my kids know C ,C++. i wanted to
start on something that would cover all the bases with the knowledge that it would get easier going up. but yep, it does tax the brain pan quite a bit :)
 
Kind of a meta-question for this forum, with possible religious connotations, I know: does anyone else here actually like using assembly language to program micros, instead of so-called "high-level" languages? To be specific, by preference I mean using assembly even if another language (C, Basic, etc.) is available for your processor.

I do; my MCU of choice is the SX-28 (which brings up another question: does anyone else here use this device? I see hardly anything about it out there on the interwebs.) I think I can generate code as quickly and clearly as any monkey grinding out C++ or whatever. (Hint: they're called "comments".)


Hi there,

I happen to like assembly language myself for the PIC. I like the way it keeps me in contact with the low level timing and such.
As others have pointed out though, it gets a little cumbersome for larger projects, so i ended up creating my own high level language that is not too high but just enough to make it a lot faster to program with. Sometimes i still use straight assembler anyway though.
The higher level language is written in an even higher level language similar to C and that is what does all the parsing and code generation.
 
Last edited:
Back prior to decent affordable C compilers for micro processors forth had gained a following. Anyone here beside me use it ?

Forth:
It runs on some of the process machines at work in the control systems. I learned it and mostly forgot it way back but still have old copy of Starting Forth - Leo Brodie to write test sequences to find problems once in a blue moon. There is still a lot of Forth code running in the machines that make semiconductors.

Resume of someone who works in the field as a programmer on some of the machines we use.
Nico Hofmeester (MS, MCSE) | LinkedIn
 
I absolutely love assembly. I can't get a grasp on C or any other language to be honest. But with assembly it's very quick to learn and apply to a PIC plus you can write really tight code with it.

Also...if something can't be done in assembly, it can't be done period. ;)

Yes it may tax the brain a bit but I'm all for the challenge. Plus you learn much more about the hardware as the programmer must keep track of memory allocation, bank switching, etc etc...whereas in a high level language the compiler would handle all of that.
 
Assembler which I like.

Z80 in Assembler, few months with Tiny Basic for the 8051 which I left behind (cannot say why) and Assembler again starting with the 16C57 up to now with the 18F family.

Until I got my first assembler program (cassete for the ZX81) I used to write code directly in hex. Cannot believe I did that.
 
Last edited:
Me too. In the early days of the 8080, Z80 6800 etc I used to photocopy pages with a grid drawn up on it, then do the coding by writing on paper with a pencil. One page had the ram names and locations (in hex) the other pages(s) the source code operands opcodes in hex with my written comments. When it was done on paper I pressed the hex codes into a hex keypad to program the computer. I even had one 8080 version with binary data entry switches but that got scrapped pretty quickly.

The worst thing is my first one had no battery backup, so if I had a brain fade and turned the power off it had to be all typed in again! It soon got a battery added. ;)
 
Electro Tech forum,

I started with pseudo assembly in octal. Just one step
above machine code. Since my company made IC testers
speed was almost the number 1 priority. When we switched
to "C" I was very concerned that the compiler would add
execution time so I spent quite a while comparing an
assembly translator to a "C" compiler. Didn't find much
difference so I went with "C"

I agree with those that have said the best language to use
is the one you're most comfortable with.

jerryd
 
Like a round of cheese, I find myself comfortably in well aged company. I'll not contest the "one you're familiar with" stance, it's NIH rephrased.

As for asm being easier to support:
> No compiler or library dependencies
> Total exposure of process (you DO comment profusely?)
> WYSIWYG on porting
For the C side:
> Porting is easier if the compilers & libraries are compatible, especially from same coding house.
> Major architectural change is Way Worse to port in asm. <<<)))
 
Status
Not open for further replies.

Latest threads

Back
Top