Qndre wrote: |
But it's hard to learn. |
Quote: |
The only problem with the demise of assembly language is that as its popularity waned, so did the percentage of programmers who understood the low-level ramifications of the code they were writing. Those programmers who were claiming that assembly language was dead already knew how to think in assembly language and how to apply that low-level thinking to their high-level code; in effect, enjoying the benefits of assembly language while writing high-level language code. However, as new programmers worked their way into the system, without the benefits of having written several applications in assembly, the efficiency of software applications began to decline. |
Mr Ekted wrote: |
I am not saying that people should write their apps in ASM. I am saying that by learning ASM it helps you understand HOW to design and write better code in whatever language you choose -- orders of magnitude better. |
Code: Show/Hide int i;
char buffer[256]; // code that sets buffer here for (i = 0; i < strlen(buffer); i++) if (buffer[i] == ' ') buffer[i] = '_'; |
Code: Show/Hide char *p;
char ch; char buffer[256]; // code that sets buffer here p = buffer; while (ch = *p) { if (ch == ' ') *p = '_'; p++; } |
Mr Ekted wrote: |
strlen() is called every loop |
Code: Show/Hide char *p;
char ch; char buffer[256]; // code that sets buffer here p = buffer; while (ch = *p) { if (ch == ' ') *p = '_'; p++; } |
Code: Show/Hide while (*p)
{ if (*p == ' ') *p = '_'; } |
Cyan~Fire wrote: | |
|
Code: Show/Hide while (*p)
{ if (*p == ' ') *p = '_'; p++; } |
Ekted wrote: |
you are dereferencing p twice (testing *p). Granted the optimizer should handle it, but who knows. |
SuSE wrote: |
<measures dick> |
Mr Ekted wrote: |
... in pixels. |
Grav(FU OL) wrote: |
Take math for example, sin, cosin, tangent, log, etc., today's kids - they just push buttons, they rarely understand what exactly is going on there. |
Dr Brain wrote: |
Haha, nice jab, Ekted.
Akai and I had a long argument in game about that a while back. |
Cyan~Fire wrote: |
Understanding sine, cosine, and tangent really isn't that hard. I think most people here get it. |
ExplodyThingy wrote: |
So after all that, does anyone here actually know of a way to learn this language? |
Mr Ekted wrote: |
Another thing you can do is program in C but have your compiler output ASM/source listings. |