(*)
> In fact I don't really understand why all these vendors keep writing their startup code in assembly, IMO it is just stupid.
Can you please explain, why do you think it's stupid? Whatever I wrote above, I am genuinely interested in what's the reasoning behind this, except "it's possible".
So the argument here is clarity.
I am a bit surprised to be asked giving reasons for "C vs assembly" argument, to be honest.
I believe this is a more accepted behaviour in Eastern Europe than in the West.
(*)
> In fact I don't really understand why all these vendors keep writing their startup code in assembly, IMO it is just stupid.
Can you please explain, why do you think it's stupid? Whatever I wrote above, I am genuinely interested in what's the reasoning behind this, except "it's possible".
Please note that the "stupid" remark was given to the VENDOR's startup code that they ship with their IDEs and CMSIS packages.
I understand that some assembly would be required. But definitely not the whole startup file should be in assembly. Just few snippets, like setting specific registers, and that's all. Initialising data, BSS, vector table - can be perfectly done in C, and it will be much more readable and understood code.
So the argument here is clarity. If it can be written in C, in a much more clear way than in assembly, then why shouldn't it? Is there a reason? What's the reason?
I am a bit surprised to be asked giving reasons for "C vs assembly" argument, to be honest.
QuoteI believe this is a more accepted behaviour in Eastern Europe than in the West.
Do you mean being polite is more desirable, or the opposite? There is a bunch of us ex Soviet Bloc guys in this thread
IME, the level of politeness depends strongly on where in the Soviet Bloc one is from.
In W Europe, the level of politeness depends strongly on the country, as any forum admin will tell you
OK but putting executable code into holes in the vector table must rank alongside self-modifying code, like modifying the offset in
ld a, (ix+23)
I suppose it safeguards your employment
Russian is known to be the opposite of the native british in terms of that "politeness".
There is a LOT to know to output Hello World on an embedded system!
QuoteThere is a LOT to know to output Hello World on an embedded system!
It was more of a statement meaning C is taught or someone has a desire to learn. The books all have you learn Hello World (as with other languages too), math functions, etc... but I've never seen a basic/simple explanation how to go from that to implementing that knowledge into a micro.
QuoteThere is a LOT to know to output Hello World on an embedded system!
It was more of a statement meaning C is taught or someone has a desire to learn. The books all have you learn Hello World (as with other languages too), math functions, etc... but I've never seen a basic/simple explanation how to go from that to implementing that knowledge into a micro.
"Hello World" is only basic if someone hands you a working "printf", which itself consists of thousands of individual instructions.
(and recent confusion was whether I want PICs of PICaxes).
I though that 101 is clear in this regard, and also it was aimed at answering exactly the questions @bostonman threw up above. Apparently, I failed miserably. Sorry.
and run the .exe
and run the .exe
And there is the problem