LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-07-2006, 11:10 PM   #1
herbertgnanaraja
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Rep: Reputation: 0
assembly language in linux


I need program for shared memory in assembly language(nasm).
 
Old 09-10-2006, 07:58 AM   #2
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
you may want to consider reading "How to ask smart questions" by Eric Raymond.
 
Old 09-10-2006, 05:03 PM   #3
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Just use gcc to do the linking for you, or link to the C library, and just use all the shm* functions as normal.
 
Old 09-12-2006, 09:03 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,389

Rep: Reputation: Disabled
Quote:
Originally Posted by jonaskoelker
you may want to consider reading "How to ask smart questions" by Eric Raymond.
That is "How To Ask Questions The Smart Way" by Eric Steven Raymond and Rick Moen. Accurate quotations are so much nicer, don't you think .
http://www.catb.org/~esr/faqs/smart-questions.html

Sorry, no actual information on the assembler question for the OP.

Last edited by JZL240I-U; 09-12-2006 at 09:04 AM.
 
Old 09-14-2006, 01:29 AM   #5
jonaskoelker
Senior Member
 
Registered: Jul 2004
Location: Denmark
Distribution: Ubuntu, Debian
Posts: 1,524

Rep: Reputation: 47
Quote:
Accurate quotations are so much nicer, don't you think.
They certainly are, so god bless those who can remember all the details or bother to look them up :P
 
Old 09-14-2006, 01:43 AM   #6
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,389

Rep: Reputation: Disabled
on me.

But I remember a thread where Rick Moen complained about a posting where some guy regaled him with quotations from his own (Rick Moen's) article without knowing that it was not just S. Raymond alone. I thought that was a legitimate complaint.

And in case the OP should want to search, it is so much easier to find with the correct title, so...

Oh well, since I had it bookmarked anyhow...


Last edited by JZL240I-U; 09-14-2006 at 01:44 AM.
 
Old 09-16-2006, 12:45 PM   #7
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
Here's how I link it:
How To Ask Questions the Smart Way:
http://linuxmafia.com/faq/Essays/smart-questions.html
to Moen's site. Lots of other goodies there.

I was quite interested when I discovered there is a co-author. In fairness, however, ESR was for many years the listed author, even though they collaborated from the beginning. Apparently they decided to only list ESR, since he was acting as maintainer (per recent RM e-mail). He mentions having his own words quoted back to him as the impetus for (finally) adding his name too.

BTW, JZL240I-U, do you have link to the thread you mention?
 
Old 09-17-2006, 01:19 PM   #8
gendoikari
LQ Newbie
 
Registered: Sep 2006
Distribution: xandros
Posts: 12

Rep: Reputation: 0
Quote:
Originally Posted by herbertgnanaraja
I need program for shared memory in assembly language(nasm).
Try "linux programming for dummies".
don't be this guy or this guy
 
Old 09-18-2006, 03:28 AM   #9
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 18.3+19.3, MX-18, Mandrake
Posts: 4,389

Rep: Reputation: Disabled
Quote:
Originally Posted by archtoad6
...BTW, JZL240I-U, do you have link to the thread you mention?
http://www.linuxquestions.org/questi...46#post1921646 We do have a search function available at this site

P.S.: I had to think for some time too to remember that it came from here, and just searching for "moen" gives 19 pages with results, so you are absolved after all ( again).

P.P.S.: LQ is quite a site, really.

Last edited by JZL240I-U; 09-18-2006 at 03:38 AM.
 
Old 09-18-2006, 03:21 PM   #10
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181Reputation: 3181
Let's get back to the original question. Somehow. We're ribbing this poor soul and English may or may not be his native language!

In the real world, almost no programming these days is done "in assembler." There might be some assembly-code sections in a "C" program, but almost nothing is written where the entire input-file consists of assembler.

The reason is simple: "95% of any program is uninteresting. So, why write all that in assembler?" It won't be faster. It won't be better code. And even if it is, it won't make any difference.

So, assembler is used for subroutines or even inline statements, to do very machine-specific things that cannot be done any other way.
 
Old 09-18-2006, 06:02 PM   #11
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
^ Or if you enjoy that kind of low level programming, then you may just want to code in assembler for fun.
 
Old 09-19-2006, 12:48 PM   #12
xhi
Senior Member
 
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
an excellent book is "Programming from the ground up" by Jonathan Bartlett.

it is available for free online, or for $ in print
 
Old 09-21-2006, 03:52 AM   #13
con
Member
 
Registered: Jul 2005
Location: Finland
Distribution: Slackware
Posts: 213

Rep: Reputation: 30
Quote:
Originally Posted by xhi
an excellent book is "Programming from the ground up" by Jonathan Bartlett.

it is available for free online, or for $ in print
Thanks for sharing, I've been looking for a book like that on assembly for a long time. Thanks!
Here's the link if anyone else is intressted http://savannah.nongnu.org/projects/pgubook/.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
assembly language directives ashlesha Programming 2 07-03-2006 09:20 PM
Assembly Language syntax ashlesha Linux - Newbie 4 06-30-2006 04:22 PM
Assembly Language on 64 Bit systems Sleevy Programming 1 09-06-2004 01:58 AM
Assembly Language, and networks grizzly Programming 5 12-11-2003 09:50 PM
SPARC assembly language jclark00001 Programming 3 02-26-2003 08:52 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 06:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration