[SOLVED] Question about (real mode) memory mapping
Posted: Thu Jul 26, 2012 4:08 pm
I've been reading several tutorials about developing OSes, and one of them mentioned that to write to video ram (in real mode, at least) you write to certain addresses in ram, and while tinkering with my own "OS", I have used the B8000 memory address to write text to the screen. Here's the actual table, copy-pasted:
General x86 Real Mode Memory Map:
0x00000000 - 0x000003FF - Real Mode Interrupt Vector Table
0x00000400 - 0x000004FF - BIOS Data Area
0x00000500 - 0x00007BFF - Unused
0x00007C00 - 0x00007DFF - Our Bootloader
0x00007E00 - 0x0009FFFF - Unused
0x000A0000 - 0x000BFFFF - Video RAM (VRAM) Memory
0x000B0000 - 0x000B7777 - Monochrome Video Memory
0x000B8000 - 0x000BFFFF - Color Video Memory
0x000C0000 - 0x000C7FFF - Video ROM BIOS
0x000C8000 - 0x000EFFFF - BIOS Shadow Area
0x000F0000 - 0x000FFFFF - System BIOS
(source http://www.brokenthorn.com/Resources/OSDev7.html)
This leads me to a few questions:
1. I thought video ram was on the actual graphics card/controller. Why is it RAM?
2. I thought the BIOS was in its own chip. Why is it in RAM?
3. In Pmode or unreal mode, do these addresses correspond to what's in the table?
4. Are these locations usable for general memory storage, or do they (at least in real mode) always mean what that table says they do? (Ex. B8000 - BFFFF will always be colour video memory)
Thanks a bunch
General x86 Real Mode Memory Map:
0x00000000 - 0x000003FF - Real Mode Interrupt Vector Table
0x00000400 - 0x000004FF - BIOS Data Area
0x00000500 - 0x00007BFF - Unused
0x00007C00 - 0x00007DFF - Our Bootloader
0x00007E00 - 0x0009FFFF - Unused
0x000A0000 - 0x000BFFFF - Video RAM (VRAM) Memory
0x000B0000 - 0x000B7777 - Monochrome Video Memory
0x000B8000 - 0x000BFFFF - Color Video Memory
0x000C0000 - 0x000C7FFF - Video ROM BIOS
0x000C8000 - 0x000EFFFF - BIOS Shadow Area
0x000F0000 - 0x000FFFFF - System BIOS
(source http://www.brokenthorn.com/Resources/OSDev7.html)
This leads me to a few questions:
1. I thought video ram was on the actual graphics card/controller. Why is it RAM?
2. I thought the BIOS was in its own chip. Why is it in RAM?
3. In Pmode or unreal mode, do these addresses correspond to what's in the table?
4. Are these locations usable for general memory storage, or do they (at least in real mode) always mean what that table says they do? (Ex. B8000 - BFFFF will always be colour video memory)
Thanks a bunch