Re: Creating OS [Noobie :D]
Posted: Sat Nov 19, 2011 8:27 am
fair enough, disregard my last comments about C...
The Place to Start for Operating System Developers
http://f.osdev.org/
Fair enough. I didn't have access to any OS code whatsoever when I wrote my basic kernel, C or ASM, so yes, I did figure out the basics by reading the Intel processor manuals many times, especially the system programming guide.berkus wrote:edit: and by "abstract" I mean that you don't have access to osdev wiki C tutorials if you cannot understand C, so you have to figure all the basics out by yourself.
I either use asm or C++. C has no place anywhere. It's lousy at low-level stuff, and it doesn't provide any of the OO concepts naturally.gerryg400 wrote:So, rdos, you are an asm fan, and prefer asm to C ?
Why didn't you say so before ?
Right. How is it "superior" again?rdos wrote:I write directly in asm because asm is superior to C
Because it can do anything the processor could do. C can't.neon wrote:Right. How is it "superior" again?rdos wrote:I write directly in asm because asm is superior to C
EDIT: Removed 2015: Imageshack replaced all links with spam.rdos wrote:Because it can do anything the processor could do. C can't.
I prefer sticking with C as much as possible but you've a valid argument here, everything that can be done in asm cannot be done in C. While C has its advantages over asm, it also a well known truth that every OS developer has at least hundred lines of code written in complete assembly . Asm is not forbiddable.rdos wrote:It's pathetic when people deny that anything that can be done in C/C++/C#/Java cannot also be done directly in asm, while the reverse is not true (an assembler can always do things that C cannot do).
I would at least have expected some arguments that code written for C is more maintainable, or easier to write, less error-prone, more portable, or whatever. But to deny that asm is superior in what can be done is just plain stupid.
In my original post, I wrote "asm or C++". When I want the advantages of high-level languages, I also want the advantages of OO programming, which is why I claimed C had no place. OTOH, I do have a C-language module in my OS right now (Intel's ACPICA), but it was only because I don't have time to convert it to C++. When I write my own complex device-drivers in higher-level languages, I'll first create a class-interface with base-classes, so I can use C++. I'll test this for new filesystems first, as these are very hard to code in asm.neon wrote:You missed my point. Using assembly language is better then a high level language provided that the appropriate need comes along. If you want to stick with assembly language, go for it. But do not compare it with a high level language by saying its "superior" because its not. The reverse is also true.
Thanks ^^ finally something i understand (i don't know anything about the asm > c discussions :3)guyfawkes wrote:The time you have given to make a basic OS, is plenty of time if you know how to code well in that language.
There's a basic Dos clone, that runs old dos game's etc, that took less than 2 weeks to code.
Isn't the sane way to convert from C to assembler just to use a C compiler?death2all wrote:It is very possible to write entirely in asm. Just be sure to be able to convert from C to asm mentally (not actually that different, given how similar C is to asm...)