Page 1 of 1

ASM vs. C/C++

Posted: Fri Nov 05, 2004 12:00 am
by pepito
Hello:

I have a problem that can sound funny or can sound tragic...

I have finished the first version of my OS, but I wrote it using only Assembly Language.

As it could be expected my code have some bugs but is very difficult to to find where the errors are originated and then fix the code. I was careful in commenting very well my code, but the Assembly Language is abstract by nature.

Do you think that I must migrate my code to C/C++ lenguage?

Thank you very much,

Pepito

Re: ASM vs. C/C++

Posted: Fri Nov 05, 2004 12:00 am
by cipek
Hmm. Maybe i can help you. I write my own OS in 16bit Asemly language. If you too i can look in you'r code. Maybe we make the OS together :D

P.S. Give me adress of you'r OS website if it is.

Re: ASM vs. C/C++

Posted: Fri Nov 05, 2004 12:00 am
by pepito
Sorry, my code run in 32 bit protected mode. But I can send you a copy if you want.

Pepito

Re: ASM vs. C/C++

Posted: Fri Nov 05, 2004 12:00 am
by [AlAdDiN]
I think it's a good idea to migrate to C or C++.
codding 32bits kernel in assmbler is possible but it's too hard to debug (if we don't say impossible), think about the future whan you will implement filesystems, advanced memory managers, module loaders .... or .... GUIs

Re: ASM vs. C/C++

Posted: Fri Nov 05, 2004 12:00 am
by Anton
pepito wrote:Hello:
As it could be expected my code have some bugs but is very difficult to to find where the errors are originated and then fix the code. I was careful in commenting very well my code, but the Assembly Language is abstract by nature.

Do you think that I must migrate my code to C/C++ lenguage?

Pepito
Well, thats why C was invented. This languages is for OS writing. Think of it as high level asm(Even C++ is a high level asm-it's not OOP(it's in some sense OOP when writing, but when you have a binary-it's a asm-nothing left of OOP)). C++ can also be used for OS writing.

Re: ASM vs. C/C++

Posted: Sat Nov 06, 2004 12:00 am
by cipek
So if you can send me the source on [email protected]

Re: ASM vs. C/C++

Posted: Sat Nov 06, 2004 12:00 am
by Legend
I think with more complex tasks, your tools got to scale with them up, too. That is why I would not code an OS in assembler, for the reasons that you already had discovered! ;)

Re: ASM vs. C/C++

Posted: Sun Nov 07, 2004 12:00 am
by krillzip
If you'er smart you make C headers for the most lowlevel asm functions, or those that are bugfree, or you want to keep in asm. Then you just rewrite the other parts of your os in C++ and link it together. Guess you remember the structure of your OS. ||-P

Re: ASM vs. C/C++

Posted: Mon Nov 08, 2004 12:00 am
by pepito
O.K. I will begin to migrate my code right now...

Thank you very much for every one!

Re: ASM vs. C/C++

Posted: Sun Mar 13, 2005 12:00 am
by Smith
I think C/C++ code would be better because there are many Applications written in C/C++ and saves you the need of writting them yourself. On the other hand you loose a lot of speed than if you wrote it in ASM.