473,324 Members | 2,473 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,324 software developers and data experts.

To Make Assembelly language program

How can i make and execute assembelly language programes in c language.
I have not make a single assembelly program yet, so please give a small
example. Also mension all the instructions necessary, so that i can
make and execute assembely language programme on c compiler.

Nov 25 '06 #1
13 2167

"VijayJaiswal" <vi***********@rediffmail.comwrote in message
news:11**********************@m7g2000cwm.googlegro ups.com...
How can i make and execute assembelly language programes in c language.
I have not make a single assembelly program yet, so please give a small
example. Also mension all the instructions necessary, so that i can
make and execute assembely language programme on c compiler.
Most C compilers provide an "asm" or __asm or similar keyword as an
extension.

However the details of how to use it are specific to your particular
compiler.
--
www.personal.leeds.ac.uk/~bgy1mm
freeware games to download.
Nov 25 '06 #2
VijayJaiswal wrote:
How can i make and execute assembelly language programes in c language.
Your compiler's documentation tells you how to do it.
I have not make a single assembelly program yet, so please give a small
example.
Do your own homework. Since you say:

I have not make a single assembelly program yet

this means that you do not know at all assembly, i.e. you are a student
that should answer a homework question.

Also mension all the instructions necessary, so that i can
make and execute assembely language programme on c compiler.
You can't execute anything in the c compiler.
Nov 25 '06 #3


On Nov 25, 1:43 pm, "VijayJaiswal" <vijay_myin...@rediffmail.com>
wrote:
How can i make and execute assembelly language programes in c language.
I have not make a single assembelly program yet, so please give a small
example. Also mension all the instructions necessary, so that i can
make and execute assembely language programme on c compiler.
why dont you start with some simple processor (like 8085). There are
a lots of good books available on 8085 architecture and its assembly
programming.

Nov 25 '06 #5
VijayJaiswal wrote:
How can i make and execute assembelly language programes in c language.
I have not make a single assembelly program yet, so please give a small
example. Also mension all the instructions necessary, so that i can
make and execute assembely language programme on c compiler.
If you don't know assembly yet, then learn it first. Until then stay
away from inline assembly. For x86 assembly, look at:

http://www.drpaulcarter.com/pcasm/
http://webster.cs.ucr.edu/

Nov 25 '06 #6
Chris Thomasson wrote:
http://appcore.home.comcast.net/

?????
What has THAT to do with the subject?

I do not understand the connection...
Nov 25 '06 #7
santosh wrote:
VijayJaiswal wrote:
>>How can i make and execute assembelly language programes in c language.
I have not make a single assembelly program yet, so please give a small
example. Also mension all the instructions necessary, so that i can
make and execute assembely language programme on c compiler.


If you don't know assembly yet, then learn it first.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

EXACTLY!

"I do not know how to drive a car. Please tell me (with examples)
how can I win the F1 race so that I can impress my girlfriend"
Nov 25 '06 #8
"jacob navia" <ja***@jacob.remcomp.frwrote in message
news:45***********************@news.orange.fr...
Chris Thomasson wrote:
>http://appcore.home.comcast.net/

?????
What has THAT to do with the subject?

I do not understand the connection...
Humm. It shows you how to create C API from a assembly language library. It
shows how to use assembly from C.

Is that not helpful to you? It has full source code for the assembly and the
C.
Nov 25 '06 #9

"santosh" <sa*********@gmail.comwrote in message
news:11*********************@45g2000cws.googlegrou ps.com...
VijayJaiswal wrote:
>How can i make and execute assembelly language programes in c language.
I have not make a single assembelly program yet, so please give a small
example. Also mension all the instructions necessary, so that i can
make and execute assembely language programme on c compiler.

If you don't know assembly yet, then learn it first. Until then stay
away from inline assembly. For x86 assembly, look at:
That's not necessarily good advice.
A C compiler will give you IO facilities that make it much easier to write a
trivial assembler routine. For instance, an assembly program to add two
numbers together is no good unless you can see the result.
--
www.personal.leeds.ac.uk/~bgy1mm
freeware games to download.
Nov 25 '06 #10
Malcolm wrote:
"santosh" <sa*********@gmail.comwrote in message
news:11*********************@45g2000cws.googlegrou ps.com...
VijayJaiswal wrote:
How can i make and execute assembelly language programes in c language.
I have not make a single assembelly program yet, so please give a small
example. Also mension all the instructions necessary, so that i can
make and execute assembely language programme on c compiler.
If you don't know assembly yet, then learn it first. Until then stay
away from inline assembly. For x86 assembly, look at:
That's not necessarily good advice.
A C compiler will give you IO facilities that make it much easier to write a
trivial assembler routine. For instance, an assembly program to add two
numbers together is no good unless you can see the result.
What prevents one from calling scanf() printf() etc. from within one's
assembly routines? Granted the ABI will tie you to a particular
implementation, but that's not a big deal when you're doing assembly to
start with.

Also, it's very simple to write small assembly subroutines to convert
string input to a value as well as the reverse, as long as you confine
yourself to integers. I myself did it within a couple of weeks of
starting on assembly. Also note that the authors of the assembly
programming books whose sites I mentioned in my previous post provide a
significant amount of premade library routines to do such common tasks
and provide them freely. So the problems you state aren't really there.

Typically inline assembly builds on pre-existing knowledge of assembly.
The OP has mentioned that he hasn't written a single assembler program
yet, which likely means that he knows no assembly. Hence my suggestion
to him to learn standalone assembly first before tackling the
complexities of a compiler's inline assembly feature.

Nov 25 '06 #11
On 25 Nov 2006 04:10:10 -0800, "ju**********@yahoo.co.in"
<ju**********@yahoo.co.inwrote in comp.lang.c:
>

On Nov 25, 1:43 pm, "VijayJaiswal" <vijay_myin...@rediffmail.com>
wrote:
How can i make and execute assembelly language programes in c language.
I have not make a single assembelly program yet, so please give a small
example. Also mension all the instructions necessary, so that i can
make and execute assembely language programme on c compiler.

why dont you start with some simple processor (like 8085). There are
a lots of good books available on 8085 architecture and its assembly
programming.
I have no idea what your answer means. The OP did not mention a
processor, how did you know he isn't working on an 8085 platform to
begin with?

Is there some reason that you think that C somehow supports 8085
assembly language, even though it does not support any other
processor's assembly language?

Finally, I am fairly sure there are absolutely no manufacturers of the
8085 processor left today, making the idea a particularly futile one.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Nov 26 '06 #12

"santosh" <sa*********@gmail.comwrote in message
news:11**********************@h54g2000cwb.googlegr oups.com...
Malcolm wrote:
>"santosh" <sa*********@gmail.comwrote in message
news:11*********************@45g2000cws.googlegro ups.com...
VijayJaiswal wrote:
How can i make and execute assembelly language programes in c
language.
I have not make a single assembelly program yet, so please give a
small
example. Also mension all the instructions necessary, so that i can
make and execute assembely language programme on c compiler.

If you don't know assembly yet, then learn it first. Until then stay
away from inline assembly. For x86 assembly, look at:
That's not necessarily good advice.
A C compiler will give you IO facilities that make it much easier to
write a
trivial assembler routine. For instance, an assembly program to add two
numbers together is no good unless you can see the result.

What prevents one from calling scanf() printf() etc. from within one's
assembly routines? Granted the ABI will tie you to a particular
implementation, but that's not a big deal when you're doing assembly to
start with.
You need an assembler that links to some sort of library, and to work out
the linking and calling convention. It's the way to go after you have got
things up and running, but if you are not clear on how to load a value into
the accumulator, it's quite a tall order to set up a call to printf() to
print it out.
--
www.personal.leeds.ac.uk/~bgy1mm
freeware games to download.
Nov 26 '06 #13
In article <fr********************************@4ax.com>,
Jack Klein <ja*******@spamcop.netwrote:
>Finally, I am fairly sure there are absolutely no manufacturers of the
8085 processor left today, making the idea a particularly futile one.
Still sold, though. For example,
http://www.loadparts.com/Catalog/8/1238.asp
has more than 4500 of them.

There are far too many hits for me to figure out whether there are
any remaining manufacturers.
--
"law -- it's a commodity"
-- Andrew Ryan (The Globe and Mail, 2005/11/26)
Nov 26 '06 #14

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

Similar topics

7
by: Ryan Walker | last post by:
Hi, I'm getting started with python and have almost zero programming experience. I'm finding that there are tons of tutorials on the internet -- such as the standard tutorial at python.org -- that...
49
by: Ville Vainio | last post by:
I don't know if you have seen this before, but here goes: http://text.userlinux.com/white_paper.html There is a jab at Python, though, mentioning that Ruby is more "refined". -- Ville...
3
by: Matt | last post by:
I always heard dialet of programming language. Or implementation of a programming language. What does it really mean? C++ is standardized already, does it mean it doesn't have any dialets? But I...
134
by: evolnet.regular | last post by:
I've been utilising C for lots of small and a few medium-sized personal projects over the course of the past decade, and I've realised lately just how little progress it's made since then. I've...
669
by: Xah Lee | last post by:
in March, i posted a essay “What is Expressiveness in a Computer Language”, archived at: http://xahlee.org/perl-python/what_is_expresiveness.html I was informed then that there is a academic...
12
by: Tony Belding | last post by:
I'm interested in using an off-the-shelf interpreted language as a user-accessible scripting language for a MUCK. I'm just not sure if I can find one that does everything I need. The MUCK must be...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shllpp 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.