By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,908 Members | 1,147 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,908 IT Pros & Developers. It's quick & easy.

assembly in c

P: n/a
i want to know how to impliment assembly laguage in c
if any one has any imformation then send to me

Mar 16 '07 #1
Share this Question
Share on Google+
7 Replies


P: n/a
On Mar 16, 12:24 am, "ghost.rider.z...@gmail.com"
<ghost.rider.z...@gmail.comwrote:
i want to know how to impliment assembly laguage in c
if any one has any imformation then send to me
Some compilers have an option for inline assembly, typically using a
keyword of asm or _asm.

Anyway, there is no formal support for this in the ISO C language.

Mar 16 '07 #2

P: n/a
gh**************@gmail.com wrote:
i want to know how to impliment assembly laguage in c
if any one has any imformation then send to me
Consult your compiler's documentation.

--
Ian Collins.
Mar 16 '07 #3

P: n/a
gh**************@gmail.com said:
i want to know how to impliment assembly laguage in c
if any one has any imformation then send to me
The other people who have posted articles in this thread seem to have
interpreted your question as "how do I use assembly language in C?",
and their answers are good answers to that question.

But what you actually asked is how to *implement* assembly language in
C, and that's a very different question. It is possible that you meant
"use", rather than "implement", in which case refer to the other
replies in this thread, and don't bother reading any further. But if
you did mean "implement", then the answer is two-fold:

1) design an assembly language - i.e. a one-to-one or perhaps a
few-to-one mapping between symbols and machine instructions;
2) write a C program to perform the mapping for arbitrary input.

Depending on how you choose to represent complicated expressions (e.g.
"copy the value from the register specified by this register plus that
offset into the register specified by this constant"), you may want to
write some kind of recursive parser to handle them, in which case see
Aho, Sethi, and Ullman's "Compilers: principles, techniques, and tools"
(also known as "The Dragon Book").

It will be difficult to give you more detailed help than this for your
rather general question, within the context of a newsgroup such as
comp.lang.c. If you do embark upon this project, however, and reach a
sticking point, then we may be able to help you over that point if
given sufficient supporting information.

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at the above domain, - www.
Mar 16 '07 #4

P: n/a
gh**************@gmail.com wrote:
i want to know how to impliment assembly laguage in c
if any one has any imformation then send to me
You'll have to write a CPU emulator.

Either emulate an existing CPU type or create you own instruction set.

Mar 16 '07 #5

P: n/a
"gh**************@gmail.com" wrote:
>
i want to know how to impliment assembly laguage in c
if any one has any imformation then send to me
Very simple. Write an assembler in C. Run it.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

--
Posted via a free Usenet account from http://www.teranews.com

Mar 16 '07 #6

P: n/a
CBFalconer wrote:
"gh**************@gmail.com" wrote:
>i want to know how to impliment assembly laguage in c
if any one has any imformation then send to me

Very simple. Write an assembler in C. Run it.
"First, catch one medium-sized elephant..."
Mar 16 '07 #7

P: n/a
Clever Monkey wrote:
CBFalconer wrote:
>"gh**************@gmail.com" wrote:
>>i want to know how to impliment assembly laguage in c
if any one has any imformation then send to me

Very simple. Write an assembler in C. Run it.

"First, catch one medium-sized elephant..."
That only applies to making elephant soup.

--
Chuck F (cbfalconer at maineline dot net)
Available for consulting/temporary embedded and systems.
<http://cbfalconer.home.att.net>

--
Posted via a free Usenet account from http://www.teranews.com

Mar 17 '07 #8

This discussion thread is closed

Replies have been disabled for this discussion.