Help please

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
Omega

Help please

Post by Omega »

hi,
I have myself an assembler bootloader and i have made myself a basic shell in assembler, but i need help with accessing files and how to write my kernel in c++, i have tried but my bootloder dosent load it. Any help will be apreciated.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Help please

Post by Pype.Clicker »

http://www.invalidsoftware.net/os/ might help you with the C++ part.
For the "files loading", what i suggest is you start with a very simple file system looking like the following one:

- The whole filesystem is contained in a contiguous disk location (either a set of reserved sectors, or a defragmented system file on a FAT partition ...) and read at once in memory before the kernel enters protected mode (so that you have access to INT13 and INT21 to help loading it)

- The kernel receives the address of the filesystem image in memory through its parameters block. It could also be a constant location if you wish so.

- The filesystem image is made of file bytes and a directory that gives the offset and length for every file in the image. The name will have a fixed length for the sake of KISS.

- The only system call the filesystem provides is "map(filename)" which returns the address of the file "filename" mapped in memory.

- The file-system is read-only (this prevents you from needing a "commit(filename, addr)" and start wondering how you will implement it. The data for the mapped file should be treated as read-only as well...
Omega

Re:Help please

Post by Omega »

Ok, i have done the c++ stuff on that page but now my boot loader just hangs when it gets to loading the kernel, anyone got any good bootloaders that are written using nasm, use pmode and a20 and work with c++.
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Help please

Post by Pype.Clicker »

probably your kernel is too large for your bootsector, or does not start at the expected sector.

Also check it has the right format (hex editor will be your friend here :)
Omegaice

Re:Help please

Post by Omegaice »

hmm, that dident help, i actualy need a bootloader other than grub or lilo that someone has made using nasm that works with a c++ kernel.

by the way im omega
distantvoices
Member
Member
Posts: 1600
Joined: Wed Oct 18, 2006 11:59 am
Location: Vienna/Austria
Contact:

Re:Help please

Post by distantvoices »

ugh ... said tarzan

google is your best friend amongst others you might find out there in the wilderness of internet. It is u to YOU to sort out the info you need.

and concerning boot sectors: there is plenty of stuff in internet. You can search for john fines fine sites about p-mode and boot loaders. that is what I suggest. Would be no problem for you since you have internet, don't you?

stay safe and remember: correct jump to the code or no correct jump to the code that is the question ... Even ol'good hamlet struggled about that.
... the osdever formerly known as beyond infinity ...
BlueillusionOS iso image
Post Reply