The last time I used assembly language was a one-line inline asm opcode to call the RDTSC instruction on X86.

The last significant amount of asm I wrote was a function to convert UTF-16 to UTF-8. I was inspired by a comment in the reference implementation saying "I wish there was a better way to do this" where there is a bunch of if/else chains to test how many leading 1 bits are in a byte. Well, the CPU has an instruction for that. Then, it proved easier just to write it all in asm than to interface a helper function. After all, its work is to push bits around, something asm is good at.

So, instructions that are not modeled in your high-level language is a good reason to dig to asm.

—John


In reply to Re: Re: "Get the Job Done" (GeJDo) by John M. Dlugosz
in thread Too Many Ways To Do It by George_Sherston

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.