From: j.neuschaefer@gmx.net (Jonathan Neuschäfer)
To: kernelnewbies@lists.kernelnewbies.org
Subject: hi about C and asm
Date: Wed, 29 May 2013 17:33:59 +0200 [thread overview]
Message-ID: <20130529153359.GA3135@debian.debian> (raw)
In-Reply-To: <CA+5jrf=B1OpTbGNTU_aShBWg8_Qb25vyhn-vLZy2siYght5xPg@mail.gmail.com>
On Wed, May 29, 2013 at 09:02:22AM +0800, lx wrote:
> hi all:
> They are some asm codes in the kernel like:
>
> #define set_bit(nr,addr) ({\
> register int res __asm__("ax"); \
> __asm__ __volatile__("btsl %2,%3\n\tsetb %%al": \
> "=a" (res):"0" (0),"r" (nr),"m" (*(addr))); \
> res;})
>
>
> But, almost I can't understand this. So I want to understand asm in C,
> which book or website I should learn ?
Google "asm in c", first link is:
http://www.ibiblio.org/gferg/ldp/GCC-Inline-Assembly-HOWTO.html
HTH,
Jonathan Neusch?fer
prev parent reply other threads:[~2013-05-29 15:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-29 1:02 hi about C and asm lx
2013-05-29 1:27 ` Augusto Mecking Caringi
2013-05-29 15:33 ` Jonathan Neuschäfer [this message]
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=20130529153359.GA3135@debian.debian \
--to=j.neuschaefer@gmx.net \
--cc=kernelnewbies@lists.kernelnewbies.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.