Hello!

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
TheGag96
Posts: 4
Joined: Tue Aug 24, 2010 8:23 pm

Hello!

Post by TheGag96 »

Hey guys, I'm new here. I just started OS development, and I'm not sure where to start (since the tutorials on the wiki are flawed, don't make sense, and have bad, non-working code). At the moment, what I really want to do is just make a small little command interface. How would I do this? Or better, yet, a working anything would do. What could you guys give me as an example? Thanks!
AndrewBuckley
Member
Member
Posts: 95
Joined: Thu Jan 29, 2009 9:13 am

Re: Hello!

Post by AndrewBuckley »

The wiki has decent enough information. the wiki pages are not all tutorials but guides to specific parts of of making an OS. if you have read the beginners mistakes part of the wiki you would have read that even getting a functional shell might take a year. if you want to understand how kernels work start with brans tutorial. http://www.osdever.net/tutorials/view/b ... t-tutorial . Please don't bash the wiki simply because it cannot make the hardest programming subject there is a copy paste subject. the babysteps tutorials ( http://wiki.osdev.org/Babystep1 ) give some of the smallest bootable assembly code that a bios would not reject out of hand. Your going to make a tonne of mistakes, just don't give up when you do.
gerryg400
Member
Member
Posts: 1801
Joined: Thu Mar 25, 2010 11:26 pm
Location: Melbourne, Australia

Re: Hello!

Post by gerryg400 »

... and I'm not sure where to start ...
Don't start by making a post like this one.
... since the tutorials on the wiki are flawed, don't make sense, and have bad, non-working code ...
Hmm, which wiki articles are like that ?
If a trainstation is where trains stop, what is a workstation ?
User avatar
Jezze
Member
Member
Posts: 395
Joined: Thu Jul 26, 2007 1:53 am
Libera.chat IRC: jfu
Contact:

Re: Hello!

Post by Jezze »

The code on the wiki works perfectly fine. If the Bare Bones section doesnt work for you I suggest looking at James Molloy's tutorial.

http://www.jamesmolloy.co.uk/tutorial_html/index.html

Also you have to be more specified in your questions. It would take hours for us to explain how to get to the place you want. You must get there by yourself perhaps asking for smaller directions along the way.
Fudge - Simplicity, clarity and speed.
http://github.com/Jezze/fudge/
roboman
Posts: 24
Joined: Fri Feb 27, 2009 9:41 am
Location: USA
Contact:

Re: Hello!

Post by roboman »

TheGag96 wrote:the tutorials on the wiki are flawed, don't make sense, and have bad, non-working code
??? So you decided this was a site to ask questions at ??? :)


You might want to check out http://www.brokenthorn.com/Resources/OSDevIndex.html
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Hello!

Post by Combuster »

TheGag96 wrote:I just started OS development, and I'm not sure where to start (since the tutorials on the wiki are flawed, don't make sense, and have bad, non-working code).
Proof wanted.

Specifically, "It does not work" is the worst error description ever by some, and the best error description by others since it's often said by a user - you included? - which has more troubles than the subject complained about.

Please, if you really think the wiki is of poor quality, show us some examples so we might actually be able to improve it.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
User avatar
Solar
Member
Member
Posts: 7615
Joined: Thu Nov 16, 2006 12:01 pm
Location: Germany
Contact:

Re: Hello!

Post by Solar »

Jezze wrote:If the Bare Bones section doesnt work for you I suggest looking at James Molloy's tutorial.
But please not before telling us what didn't work for you. The Bare Bones is meant to work for everybody. To show that, indeed, your computer can boot into your self-made main kernel function, as the easiest way around any "compiler doesn't work" or "it doesn't boot" or such problems.

If it doesn't work on your machine, I would be very interested to hear about it.
Every good solution is obvious once you've found it.
TheGag96
Posts: 4
Joined: Tue Aug 24, 2010 8:23 pm

Re: Hello!

Post by TheGag96 »

Ok, here's the proof. Maybe I was supposed to get rid of something when I copypasta'd it, but, here it is: http://wiki.osdev.org/Real_mode_assembly_bare_bones When I copied and pasted that into notepad, saved it, and compiled it just like it said, there was an error. It said that something was already declared twice (but I don't know what it was).

Edit: It was "Duplicate declaration of .loop"

Edit2: I have Windows and not Linux (because Ubuntu and Fedora crashed n too many times), so I can't get ld.
Last edited by TheGag96 on Fri Aug 27, 2010 4:00 pm, edited 1 time in total.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Hello!

Post by Combuster »

Being vague is no proof. And besides, doing what you said works here (and everywhere else).

After your edit: do you have a sane version of nasm, like not from the previous decade? Are you actually using the netwide assembler or do you want to get away with something else?
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
TheGag96
Posts: 4
Joined: Tue Aug 24, 2010 8:23 pm

Re: Hello!

Post by TheGag96 »

Um, actually, I don't know. I did get nasm, but I don't know what version. Could you point me to a good version?
User avatar
MDM
Member
Member
Posts: 57
Joined: Wed Jul 21, 2010 9:05 pm

Re: Hello!

Post by MDM »

Do nasm -r
TheGag96
Posts: 4
Joined: Tue Aug 24, 2010 8:23 pm

Re: Hello!

Post by TheGag96 »

I used yasm on it, it didn't work. What do I do now?
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Re: Hello!

Post by neon »

Im personally thinking if you dont know how to fix that error you should get more into x86 assembly. Although as Combuster hinted any recent version of nasm should support it.

nasm -v can be used to find your nasm version. You should be able to find nasm 2.7 with a quick google search.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
Candy
Member
Member
Posts: 3882
Joined: Tue Oct 17, 2006 11:33 pm
Location: Eindhoven

Re: Hello!

Post by Candy »

TheGag96 wrote:Edit2: I have Windows and not Linux (because Ubuntu and Fedora crashed n too many times), so I can't get ld.
LD is not a linux program. LD is a GNU program. There are ports of GNU programs to Windows, such as MingW32 and Cygwin.

How would we be running (a few of us at least) ld inside our own OS?
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: Hello!

Post by Combuster »

The wiki source uses a nasm misfeature that doesn't work in yasm. Or at least, it did until 5 minutes ago. But you could have easily found that error and fix that based on the error message you will have received from yasm.
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
Post Reply