Page 1 of 1
0x7C00
Posted: Fri Apr 03, 2009 10:09 pm
by rty
Hi, im new to the forum, nice work writing the OS Dev tutorial Mike, and thanks.
Im quite new to assembly, usually I write in c/c++ and script based languages.
From the tutorial
"The BIOS loads us at 0x7C00"
From the NASM manual
"The function of the ORG directive is to specify the origin address which NASM will assume the program begins at when it is loaded into memory"
"Its sole function is to specify one offset which is added to all internal address references within the section"
1: Does the BIOS load the program/boot-loader into the RAM memory?
2: Why do you load the program/boot-loader at 0x7C00?
3: Does NASM differenciate between absolute and segment:offset by they way they are i.e.
org 0x7C00 and org 0007:7B90
rty
Re: 0x7C00
Posted: Fri Apr 03, 2009 11:50 pm
by Mike
rty wrote:1: Does the BIOS load the program/boot-loader into the RAM memory?
Yes.
rty wrote:2: Why do you load the program/boot-loader at 0x7C00?
We do not load it to 0x7c00, the BIOS does. There is no specific reason why 0x7c00, it has became a standard loading address for most, if not all, BIOS software.
rty wrote:3: Does NASM differenciate between absolute and segment:offset by they way they are i.e.
org 0x7C00 and org 0007:7B90
It does. Absolute addresses are linear addresses. You can think of a linear address as a 32 bit offset address, without the segment. Linear addresses are a different memory addressing model then segment:offset addressing.
Re: 0x7C00
Posted: Sat Apr 04, 2009 3:03 am
by rty
Thanks Mike.
I understand most of that, but I think I wanna learn more about memory models before I get lost.
At the moment im reading intel manuals, this should help understand processors a bit more.
IntelĀ® 64 and IA-32 Architectures Software Developer's Manual Volume 1: Basic Architecture
Ive got a lot to learn.. assembly in NASM aswell..
rty
Re: 0x7C00
Posted: Sat Apr 04, 2009 3:45 am
by Mike
Hello,
Tutorial 4 (search for "Segment:Offset Memory Mode - History" section). This portion of the tutorial contains alot of information on segment:offset addressing.
Tutorial 8 (search for "PMode Memory Addressing" section). This portion of the tutorial covers the descriptor:linear addressing mode used in protected mode.
These might help out a little along with your copy of the Intel manuals

Re: 0x7C00
Posted: Sun Apr 05, 2009 5:01 am
by rty
Thanks again Mike.
My head is burning with all the information.
I know a bit more about the Memory Models, Flat, Segmented, and Real-Address mode.
And the different ways the processor accesses memory, Linear Addresses and Logical Addresses(segment:offset).
I saw the descriptor tables in Tutorial 8..
I dont know what they are yet, but I see how vital they are.
Ill be reading Tutorial 8: World of Protected Mode completely, and AoA 4.0: Memory layout and access next.
Im kinda sliding off topic here..
rty