Why is kernel placed at 1M in Bare Bones tutorial

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.
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

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

Post 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.)
Developer of tyndur - community OS of Lowlevel (German)
Mikemk
Member
Member
Posts: 409
Joined: Sat Oct 22, 2011 12:27 pm

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

Post 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.
Programming is 80% Math, 20% Grammar, and 10% Creativity <--- Do not make fun of my joke!
If you're new, check this out.
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

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

Post 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.
Developer of tyndur - community OS of Lowlevel (German)
User avatar
Nessphoro
Member
Member
Posts: 308
Joined: Sat Apr 30, 2011 12:50 am

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

Post 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.
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

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

Post by Love4Boobies »

The VGA specification does mandate that memory area, actually.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
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: Why is kernel placed at 1M in Bare Bones tutorial

Post 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
"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 ]
Kevin
Member
Member
Posts: 1071
Joined: Sun Feb 01, 2009 6:11 am
Location: Germany
Contact:

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

Post 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.
Developer of tyndur - community OS of Lowlevel (German)
User avatar
Love4Boobies
Member
Member
Posts: 2111
Joined: Fri Mar 07, 2008 5:36 pm
Location: Bucharest, Romania

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

Post by Love4Boobies »

Here it is.
"Computers in the future may weigh no more than 1.5 tons.", Popular Mechanics (1949)
[ Project UDI ]
Post Reply