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
0x7C00
Moderator:Moderators
Re: 0x7C00
Yes.rty wrote:1: Does the BIOS load the program/boot-loader into the RAM memory?
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:2: Why do you load the program/boot-loader at 0x7C00?
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.rty wrote:3: Does NASM differenciate between absolute and segment:offset by they way they are i.e.
org 0x7C00 and org 0007:7B90
Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Re: 0x7C00
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
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
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
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

Lead Programmer for BrokenThorn Entertainment, Co.
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Website: http://www.brokenthorn.com
Email: webmaster@brokenthorn.com
Re: 0x7C00
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
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