Totally lost... Help a poor inocent noob!
Totally lost... Help a poor inocent noob!
As much as I hate to admit defeat, I am clueless. I looked everywere and Cannot figure how to do this:
-load pmode (got this one now I think)
-implement SFS as the root filesystem
-load my kernel -WAP.SYS- (might have got that, I don't get the tutorial)
And that's just the bootsector... Sigh.
VB.NET was easier.
-load pmode (got this one now I think)
-implement SFS as the root filesystem
-load my kernel -WAP.SYS- (might have got that, I don't get the tutorial)
And that's just the bootsector... Sigh.
VB.NET was easier.
dont grovel... its not a very attractive feature and will make people less inclined to help you.
1) go check out a thread called "osdev tutorials" or something similar, its recent and has a list of good websites.
2) jamesmolloy.co.uk and brans kernel development are two good starters (but i would advise starting you're own kernel after fiddling with those)
3) consider using GRUB as a bootloader
1) go check out a thread called "osdev tutorials" or something similar, its recent and has a list of good websites.
2) jamesmolloy.co.uk and brans kernel development are two good starters (but i would advise starting you're own kernel after fiddling with those)
3) consider using GRUB as a bootloader
This is my bootcode-ish sort of thing... The result of three tutorials does it make sense?
[/code]
Code: Select all
[BITS 16]
[ORG 0x7C00] ;GO TO PMODE-ISH SORT OF THING
cli
xor ax, ax
mov ds, ax
lgdt [gdt_desc]
mov eax, cr0
or eax, 1
mov cr0, eax
jmp 08h:clear_pipe
[BITS 32]
clear_pipe:
mov ax, 10h
mov ds, ax
mov ss, ax
mov esp, 090000h
mov byte [ds:0B8000h], 'P'
mov byte [ds:0B8001h], 1Bh
hang:
jmp hang
gdt:
gdt_null:
dd 0
dd 0
gdt_code:
dw 0FFFFh
dw 0
db 0
db 10011010b
db 11001111b
db 0
gdt_data:
dw 0FFFFh
dw 0
db 0
db 10010010b
db 11001111b
db 0
gdt_end:
gdt_desc:
dw gdt_end - gdt - 1
dd gdt
;I ASSUME THE REST GOES HERE?
;MUST CALL KERNEL HERE, I THINK...
times 510-($-$$) db 0
dw 0AA55h
Re: Totally lost... Help a poor inocent noob!
That code is ripped off from the MuOS tutorial. Do you REALLY UNDERSTAND what it does?SphinCorp wrote:As much as I hate to admit defeat, I am clueless. I looked everywere and Cannot figure how to do this:
-load pmode (got this one now I think)
Anyway, if you can't handle PMode, you better start reading up. Intel manuals, tutorials, the wiki, Google, etc. You might also want to brush up your x86 Assembly skills. What language will your OS be in?
Look up the docs, but you're on your own for this one. See http://www.osdev.org/wiki/SFS - its creator is also a member of these forums.SphinCorp wrote: -implement SFS as the root filesystem
For your bootloader, it doesn't have to be a complete implementation - you just need enough code to read the file (WAP.SYS) into memory. Nothing else. (This is assuming you're on a floppy/hard drive in real mode, and so can hopefully fit the code in your bootloader).SphinCorp wrote: -load my kernel -WAP.SYS- (might have got that, I don't get the tutorial)
For your OS though, you'll want a complete implementation, device drivers for ATA, etc.
However, from what I've read, I'd STRONGLY ADVISE you to use a bootloader like GRUB instead (though I really don't think supports SFS).
Also, you could load your kernel first, then set up protected mode.
Oh yeah.SphinCorp wrote:VB.NET was easier.
Good luck!
"Sufficiently advanced stupidity is indistinguishable from malice."
You'll find a floppy image pre-installed with GRUB here. That's with an ext2 filesystem (there's no point using ext3 on a floppy - who needs journalling on a floppy?!) - there's also one with a FAT filesystem in pedigree's SVN, here.SphinCorp wrote:I wanted to use GRUB with ext3, but all GNU offers is source code, and I'm on windows. And the download link on osdever.net is broken...
Advice on how to use it with grub is given at my personal website, http://www.jamesmolloy.co.uk/ - I wrote those tutorials and they've helped some others around here I think, so they should be enough for your needs. If not, go google and find some more
Cheers,
James
@SphinCorp:
- Don't use SFS, but FAT12 or FAT16. They are standard, every OS need FAT-support (widely used on memorycards, floppies..) and when you OS grows you can develop your own one. FAT has not much features, just like SFS, but it's widely supported so using it makes more sense.
- Don't switch to protectedmode from a bootsector. You need that 512-bytes to load a bigger part (mostly a loader) of your OS using bios functions.
- I strongly advise you don't use GRUB. You are beginner, you need to learn how to write a simple bootloader. If you can't this, you won't be able to develop an OS. GRUB seems pretty easy, you can skip one part of the development (the bootloader) but at the next part (kernel) you run into problems again. Do yourself a favour and teach yourself how to write a good bootloader. It's better than just reading some GRUB-manpages, it's fun and it's a valuable part of your OS software.
- Don't use SFS, but FAT12 or FAT16. They are standard, every OS need FAT-support (widely used on memorycards, floppies..) and when you OS grows you can develop your own one. FAT has not much features, just like SFS, but it's widely supported so using it makes more sense.
- Don't switch to protectedmode from a bootsector. You need that 512-bytes to load a bigger part (mostly a loader) of your OS using bios functions.
- I strongly advise you don't use GRUB. You are beginner, you need to learn how to write a simple bootloader. If you can't this, you won't be able to develop an OS. GRUB seems pretty easy, you can skip one part of the development (the bootloader) but at the next part (kernel) you run into problems again. Do yourself a favour and teach yourself how to write a good bootloader. It's better than just reading some GRUB-manpages, it's fun and it's a valuable part of your OS software.
I personally advise against writing a bootloader first. Unless you're going to write your kernel in pure ASM anyway the set of skills required is slightly different. In kernel development it's very easy to get away with just one-liner asm statement as and when required.- I strongly advise you don't use GRUB. You are beginner, you need to learn how to write a simple bootloader. If you can't this, you won't be able to develop an OS. GRUB seems pretty easy, you can skip one part of the development (the bootloader) but at the next part (kernel) you run into problems again. Do yourself a favour and teach yourself how to write a good bootloader. It's better than just reading some GRUB-manpages, it's fun and it's a valuable part of your OS software.
As an example, I have never written my own bootloader.
I personally wrote my own bootloader, but mainly because I don't like using other people's code...
As for:
That shows a fundemental lack of knoledge of program flow...
Do you actually know what the gdt does and/or any actual assembler?
Jules
As for:
Code: Select all
;I ASSUME THE REST GOES HERE?
;MUST CALL KERNEL HERE, I THINK...
Do you actually know what the gdt does and/or any actual assembler?
Jules