Thread: Assembler in GCC

  1. #1
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    Assembler in GCC

    How do you use assembler code in GCC (Unix)? In Win you use:
    Code:
    asm mov ax, 5;
    
    or
    
    asm
    {
       mov ax, 5;
    }
    But that doesn't work in GCC.
    Or do you need some extra assembler module or something?
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  2. #2
    Registered User unixOZ's Avatar
    Join Date
    Feb 2002
    Posts
    91
    Now that we are on the subject of asm, where can I find a good linux asm tutorial (for asm newbies)

    thanks

  3. #3
    Registered User unixOZ's Avatar
    Join Date
    Feb 2002
    Posts
    91
    Very helpful, thanks

  4. #4
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Thanks!
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  5. #5
    Registered User
    Join Date
    Oct 2002
    Posts
    46
    make that... http://linuxassembly.org/

    Also look at the on-line book "Advanced Linux Programming", a PDF download. Chapter 9 covers gcc inline assembly particulars. Not in a lot of depth but enuf to get you started. http://www.advancedlinuxprogramming.com/

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem building Quake source
    By Silvercord in forum Game Programming
    Replies: 16
    Last Post: 07-11-2010, 09:13 AM
  2. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  3. Replies: 4
    Last Post: 09-02-2007, 08:47 PM
  4. Compiles on gcc 3.3 but not on gcc 4.0.3
    By cunnus88 in forum C++ Programming
    Replies: 5
    Last Post: 03-29-2007, 12:24 PM
  5. gcc
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 21
    Last Post: 10-22-2003, 03:46 PM