Anything wrong with this?

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
Eponick

Anything wrong with this?

Post by Eponick »

Im wondering if theres anything wrong with making an OS in just 1 file with pure ASM?

Ive already made a few functions, including: printf, getc, print_al(prints al..good to use after getc =) ), etc

Im not doing this to have some top name OS or anything..just to learn more about computers.

I figure: If you want to learn about computers, Do it the Assembly way =P
mikeleany

RE:Anything wrong with this?

Post by mikeleany »

Sure, you can do it. You can also walk from New York to Los Angeles, but I would recommend driving and/or flying most of the way.
Sentient

RE:Anything wrong with this?

Post by Sentient »

Like xSadar said, sure its possible but very impracticle.

xSadar: are you implying that it would be better to use a higher level language?
(Thats just the feeling I got from your reply)

If you want to use ASM for the whole thing, you should go right ahead and do it. But definately don't put all the source in one file, it would be a nightmare.

Rather, I would suggest using includes and seperating your code into more managable bits, like memory management, filesystems, etc etc

But none of it matters in the end, if it works the way you want.
Eponick

RE:Anything wrong with this?

Post by Eponick »

Actually I am, i didnt mean literaly 1 big ASM file.
I ment 1 file after being compiled.

I cant get this to work though.
After it gets over 512 bytes it freezes..Guess ill have to figure how to get my bootsector and kernel on the same disk with DD(linux tool)
rexlunae

RE:Anything wrong with this?

Post by rexlunae »

You should make the files that represent sensible divisions in your OS.  Only the simplest OS could have no major divisions, but I would not say that an OS that simple does not exist.
mikeleany

RE:Anything wrong with this?

Post by mikeleany »

I meant, if you've got something quicker and easier that works just as well, then you might as well use it. So, yes, that means using a higher level language than assembly, but I didn't mean to imply using something like BASIC or anything like that, because it doesn't work as well. As for some other extremely high level languages, I don't know much about many of them, but they may make things easier and work just as well (in parts where speed doesn't really matter much) for all I know.
Sentient

RE:Anything wrong with this?

Post by Sentient »

512 bytes huh?

Are you loading the rest of the file?
Im not sure exactly how your going about it - but I would assume you are booting from floppy, and that your file contains the bootsector.

If this is the case, then it stops after 512 bytes because that is all that is loaded into RAM.

You need to load the rest of the file yourself within that 512bytes.
Post Reply