Results 1 to 7 of 7

Thread: [RESOLVED] gcc and inline assembly code

Threaded View

  1. #1

    Thread Starter
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Resolved [RESOLVED] gcc and inline assembly code

    I need guidance on inlining asm code in my linux C programs. I have some intel-assembler experience and I have made a few stumbling and generally failed efforts to get to grips with AT&T syntax.

    However I was trawling through the gcc info pages and found a switch called "-masm=".

    I have discovered (excitedly) that gcc will apparently compile a block of asm that is written as regular intel style code. See the screenshot attached to see my simplest-possible test.

    My question is this:
    Given that A) intel asm is easy, B) AT&T is hard, C) AT&T is gcc and unix standard, D) I have not been able to find any GOOD sources of information (reference or tutorials) on AT&T assembly.

    What should I use, intel or AT&T? I do want to conform to industry standards but at the same time AT&T is a nightmare.

    I'm willing to put time into learning AT&T, but only if it's going to be time-well spent in the long run, from where I'm standing (angry and frustrated) it just doesn't look that way.

    I need the advice of a more experienced unix assembly coder.
    Attached Images Attached Images  
    Last edited by wossname; Mar 26th, 2008 at 02:53 PM.
    I don't live here any more.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width