Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?



Betov wrote:
santosh <santosh.k83@xxxxxxxxx> écrivait news:fkqqhb$5v2$1
@registered.motzarella.org:


Tell you what, if you are up to it, lets do a routine to convert an
hexadecimal string (without '0x' prefix or 'h' suffix) into the
corresponding 64 bit numerical value. You do yours in assembler and
I'll do mine in C and lets compare the relative speed for a few million
passes over the test string. We can use C's clock() function or RDTSC,
whichever you prefer. Respond if you are up to it and I'll post my
version's source and test run on my machine


The problem is not with speed, nor size. It is with
readability. Recently shown C++ example:

NminusI = (i==0)? 0 : (N-i);

... meaning (we have been told):

If I = 0
NminusI = 0
Else NminusI = DN - I
End_If

I seriously doubt a beginner could understand the
first version, whereas i don't doubt that he could
understand quite easily the Assembly version, and
even more easily with a bit of If/Then/Else Macros.

cmp eax, byte 1
adc eax, byte -1

Where's the macro?

Best,
Frank


.



Relevant Pages

  • Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
    ... hexadecimal string into the ... You do yours in assembler and ... passes over the test string. ... NminusI = DN - I ...
    (alt.lang.asm)
  • Re: Is PSHUFW instruction MMX or SSE or SSE2? Is NASM manual correct?
    ... hexadecimal string into the ... You do yours in assembler and ... passes over the test string. ... NminusI = DN - I ...
    (alt.lang.asm)
  • Re: "We Never Use Assembly Language"
    ... too bad that I expect the same from macros that I use. ... I guess Rosasm is no longer written in assembly. ... does not detract from a tool being an assembler. ... it raises HLA some levels. ...
    (alt.lang.asm)
  • Re: "We Never Use Assembly Language"
    ... > too bad that I expect the same from macros that I use. ... Are you unable to see the diffrence?The rosasm macros are little else but clever text replacesments for asm instructions. ... but it has nothing todo inside an assembler. ... well feature for feature to the Rosasm IDE which took near a decade. ...
    (alt.lang.asm)
  • Re: RosAsm?
    ... not what the instructions are. ... With a good set of macros this can be made even clearer... ... in this vain in my option the only programmers who should be ... by the assembler in a "Label not defined" error and probably ...
    (alt.lang.asm)