Page 2 of 3

Posted: Tue Jun 03, 2008 6:56 am
by AJ
OK - why are you doing this? Is it for a school/university project or 'just for fun'?

If it's the latter I strongly suggest you get and read the Intel Software Developper's Manuals, which are free and can be ordered from their web. If it's the former, I suggest you ask for more guidence from your lecturers and make use of your library.

Here are some hints:

Code: Select all

hang: 
        jmp hang
Follow your program flow step-by-step. What do you think this label and instruction do? Why, then, do you think that program execution gets as far as:

Code: Select all

;I ASSUME THE REST GOES HERE? 
;MUST CALL KERNEL HERE, I THINK... 
Second, the GDT. In real mode, you have 16 bit Segment:Offset memory addressing. To get the linear memory address, you add (segment * 0x10) + offset. In PMode, there is no need for this. You have 32 bit offsetts, but still need to load valid segment offsets from your GDT. Once this is done, you can all but ignore the GDT (assuming flat 4GiB segments). You can read more about the GDT in the Intel manuals (which are also available as PDF's, by the way).

Lastly, you really need to know a lot more about the memory environment you are working with before you can load your kernel. In real mode, you can load your kernel somewhere below 1MiB using BIOS interrupts (Google Ralph Brown's Interrupt List and look up Int 0x13). The problem with this, is you need to know what is already in the PC's memory. For example, your real mode IVT is from 0x0000:0x0000 to 0x0000:0x0400 in memory. You don't want to overwrite that. BIOS and video data may be from somewhere around 0x9C00:0000 to 0xFFFF:000F, and you don't want to overwrite that either. You don't have such constraints in PMode with paging, but then you have to write a disk driver for every disk type you could possibly want.

Oh - or you can use GRUB.

In other words, you have a lot of background reading left to do still before you even start coding.

Cheers,
Adam

Posted: Tue Jun 03, 2008 12:35 pm
by suthers
He isn't doing it for either, he is doing it to make a 'product' for his company, he made a thread in Announcements if you want to read about it.
Jules

Posted: Tue Jun 03, 2008 12:41 pm
by svdmeer
http://www.osdev.org/phpBB2/viewtopic.p ... highlight=

This is so lame...

No flame intended, but some people really have to question about wheter it makes sense to write an OS (or even try it)..
There are too much people with some VB experience thinking they can make an operatingsystem.

Posted: Tue Jun 03, 2008 12:45 pm
by svdmeer
suthers wrote:I personally wrote my own bootloader, but mainly because I don't like using other people's code...
As for:

Code: Select all

;I ASSUME THE REST GOES HERE? 
;MUST CALL KERNEL HERE, I THINK... 
That shows a fundemental lack of knoledge of program flow...
Do you actually know what the gdt does and/or any actual assembler?
Jules
SphinCorp wrote:no.
Posted: Sun Jun 01, 2008 9:49 pm, in http://www.osdev.org/phpBB2/viewtopic.p ... highlight=
SphinCorp wrote:At least you told me why you think I'm stupid... :cry:

By the way: I do know what I'm doing!!! I know a fair amount of Assembly Language and C, I understand any tutorials completely and have done small things relating to OS developments here and there. This is a project to basically assemble everything together. I need help, because I have never designed anything this big before, and can't possibly do it all alone. At least give me hints, tips, links, samples OR SOMETHING before you you decide that I'm a worthless freak!!!!!
I rest my case.

(People are very helpful in this forum but please learn the basics first and know what you are doing)

Posted: Tue Jun 03, 2008 1:57 pm
by ollie123

Posted: Wed Jun 04, 2008 1:42 am
by AJ
suthers wrote:He isn't doing it for either, he is doing it to make a 'product' for his company, he made a thread in Announcements
Ah, thanks - missed that one. Someone attempting to write an OS (semi-)professionally, who obviously knows very little about a) assembly and b) the architectute the OS is for is quite worrying...

Cheers,
Adam

Posted: Wed Jun 04, 2008 4:00 am
by Combuster
svdmeer wrote:- Don't use SFS
Do use it :)
Seriously, telling people to do A while B is perfectly valid is a bad thing. Yes FAT owns SFS in some respects, but SFS totally owns FAT in others.
There are too much people with some VB experience thinking they can make an operatingsystem.
Hey watch it, you just claimed yours truly is unneeded here :cry:

Posted: Wed Jun 04, 2008 4:28 am
by AJ
Quote:
There are too much people with some VB experience thinking they can make an operatingsystem.
Hey watch it, you just claimed yours truly is unneeded here
Perhaps 'too many people with just VB experience...' would be more appropriate :wink:

Posted: Wed Jun 04, 2008 5:44 am
by svdmeer
AJ wrote:
Quote:
There are too much people with some VB experience thinking they can make an operatingsystem.
Hey watch it, you just claimed yours truly is unneeded here
Perhaps 'too many people with just VB experience...' would be more appropriate :wink:
Of course, and thinking so they over-estimate themselves. Not the real OS developers.

Posted: Wed Jun 04, 2008 6:08 am
by suthers
svdmeer wrote:
AJ wrote:
Hey watch it, you just claimed yours truly is unneeded here
Perhaps 'too many people with just VB experience...' would be more appropriate :wink:
Of course, and thinking so they over-estimate themselves. Not the real OS developers.
I totally agree (rrrrr, hate basic), But I remember there was some guy who said that he wanted to code his OS in some form of basic, what happened to that (Think it might of been crazygray, sounds like something crazy he'd do...), anybody know what happened to that?

Jules

Posted: Wed Jun 04, 2008 6:09 am
by JackScott
Well Combuster is busy writing his in FreeBasic... does that count?

Posted: Wed Jun 04, 2008 6:25 am
by suthers
Yayyak wrote:Well Combuster is busy writing his in FreeBasic... does that count?
Oh, didn't know :oops: , how slow does it make it?

Jules

Posted: Wed Jun 04, 2008 6:29 am
by suthers
Also, I have to say you guys are being to nice IMHO, your trying to help somebody to code an OS who barely knows how to code in the appropriate languages and shows that he doesn't even know how instruction flow works, people who don't even no how to code in any language could see where the end of the code was...
Jules

Posted: Wed Jun 04, 2008 6:50 am
by Ready4Dis
suthers wrote:
Yayyak wrote:Well Combuster is busy writing his in FreeBasic... does that count?
Oh, didn't know :oops: , how slow does it make it?

Jules
I'm sure it's just as fast as anything that is compiled to native executeable no? I mean, it's a bit lower level than C++, possibly higher than C (not sure, haven't touched freebasic, just remember from my old basic days), so it should land somewhere in that range for speed, assuming it can optomize descently, and depending on how much is required to be written in asm. I don't think there are any issues with writing it in any language you are comfortable with, however if it starts getting big, how many people do you think you are going to be able to recruit to write drivers, programs, etc if it's required to be in basic? Probably a small percent, although if you use a standard file format and calling convention, there is no reason it can't run programs coded in asm, c, c++, pascal/delphi, etc, i think any comparision on speed difference is neglidgeable at best.

Posted: Wed Jun 04, 2008 11:49 am
by SphinCorp
What's with the muti-quote?

P.S.: I also know c++, php, html, xml, asp, and am a master of windows cmd (And I have an obsession with DOS 6.22, THE LAST OF THE PURE DOS!)

suthers wrote:
svdmeer wrote:
AJ wrote: Perhaps 'too many people with just VB experience...' would be more appropriate :wink:
Of course, and thinking so they over-estimate themselves. Not the real OS developers.
I totally agree (rrrrr, hate basic), But I remember there was some guy who said that he wanted to code his OS in some form of basic, what happened to that (Think it might of been crazygray, sounds like something crazy he'd do...), anybody know what happened to that?

Jules
BTW: basic rulez.