From: "Joseph D. Wagner" <wagnerjd@prodigy.net>
To: Linux Assembly Programming List <linux-assembly@vger.kernel.org>
Subject: RE: Using gcc to compiler assembly
Date: Sun, 3 Nov 2002 14:19:07 -0600 [thread overview]
Message-ID: <000201c28376$49daf0a0$35181c43@joe> (raw)
What you've got isn't pure Assembly; it's some strange jumble of C and
Assembly.
To include Assembly in C, use
asm {
; // Assembly Code Here
}
or
__asm {
; // Assembly Code Here
}
depending on the compiler.
To program in pure Assembly, ditch GCC. Go with NASM.
http://sourceforge.net/projects/nasm
And based on your lack of distinction between C and Assembly, I also
recommend:
http://www.amazon.com/exec/obidos/tg/detail/-/0130910139/
Joseph Wagner
-----Original Message-----
From: linux-assembly-owner@vger.kernel.org
[mailto:linux-assembly-owner@vger.kernel.org] On Behalf Of Andrew Haydon
Sent: Saturday, November 02, 2002 5:09 PM
To: linux-assembly@vger.kernel.org
Subject: Using gcc to compiler assembly
Gurus,
How to use GCC compiling assembly codes? I attached my example code and
tried gcc -c -o foo.o foo.S. This line "typedef foo_bar_t int;" choked.
I
read the Makefiles for linux kernel and still could not understand how
these
assebmly codes were compiled by GCC.
Thanks in advance,
Andrew
_________________________________________________________________
Unlimited Internet access -- and 2 months free! Try MSN.
http://resourcecenter.msn.com/access/plans/2monthsfree.asp
-
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next reply other threads:[~2002-11-03 20:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-03 20:19 Joseph D. Wagner [this message]
-- strict thread matches above, loose matches on Subject: below --
2002-11-02 23:08 Using gcc to compiler assembly Andrew Haydon
2002-11-03 18:26 ` Maciej Hrebien
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='000201c28376$49daf0a0$35181c43@joe' \
--to=wagnerjd@prodigy.net \
--cc=linux-assembly@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox