Page 2 of 2

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Wed May 29, 2013 12:47 pm
by Kevin
Love4Boobies wrote:My point is not to learn everything. My point is that tutorials don't have enough information to serve as proper learning materials. Tutorials are what I am criticizing.
And my point is that in order to start learning you don't need all the information. Because you need to start somewhere. You never need the whole pile of documentation, you need the relevant information for the thing you're trying to do. Tutorials are very good in pointing you to the pieces that are relevant for the start. Newbies would drown in the flood of information otherwise.

And to be honest, I haven't read the spec that defines that the video memory is at 0xb8000 to this day. I'm glad some tutorial mentioned it. (Okay, in fact, I first read it in some Turbo Pascal book back then, but I couldn't use that information then.)

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Wed May 29, 2013 2:00 pm
by Mikemk
Kevin wrote:And to be honest, I haven't read the spec that defines that the video memory is at 0xb8000 to this day. I'm glad some tutorial mentioned it. (Okay, in fact, I first read it in some Turbo Pascal book back then, but I couldn't use that information then.)
Actually, there's not a spec, it's just a common convention. The bios could place video memory at 0x7c00, your bootloader at 0xb8000, and swap int's 13h and 10h, it just wouldn't be compatible with anything.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Wed May 29, 2013 3:35 pm
by Kevin
The BIOS Boot Specification exists. Documentation of the BIOS vendors exists as well. So if you do want to read it up in some official document, you can.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Wed May 29, 2013 3:56 pm
by Nessphoro
m12 wrote:
Kevin wrote:And to be honest, I haven't read the spec that defines that the video memory is at 0xb8000 to this day. I'm glad some tutorial mentioned it. (Okay, in fact, I first read it in some Turbo Pascal book back then, but I couldn't use that information then.)
Actually, there's not a spec, it's just a common convention. The bios could place video memory at 0x7c00, your bootloader at 0xb8000, and swap int's 13h and 10h, it just wouldn't be compatible with anything.
Wrong.

Devices' option rom decides what interrupt and memory to map to.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Wed May 29, 2013 9:05 pm
by Love4Boobies
The VGA specification does mandate that memory area, actually.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Thu May 30, 2013 1:39 am
by Combuster
Kevin wrote:And to be honest, I haven't read the spec that defines that the video memory is at 0xb8000 to this day.
Time to fix that

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Thu May 30, 2013 4:59 am
by Kevin
Combuster wrote:
Kevin wrote:And to be honest, I haven't read the spec that defines that the video memory is at 0xb8000 to this day.
Time to fix that
This is not a link to an official spec, but to some reference, which is described in its introduction like this: "This reference has grown out of my own notes and experimentation while learning to program the VGA hardware."

I don't doubt that there's somewhere a real spec for this, but I can't be bothered to actually look it up. Because this is likely one of very few pieces of information that I needed so far from the whole spec.

Re: Why is kernel placed at 1M in Bare Bones tutorial

Posted: Thu May 30, 2013 6:18 am
by Love4Boobies
Here it is.