Menu

at&t

2002-11-13
2012-09-26
  • Nobody/Anonymous

    Hi, this should normally compile as at&t asm, but devc wont accept it:

    int a = 10;

    asm("
              movw %%ax, %0"
              "
              :
              :"g" (a));

    it means like loading the value of a into ax

     
    • Nobody/Anonymous

      Shouldn't it be:

      movw %0, %%ax"

      I believe with GAS syntax you must reverce the usual Intel structure.

      As a side, does anyone know a link to really straightforward instructions on the GAS format?

      I looked at the GNU.ORG stuff but it was really tough going!!!

      BlakJak :]

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.