Is Assembly Language dead?
-
DaveyM69 wrote:
I ALWAYS use assembly for coding with PICs.
I can completely understand that. I generally use C but it really frustrates me that the compiler does not always do things the way I would and I find myself trawling through the listing file to check what code it has generated. This was particularly bad for me when I first started writting embedded C. Now I am a bit more relaxed, but I still prefer assembler in many ways. My main problem with assembler is that I miss the libraries, things like floating point arithmetic and printf are sssooo handy. ;) But the main reason I have answered you is that its great to know there is another PIC programmer out there on Code Project :cool:
DaveyM69 wrote:
C# style interface for programming PICs
:cool: Best of Luck :cool:
Ali
-
In a scene computers have become fast to solve the performance issues. So why trouble ourselves in complexity of assembly language? But I sure it still has an importance in mission critical and real-time embedded systems. How much it is important in driver development and operating systems? So what you think, learning the assembly language would be foolishness?
tisaracorner wrote:
So what you think, learning the assembly language would be foolishness?
No. There are still times where hand optimizing code is still better than a compiler, however, it is not as wide as a gulf as it used to be. In places where speed and performance is absolutely crucial, it is still good to know it.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
CPallini wrote:
George_George keeps it alive
I think he should get his own forum :) On the plus side, he does not ask stupid questions, just a helluva lot of them! ;P
xacc.ide - now with TabsToSpaces support
IronScheme - 1.0 alpha 4a out now (29 May 2008)leppie wrote:
he should get his own forum
Introduce him to his board at the bottom of his profile :-D
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
Accidentally I found Randall Hyde’s art of assembly language and made me think like this. I felt HLA is easy to learn.
tisaracorner wrote:
HLA is easy to learn.
That's his intentions. Once you have an understanding of the basics, then move onto 80x86 assembly. Bear in mind that MASM, is nowadays integrated in Visual C++/Visual Studio...
"The clue train passed his station without stopping." - John Simmons / outlaw programmer "Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
-
In a scene computers have become fast to solve the performance issues. So why trouble ourselves in complexity of assembly language? But I sure it still has an importance in mission critical and real-time embedded systems. How much it is important in driver development and operating systems? So what you think, learning the assembly language would be foolishness?
I love assembly, but haven't used it since writing some bootstrap code for a PowerPC embedded environment about six years ago. I stopped writing 80x86 assembly in the late nineties when I was able to craft C code to run at 90% the speed of the assembly code. To be fair, though, I was only able to do this by understanding assembly code and how the optimizer worked. My guess is, though, that a really good C/C++ optimizer could have made the code run faster by reordering instructions. This last point is the the real bugaboo of assembly--code for modern CPUs can be optimized in ways that are rather complex to understand and which make the assembly code difficult to understand. Still, there's a feeling of control when writing algorithms in assembly that is rarely equaled in any other language. (I occasionally experience that in C/C++, but rarely in C#; a big reason I've realized my time in the computer programming field is coming to an end. It's not that I can't write very good code in high level languages, but that it bores me.)
Anyone who thinks he has a better idea of what's good for people than people do is a swine. - P.J. O'Rourke
-
In a scene computers have become fast to solve the performance issues. So why trouble ourselves in complexity of assembly language? But I sure it still has an importance in mission critical and real-time embedded systems. How much it is important in driver development and operating systems? So what you think, learning the assembly language would be foolishness?
We have one algorithm in our code that needs to convert millions of floats to ints. It does this in two assembly statements and this used to speed up the code by 10X or so. The reason is the C++ float to int is defined to truncate while the hardware rounds so in software the rounding is undone in 100+ assembly instructions to make it C compliant. For our graphics application it is not important weather it rounds or not and we don't want it to throw exceptions so this code is still in place.
John
modified on Monday, July 21, 2008 3:20 PM