| General This forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun! |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
03-12-2005, 11:47 PM
|
#1
|
|
LQ Newbie
Registered: Mar 2005
Location: india
Posts: 17
Rep:
|
Assembler
Hai All
what is an assembler?
is assembley language is more powerfull than c & c++?
Is assembly language portable?
can one create his own operating system in assembly language?
i am doing a project for my final year graduation on assembly and os
need all your help. i will be back with lots of doubt
|
|
|
|
03-13-2005, 12:01 AM
|
#2
|
|
Senior Member
Registered: Dec 2003
Posts: 3,142
Rep: 
|
Your question is so broad that several books have been written on this subject. Please do your homework on your own by reading good books on the subject.
Specifically to answer your questions.
what is an assembler?
Assembler is the program that converts the mnemonics (MOV, ADD, SUB etc.) your have written into actual machine code and also binds the logical addresses you have used in your assembly program to absolute machine addresses. This is a very general, non-technical way of putting it, but this is what it is.
is assembley language is more powerfull than c & c++?
Yes and no. C and C++ are high-level languages that concentrates more on writing code in a more abstracted and human understandable way than machine language. While you would write ten or more lines of code in assembly language to do a multiplication or division between two numbers, in C and C++ you just "multiply" and that's it. But one thing is that assembly programs written specifically utilizing a particular architecture's features would be highly optimized and run fast on that platform.
Is assembly language portable?
Assembly language is "machine-specific". That is to say, an assembly program written to target a particular architecture (example Intel x86) will not work with other architectures (example PowerPC).
can one create his own operating system in assembly language?
Though theoritically possible, this would be a huge task and probably not worth it because, as I mentioned, the platform-specific nature of assembly code. Most OSes are written in C because there are many existign C compilers for different platforms and C programs can target multiple platforms if linked with cross-platform libraries. Assembly code is used inside of C programs for very small sections where a high degree of optimization is required.
Last edited by vharishankar; 03-13-2005 at 12:04 AM.
|
|
|
|
03-13-2005, 12:10 AM
|
#3
|
|
Member
Registered: May 2004
Location: Perth, Australia
Distribution: Red Hat 9
Posts: 35
Rep:
|
Check this link
http://www.menuetos.org
An operating system in assembly language has actually been written.
azraelder
|
|
|
|
03-13-2005, 12:18 AM
|
#4
|
|
Senior Member
Registered: Dec 2003
Posts: 3,142
Rep: 
|
Thanks azraelder. That looks interesting.
I did mention that it was possible and I still say that it would probably not be worth writing entire OSes in assembly because you would have to rewrite the whole code for OTHER architectures.
The one advantage is that writing assembly code to target *a* particular platform will make it highly optimized on that platform.
|
|
|
|
03-14-2005, 05:47 AM
|
#5
|
|
Moderator
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,471
Rep: 
|
Certain internal kernel code has to be written in assembly - it's not possible to write in in C. But it's not a very big amount.
|
|
|
|
03-14-2005, 10:39 AM
|
#6
|
|
LQ Newbie
Registered: Mar 2005
Location: singapore
Distribution: redhat9
Posts: 7
Rep:
|
I always suspect that if some of the kernel coding are re-converted back to assembly with minimun acceptable requirement for cross-platform implementations,than linux(with X installed) might be a lot faster and robust than now.
|
|
|
|
03-14-2005, 01:07 PM
|
#7
|
|
Senior Member
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019
Rep:
|
The very first edition of UNIX written in 1969 (I think) was done purely in machine language at Bell Labs. C was created after that (in Bell Labs) and UNIX was rewritten in C shortly thereafter. C was created for the purpose of rewriting UNIX.
|
|
|
|
03-14-2005, 01:52 PM
|
#8
|
|
LQ Newbie
Registered: Mar 2005
Location: singapore
Distribution: redhat9
Posts: 7
Rep:
|
In 1968 original unix in PDP-7 assembler
then a few utilities in B
around 1970 recoded to PDP-11 assembly
In 1971 extend B to NB
1973 essentials of modern C completed
rewrite PDP-11 unix in C
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
|
m6800 assembler
|
kafnir |
Linux - Newbie |
1 |
03-05-2005 01:29 AM |
|
Assembler
|
Firari |
Programming |
9 |
12-10-2004 02:26 PM |
|
assembler
|
usr |
Programming |
2 |
11-15-2003 05:15 PM |
|
assembler
|
tda |
Programming |
4 |
08-21-2002 02:54 AM |
|
Need an Assembler
|
ChimpFace9000 |
Programming |
1 |
07-18-2001 09:36 PM |
All times are GMT -5. The time now is 06:14 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|