OS On Assembler

Pages: 1, 2
free web hosting
Free Web Hosting > Computers & Tech > Programming > Programming General > Assembly

OS On Assembler

sottm
Some people developed their OS on Assembler. It's provides speed OS, but brings hard code and bad ability. How do you think it is necessary to endow speed or comfort?

Reply

mastercomputers
QUOTE(sottm @ Dec 15 2004, 06:45 AM)
Some people developed their OS on Assembler. It's provides speed OS, but brings hard code and bad ability. How do you think it is necessary to endow speed or comfort?
*



You'll find that a lot of OS combine both C/C++ and ASM. Usually ASM is used in places where programmers find bottlenecks in their program, codes that can slow the system down, by using inline Assembly they can efficiently speed up the program.

There may or may not be a reason to write a program completely in ASM, as C/C++ compilers do a reasonable job and may provide better methods for the code. I find it's best to incorporate both languages, that way you have the best of both worlds.

An OS written in entirely in 32bit assembly language is Menuet OS. I highly recommend it, even if it's just to learn about it.


Cheers,


MC

 

 

 


Reply

Ploforia
The reason for programming anything using C++ versus assembler is the sheer amount of coding it requires to program anything using assembler without using libraries of existing pre-programmed functions and procedures. Even in the case of programming a basic(not the language) OS(which is miniscule in size compared to current program sizes) you would expect to spend countless hours structuring the thing and be balding after debugging it. Add to that the fact that it's virtually impossible to use a top down approach and that without many supporting libraries your results will vary widely depending on the machine you are using the OS on. At this point I'm really quite curious why you would want to program your own OS with so many already available. Maybe I'm ignorant, but it seems there would be more fruitful ventures to explore than that. In any case good luck at that. You can locate a compiler with a simple web search for C++ or Assembler.

Hope that helps

Reply

qwijibow
The view that assembly is lightning fast compared to high level languages is less true than it used to be.
compilers are much much more sophisticated than they used to be (im talking GNU GCC, not MS's compiler)

Often, a programmer can achieve assembly execuion speeds by properly writing c++ code, and properly manipulating GCC optimisation flags.

however, bottlenecks can still occur, and when they do Assembly is inserted into C code.

Reply

vizskywalker
Another reason why OS's were written in assembly was that assembly has very tight control over memory usage. When computers had at most maybe 128Mb of RAM, this was necessary. Assemb;y programs are also frequently smaller, so a large Os could fit onto a 1Gb hard drive with plenty of space left over. In this day and age, neither of these two issues are large concerns, so OS writing is moving out of the assembly realm and into higher the higher level realm. However, I still prefer assembly.

Reply

lloydkirk1989
QUOTE
The view that assembly is lightning fast compared to high level languages is less true than it used to be.
compilers are much much more sophisticated than they used to be (im talking GNU GCC, not MS's compiler)

Often, a programmer can achieve assembly execuion speeds by properly writing c++ code, and properly manipulating GCC optimisation flags.

however, bottlenecks can still occur, and when they do Assembly is inserted into C code.


Not realy. The asm code produced by any c++ compiler is realy bad compared with true ASM. Its usualy just a bunch of calls and machine lanuage, but not very efficient or fast. You have more control with direct ASM. Its better to simply have '#include' files to make asm easier.

Reply

vizskywalker
I agree that compiled high level languages are never as efficient as pure assembly. I don't know enough about the various includes to comment on that, unless by includes you mean inline assembly. I love inline assembly and find it is an ever increasingly useful tool.

Reply

X-Wes
I believe the type of operating systems you're discussing include MenuetOS. Indeed, MenuetOS appears to be the most famous x86 assembly OS project, having been mentioned on Slashdot, among other places. Even so, MenuetOS classifies itself as a hobby OS.

Writing an operating system today is no small prospect. It's simply impossible for a company to manage an assembly project the size of Macintosh OS, Windows, or Linux. And with the constant changes in hardware specifications dictated by the software makers--nobody really wants to write a solid OS in assembly. At least, nobody wants to write another Linux in assembly.

Inline assembly... well... I can't say I've done much of that. Anyone else got an opinion on that?

Reply

vizskywalker
QUOTE(X-Wes @ Apr 12 2005, 07:23 PM)
And with the constant changes in hardware specifications dictated by the software makers--nobody really wants to write a solid OS in assembly. At least, nobody wants to write another Linux in assembly.

Inline assembly... well... I can't say I've done much of that. Anyone else got an opinion on that?
*


I beg to differ, but there are many projects designed towards creating large scale osses in assembly. For more information on some of these, visit osdever.net. I believe CottonOS there is a large scale project (I haven't looked at CottonOs, so not 100% sure).

As far as inline assembly goes, inline assembly is great. It is highly optimized snippets of code that allow for the ease of coding provided by a higher level language with the power of assembly. The only problem is that many compilers were not designed for inline assembly and thus become very inefficient if making too many calls to inline assembly functions.

~Viz

Reply

vhortex
QUOTE(lloydkirk1989 @ Apr 7 2005, 08:51 AM)
Not realy. The asm code produced by any c++ compiler is realy bad compared with true ASM. Its usualy just a bunch of calls and machine lanuage, but not very efficient or fast. You have more control with direct ASM. Its better to simply have '#include' files to make asm easier.
*



As far as I am concern, C++ have an assembly dump compiler mode where the compiler generates the equivalent assembly code for the obj it generates.

Write the main OS on pure C++ then let C++ generate the Assembly code when you compile. After that, be ready with your ASM compiler [prefer TASM] and do some editing on the Assembly file.

Most of the bottle necks or slow down is caused by the excessive push and pop commands in every function calls which is often times a redundant move by the compiler.

I manage to write a mini-OS using this approach and it only took me 1-2 months developing it compare to my classmate mo made his using pure assembly who take him half a year.

He produced an OS with a smaller size but the size difference compare to mine is not more than 10%..

Speed difference is minimal..

Reply


Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Pages: 1, 2
Recent Queries:-
  1. create your own os tasm - 15.56 hr back. (1)
  2. os asm - 14.00 hr back. (2)
  3. pure asm os - 30.68 hr back. (1)
  4. assembler os - 32.16 hr back. (2)
  5. writing an os in assembler - 51.32 hr back. (1)
  6. assembly os mini - 68.89 hr back. (1)
  7. assambler os - 135.49 hr back. (1)
  8. os written in assembly - 138.63 hr back. (1)
  9. c vs asm for os programing? - 150.62 hr back. (1)
  10. programing a os with assembler - 188.20 hr back. (1)
  11. with assembly os - 209.47 hr back. (1)
  12. operating system assembler os2 - 210.03 hr back. (1)
  13. asm os - 80.97 hr back. (3)
  14. os asm c - 279.91 hr back. (1)
Similar Topics

Keywords : os, assembler

  1. What Do This Code In Assembler.
    A small piece of code can do magic. (3)
  2. X86: Assembler AT&T Or Intel Mode?
    Which do you prefer AT&T or Intel mode for programming assembler? (0)
    I started programming Assembler back in 94 or 95 using TASM (the Borland assembler, quite
    similar to the Microsoft's MASM ). I was comfortable with that configuration. Later I began to
    embed code with the Borland C assembler, that was easy, but it was difficult to make some complex
    tasks... And then I had to switch to Linux... hummm, there were no Borland C nor TASM oh!
    What to do! Fortunately, gcc provided a much better C compiler (the Borland C was completely
    surpassed!) but it was hard for me to get used to the assembler included: GAS . ....

    1. Looking for os, assembler

Searching Video's for os, assembler
advertisement




OS On Assembler



 

 

 

 

ADD REPLY / Got an Opinion! a humble request :-) RAPID SEARCH! Free Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE