From: "Stephen Pelc" <stephen@mpeltd.demon.co.uk>
To: linux-assembly@vger.kernel.org
Subject: Re: Using C Libraries From Assembly
Date: Tue, 30 Aug 2005 10:17:49 +0100 [thread overview]
Message-ID: <4314324D.10853.4AFFDB1@localhost> (raw)
In-Reply-To: <0D544207876CDA428F17DD7EA448C192088AC0@bailey.DOMAIN.KSNINC.PVT>
From: "Landon Blake" <lblake@ksninc.com>
> Can you call C functions from a program written in assembly
> language? I've googled this subject, but was only able to find
> one paragraph that didn't seem to help much. Most information
> seems to deal with going the other direction, that is, calling
> assembly from C functions. However, I'm guessing that it is
> possible, since both languages end up as machine code at some
> point. Are there any resources that explain how to do this?
We've been going through the same exercise porting one of our
products. I've kept all my notes in one place so that I can
publish them as "The Compiler Writer's Guide to Linux". The
current set of notes includes a complete program that calls
printf from the libc shared library.
The notes are at
http://www.mpeforth.com/arena/cwgtLinux.txt
At this stage I can't say that everything is 100%, but so far so
good. The next task is to set up signal handlers from assembly.
All feedback, criticism and help is welcome. The final book will
be available as a free PDF from our website. Printed copies with
an accompaying CD will also be available.
Stephen
--
Stephen Pelc, stephen@mpeltd.demon.co.uk
MicroProcessor Engineering Ltd - More Real, Less Time
133 Hill Lane, Southampton SO15 5AF, England
tel: +44 23 80 631441, fax: +44 23 80 339691
web: http://www.mpeltd.demon.co.uk - free VFX Forth downloads
next prev parent reply other threads:[~2005-08-30 9:17 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-29 19:13 Using C Libraries From Assembly Landon Blake
2005-08-29 19:32 ` Tim Hoolihan
2005-08-29 20:37 ` Stephen Ray
2005-08-30 9:17 ` Stephen Pelc [this message]
2005-08-30 14:23 ` Richard Cooper
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=4314324D.10853.4AFFDB1@localhost \
--to=stephen@mpeltd.demon.co.uk \
--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;
as well as URLs for NNTP newsgroup(s).