ASM vs. C/C++

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pepito
Posts: 23
Joined: Thu Oct 21, 2004 11:00 pm
Location: México D.F.

ASM vs. C/C++

Post 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
cipek
Member
Member
Posts: 43
Joined: Mon Oct 25, 2004 11:00 pm
Location: Poland

Re: ASM vs. C/C++

Post 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.
pepito
Posts: 23
Joined: Thu Oct 21, 2004 11:00 pm
Location: México D.F.

Re: ASM vs. C/C++

Post by pepito »

Sorry, my code run in 32 bit protected mode. But I can send you a copy if you want.

Pepito
Pepito :)
[AlAdDiN]
Member
Member
Posts: 107
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re: ASM vs. C/C++

Post 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
-----------------------
There are 10 types of people in this world... those that understand binary, and those that don't.
Anton
Member
Member
Posts: 30
Joined: Thu Oct 21, 2004 11:00 pm
Location: Moscow, Russian Federation

Re: ASM vs. C/C++

Post 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.
cipek
Member
Member
Posts: 43
Joined: Mon Oct 25, 2004 11:00 pm
Location: Poland

Re: ASM vs. C/C++

Post by cipek »

So if you can send me the source on [email protected]
Legend
Member
Member
Posts: 195
Joined: Tue Nov 02, 2004 12:00 am
Contact:

Re: ASM vs. C/C++

Post 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! ;)
*post*
krillzip
Posts: 11
Joined: Fri Oct 22, 2004 11:00 pm
Contact:

Re: ASM vs. C/C++

Post 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
pepito
Posts: 23
Joined: Thu Oct 21, 2004 11:00 pm
Location: México D.F.

Re: ASM vs. C/C++

Post by pepito »

O.K. I will begin to migrate my code right now...

Thank you very much for every one!
Pepito :)
Smith
Member
Member
Posts: 38
Joined: Wed Feb 02, 2005 12:00 am

Re: ASM vs. C/C++

Post 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.
Post Reply