assembler introduction => Warning!
(Diese Seite in Deutsch:
Beginner's introduction to AVR assembler language
Warning against assembler language's addiction!
Each package of anyting has a warning nowadays. Sweets warn against dental caries,
cigarettes against impotence, and all warn children from eating plastic bags to prevent
from suffocation. Lawyers grin: they always knew that their job is the most, most,
most significant in the whole wide world.
Now also here: I warn you to not touch assembler. Stay with what you are familiar
with, such as Java, C or HTML, but keep your fingers away from this damned assembly language.
From this old-fashioned stuff you get the following:
- ghost phenomenons: that means that you can never again type in A = B * C
without immediately seeing left-shifted bits, that are added or not, but in any
case roll out from the register's left boudary and drop into nowhere or into
the carry bit. And you'll always see red flags waving (until your immediately
dropped tranquilizer starts to work),
- Overburdening feelings: what the hell makes the difference between a phase-correct
and the fast PWM mode of a timer? Before this drove you crazy, you did not have a
look into the device's databook, and that saved you from anything that follows now.
Driven by your childlike curiosity you paint rectangles and dotted vertical lines on
a piece of paper: back to the roots and to the age of your first school lectures.
- lonesome: if you are infected with the assembly virus, you'll never be able to
just use a library that someone else has written. You'll always want to know what
this other author has thought when he programmed it. You'll aways want to know it
closer, even though this isn't your business. But you'll never understand it, just
because you didn't create it by yourself. More and more you'll increase the distance
to the click-and-enjoy-approach of this society, and your mumbled "Why?"
gets more and more strange to your neighbors and frieds.
- addicted: while previously it was sufficient for you you to search for a package
on the internet, to install it on your operating system and to call it with some
strange parameters that you mined from horrible documentation, now you want to do
all by yourself. The times when all questions of the world were answered by
"ATmega328" (and not by 42 like before), are over for you.
Your electronics dealer is happy to sell you the more than 50-fold larger device
park that you'll need now and that you are on more than 50 drugs immediately and
simultaneously. Even the ATtiny-type of drugs, even though avoided earlier due to
their small memory size, are now up-to-date for you. You'll even prefer the smaller
ones now, for their smaller battery consumption. Your friends say: "Look at
him, he now is on the opposite side than we are on!"
Therefore this warning: keep your hands and your head off of assembly! Addicted
persons report that all started with a few lines of inline-assembly, just to speed
up the operating system a little bit. In short time that ended with three Interrupt
Service Routines at once in assembler. And that the feeling whether the routines
were in C or in assembler faded very fastly. And, without realizing it, you were into
your first assembly program, and it worked smoothly and perfect.
So better keep away from anything that looks like assembly or you'll risk getting
freaky over it.
And: the addicted do not find their way out of it any more. Always that they hear
"Electronics" they start their mystery tour: "Can't we do it with
a micro, nicer and more elegant?" And: "You'll need a 256-bit shift
register? Take an ATtiny13 or even an ATtiny10, those have enough SRAM!"
And they are immediately back on the drug: they sit down for two minutes, type
strange abbreviations into their laptop such as LSL and ROL, are
done within two minutes, and the controller delays a bit pattern (on input
PB0, shifted by pulses on PB1) by 256 and replays it 256 pulses later (why can't
we paint a bit red?). And the addicted still thinks "That was much quicker
than searching on the internet for a lib". And he does not realize that he
is again on the drug.
Keep your hands and head off of assembly. Once addicted to it, you'll never come
back again. Each drug carreer started with a few lines of code, and immediately
you are fully addicted to this drug.
To the page top
©2021 by http://www.avr-asm-tutorial.net