Re: A basic question on asm

From: Matt (spamtrap_at_crayne.org)
Date: 09/21/04

  • Next message: Robert Redelmeier: "Re: Cyrix"
    Date: Tue, 21 Sep 2004 17:58:57 +0000 (UTC)
    
    

    "Ivan Korotkov" <spamtrap@crayne.org> wrote in message
    news:opseonzclkwin0yh@news.zebratelecom.ru...
    >> The problem is more that GDB chose a horrible representation of the
    >> construct, and that fewer people are familiar w/ AT&T syntax. I like
    >> AT&T because of the explicit register notation (%), the more intuitive
    >> argument order (src,dest)
    > [snip]
    >
    > Do you think that subl 1, %eax is more intuituve?

    Ah this discussion has been held more times than can be counted. It boils
    down to a matter of preference. My preference falls in-line with yours, but
    I recall when I first learned C I found the ordering of arguments (i.e.
    strcpy(dest, src)) to be very confusing and backward. It is only now that I
    am used to it that I want my assembler to work the same way.

    >>From the perspective of writing an assembler, I prefer a variant of nasm
    syntax with % prefixed to the register names, unambiguous 0-operand
    instructions (i.e. pushfw/pushfd), and single-mneumonic, unambiguous control
    transfer instructions (i.e. calln/callf, iretw/iretd, retn/retf, ...). But
    that's just me...

    -Matt


  • Next message: Robert Redelmeier: "Re: Cyrix"