help me loading binary files
Posted: Tue Dec 05, 2006 11:53 am
guys right now I can switch graphics, I got multitasking using stack based taskswitching, I got ring3, memory management using bitmap, so, I need
to understand a thing.
this is my link.ld that I use to create my kernel.bin
OUTPUT_FORMAT("binary")
ENTRY(start)
phys = 0x00100000;
SECTIONS
{
.text phys : AT(phys) {
code = .;
*(.text)
. = ALIGN(4096);
}
.data : AT(phys + (data - code))
{
data = .;
*(.data)
. = ALIGN(4096);
}
.bss : AT(phys + (bss - code))
{
bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .;
}
now is my question:
to create a program.bin to execute at my o.s
do I have to change these line: phys = 0x00100000; to
phys = 0x00000000; ??? I cannot understand that line..
is this something like org 100 from msdos .com file ?
and that program.bin need to be started like our kernel ?
using start.asm that call main from .c source ?
please guys help me... in case anyone wants to take a look at my source I´ll be so glad to share...
to understand a thing.
this is my link.ld that I use to create my kernel.bin
OUTPUT_FORMAT("binary")
ENTRY(start)
phys = 0x00100000;
SECTIONS
{
.text phys : AT(phys) {
code = .;
*(.text)
. = ALIGN(4096);
}
.data : AT(phys + (data - code))
{
data = .;
*(.data)
. = ALIGN(4096);
}
.bss : AT(phys + (bss - code))
{
bss = .;
*(.bss)
. = ALIGN(4096);
}
end = .;
}
now is my question:
to create a program.bin to execute at my o.s
do I have to change these line: phys = 0x00100000; to
phys = 0x00000000; ??? I cannot understand that line..
is this something like org 100 from msdos .com file ?
and that program.bin need to be started like our kernel ?
using start.asm that call main from .c source ?
please guys help me... in case anyone wants to take a look at my source I´ll be so glad to share...