Assembly language

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Seven Kast USA

    #1

    Assembly language

    Hi
    i need information how to include Assembly language in c , tell me
    some tutorials or website or guildlines of it
    by
    KAST

  • Vidhya

    #2
    Re: Assembly language

    The __asm keyword invokes the inline assembler and can appear wherever
    a C or C++ statement is legal.

    Example
    The following code fragment is a simple __asm block enclosed in braces:


    __asm
    {
    mov al, 2
    mov dx, 0xD007
    out dx, al
    }

    Comment

    • Keith Thompson

      #3
      Re: Assembly language

      "Vidhya" <vidhyaprias@gm ail.com> writes:[color=blue]
      > The __asm keyword invokes the inline assembler and can appear wherever
      > a C or C++ statement is legal.
      >
      > Example
      > The following code fragment is a simple __asm block enclosed in braces:
      >
      >
      > __asm
      > {
      > mov al, 2
      > mov dx, 0xD007
      > out dx, al
      > }[/color]

      Please provide context and correct attributions when posting a
      followup. If you had been following this newsgroup, you would have
      seen the following many times:

      If you want to post a followup via groups.google.c om, don't use
      the broken "Reply" link at the bottom of the article. Click on
      "show options" at the top of the article, then click on the
      "Reply" at the bottom of the article headers.

      As for __asm, it is absolutely non-standard and off-topic in this
      newsgroup.

      --
      Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
      San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
      We must do something. This is something. Therefore, we must do this.

      Comment

      • Chris Hills

        #4
        Re: Assembly language

        In article <lnirze2bfw.fsf @nuthaus.mib.or g>, Keith Thompson <kst-
        u@mib.org> writes[color=blue]
        >"Vidhya" <vidhyaprias@gm ail.com> writes:[color=green]
        >> The __asm keyword invokes the inline assembler and can appear wherever
        >> a C or C++ statement is legal.
        >>
        >> Example
        >> The following code fragment is a simple __asm block enclosed in braces:
        >>
        >>
        >> __asm
        >> {
        >> mov al, 2
        >> mov dx, 0xD007
        >> out dx, al
        >> }[/color]
        >
        >.
        >
        >As for __asm, it is absolutely non-standard and off-topic in this
        >newsgroup.[/color]

        Also it is compiler dependant.... different compilers do it slightly
        different. __asm _asm_ _etc __etc :-) YOu need to be specific on the
        compiler in use.

        In the strict sense it may be off topic but I think it is a legitimate
        question.

        --
        \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
        \/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
        /\/\/ chris@phaedsys. org www.phaedsys.org \/\/\
        \/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/



        Comment

        • Mark McIntyre

          #5
          Re: Assembly language

          On 13 Jul 2005 21:18:56 -0700, in comp.lang.c , "Vidhya"
          <vidhyaprias@gm ail.com> wrote:
          [color=blue]
          >The __asm keyword invokes the inline assembler and can appear wherever
          >a C or C++ statement is legal.[/color]

          __asm isn't a C keyword. Its a common extension but not required to be
          supported.

          --
          Mark McIntyre
          CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
          CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt >

          ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
          http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
          ----= East and West-Coast Server Farms - Total Privacy via Encryption =----

          Comment

          • Keith Thompson

            #6
            Re: Assembly language

            Chris Hills <chris@phaedsys .org> writes:
            [...][color=blue]
            > Also it is compiler dependant.... different compilers do it slightly
            > different. __asm _asm_ _etc __etc :-) YOu need to be specific on the
            > compiler in use.
            >
            > In the strict sense it may be off topic but I think it is a legitimate
            > question.[/color]

            Perhaps, but it was the answer I was complaining about.

            --
            Keith Thompson (The_Other_Keit h) kst-u@mib.org <http://www.ghoti.net/~kst>
            San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
            We must do something. This is something. Therefore, we must do this.

            Comment

            Working...