473,385 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Assembly language

Hi
i need information how to include Assembly language in c , tell me
some tutorials or website or guildlines of it
by
KAST

Nov 15 '05 #1
5 2028
The __asm keyword invokes the inline assembler and can appear wherever
a C or C++ statement is legal.

Example
The following code fragment is a simple __asm block enclosed in braces:
__asm
{
mov al, 2
mov dx, 0xD007
out dx, al
}

Nov 15 '05 #2
"Vidhya" <vi*********@gmail.com> writes:
The __asm keyword invokes the inline assembler and can appear wherever
a C or C++ statement is legal.

Example
The following code fragment is a simple __asm block enclosed in braces:
__asm
{
mov al, 2
mov dx, 0xD007
out dx, al
}


Please provide context and correct attributions when posting a
followup. If you had been following this newsgroup, you would have
seen the following many times:

If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers.

As for __asm, it is absolutely non-standard and off-topic in this
newsgroup.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #3
In article <ln************@nuthaus.mib.org>, Keith Thompson <kst-
u@mib.org> writes
"Vidhya" <vi*********@gmail.com> writes:
The __asm keyword invokes the inline assembler and can appear wherever
a C or C++ statement is legal.

Example
The following code fragment is a simple __asm block enclosed in braces:
__asm
{
mov al, 2
mov dx, 0xD007
out dx, al
}


.

As for __asm, it is absolutely non-standard and off-topic in this
newsgroup.


Also it is compiler dependant.... different compilers do it slightly
different. __asm _asm_ _etc __etc :-) YOu need to be specific on the
compiler in use.

In the strict sense it may be off topic but I think it is a legitimate
question.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills Staffs England /\/\/\/\/
/\/\/ ch***@phaedsys.org www.phaedsys.org \/\/\
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/

Nov 15 '05 #4
On 13 Jul 2005 21:18:56 -0700, in comp.lang.c , "Vidhya"
<vi*********@gmail.com> wrote:
The __asm keyword invokes the inline assembler and can appear wherever
a C or C++ statement is legal.


__asm isn't a C keyword. Its a common extension but not required to be
supported.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.ungerhu.com/jxh/clc.welcome.txt>

----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 15 '05 #5
Chris Hills <ch***@phaedsys.org> writes:
[...]
Also it is compiler dependant.... different compilers do it slightly
different. __asm _asm_ _etc __etc :-) YOu need to be specific on the
compiler in use.

In the strict sense it may be off topic but I think it is a legitimate
question.


Perhaps, but it was the answer I was complaining about.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Nov 15 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Marian | last post by:
Hi, I am totaly novice in .NET and I am studying a book about this. There was mentioned "assembly". I did not understand, how function does it has . I would like to know the exact run of code...
26
by: nospam | last post by:
Just wondering, What do you think the difference in performance would be between (1.) Compiled C# (2.) Compiled C++ (3.) and Assembly Language And how would the mix be if some if any of...
6
by: RoSsIaCrIiLoIA | last post by:
d_0=32.000000 d_1=38.000000 Test success d_0=34.000000 d_1=42.000000 Test success d_0=1.000000 d_1=0.000000 Test success
14
by: Teis Draiby | last post by:
I am about to move my C++ application to C#. Parts of my previous application consisted of inline SSE2 assembly code optimized for the P4 processor. What options do I have to integrate that part...
85
by: fermineutron | last post by:
Some compilers support __asm{ } statement which allows integration of C and raw assembly code. A while back I asked a question about such syntax and was told that __asm is not a part of a C...
2
by: Jan Althaus | last post by:
Mostly for testing reasons I'd like to see if it makes sense to chose the following approach for just-in-time compilation of shaders for a renderer: Seeing as the shaders themsefs consist mostly...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.