Search found 13 matches
- Thu Apr 08, 2010 2:14 pm
- Forum: Beginning OS Development
- Topic: How does executable load dll ?
- Replies: 7
- Views: 34590
Re: How does executable load dll ?
tnx i've read MSVC tutorial and i've understood :) so, the story is that we've to load images manually in a fixed memory address. The same thing is for dlls :) (i found an microsoft doc where they explain dlls header is as pe header, only a check byte changes). i suppose the only way is that untill ...
- Fri Apr 02, 2010 5:56 pm
- Forum: Beginning OS Development
- Topic: How does executable load dll ?
- Replies: 7
- Views: 34590
Re: How does executable load dll ?
o.O The EXE base address can be retrieved from either MSVC itself. Through programming, this involves reading a sector or two of the file and obtaining its base address (to load it to) from the PE header structures (This is described in the MSVC chapter.) uhm .. how can msvc set the address where ex...
- Thu Apr 01, 2010 1:23 pm
- Forum: Beginning OS Development
- Topic: gdt and pmode problem
- Replies: 12
- Views: 51825
Re: gdt and pmode problem
hi Andyhhp, I remember in the stage 2 of the bootloader 4 (Tut 6), we set "org 0", and save value of cs to ds. (So I guess cs is set to 0x0500 automatically.) cs isnt set automatically, but by retf function in stage1 code, which sets cs to 0x50 push WORD 0x0050 push WORD 0x0000 retf I tried the sam...
- Thu Apr 01, 2010 9:28 am
- Forum: Beginning OS Development
- Topic: How does executable load dll ?
- Replies: 7
- Views: 34590
Re: How does executable load dll ?
how does exe know the address where i loaded to ? and couldn't i to use binary format ? if i'll use a binary library, for example, i could to create an header where exe retrieves functions addresses, isnt it? the main question is, why do we use pe format and dlls ? can we make a form of dinamic libr...
- Wed Mar 31, 2010 11:43 pm
- Forum: Beginning OS Development
- Topic: How does executable load dll ?
- Replies: 7
- Views: 34590
How does executable load dll ?
hi :) tutorial 15 is about hal, wrote in c; hal functions are compiled as dll, and linked to exe ... i've understood stage2 loads kernel.exe and call entry point ( main() ), but how does kernel.exe refers to dll without include in as lib ? should it to load dll in memory or not ? and after load an e...
- Tue Mar 30, 2010 10:57 pm
- Forum: Beginning OS Development
- Topic: Loading kernel
- Replies: 7
- Views: 31901
Re: Loading kernel
no :S
it should have referenced to org address on making labels but nasm gave me no warnings :S
i don't know why ... if any, i would have correct them
if you want i write kernel code here in order to compile it XD
it should have referenced to org address on making labels but nasm gave me no warnings :S
i don't know why ... if any, i would have correct them
if you want i write kernel code here in order to compile it XD
- Tue Mar 30, 2010 10:14 pm
- Forum: Beginning OS Development
- Topic: Loading kernel
- Replies: 7
- Views: 31901
Re: Loading kernel
-.-
tnx Andyhhp .... you've saved me again
talking about use of si, i've tried to write mov si, 0x100002, and nasm has wrote word data exceeds bounds ... so it cut address ...
tnx everyone
see you soon
tnx Andyhhp .... you've saved me again
talking about use of si, i've tried to write mov si, 0x100002, and nasm has wrote word data exceeds bounds ... so it cut address ...
tnx everyone

see you soon
- Tue Mar 30, 2010 10:14 am
- Forum: Beginning OS Development
- Topic: Loading kernel
- Replies: 7
- Views: 31901
Re: Loading kernel
using mov si, shellWelcome, si is set to a random value, as it was overwritten, and cpu triple faults getting a gdt segment access violation. this is the problem ... si isnt set to 100003 i.e. , it is set to some random address as it's overwritten bits 32 ; protected mode Stage3: ;*****************...
- Mon Mar 29, 2010 9:27 pm
- Forum: Beginning OS Development
- Topic: Loading kernel
- Replies: 7
- Views: 31901
Loading kernel
hi i've a problem loading kernel image ... this is kernel source: bits 32 org 0x100000 jmp kernel_main %include "includes\stdio.inc" %define TEXT_ATTRIBUTES 00011111b shellWelcome db "Welcome!", 0 credits.msg db "OS", 0 %define TEXT_ATTRIBUTES 00011111b kernel_main: mov ax, DATA_DESC ; set data segm...
- Mon Mar 29, 2010 9:01 pm
- Forum: Beginning OS Development
- Topic: CS Address of GDt
- Replies: 1
- Views: 13367
Re: CS Address of GDt
instead of a far jump, if we do this mov ax, 08h mov cs, ax jmp Stage3 Would it be ok? you can't to set cs segment with mov instruction, it will triple fault. And is there any rule on choosing the starting address for the stack? You can to choose every address, the only rule is that these addresses...
- Thu Mar 25, 2010 5:04 pm
- Forum: Beginning OS Development
- Topic: gdt and pmode problem
- Replies: 12
- Views: 51825
Re: gdt and pmode problem
uhm .. i've read. but why i've to set segment registers to 0, if i loaded stage2 to 0x50:0...
if i set segments to 0x50 it should work, but it doesnt
EDIT: mmm.. could it be because floppy read sectors function loads stage in es:bx (0:500) ?
i'm confused ..
if i set segments to 0x50 it should work, but it doesnt
EDIT: mmm.. could it be because floppy read sectors function loads stage in es:bx (0:500) ?
i'm confused ..
- Thu Mar 25, 2010 4:24 pm
- Forum: Beginning OS Development
- Topic: gdt and pmode problem
- Replies: 12
- Views: 51825
Re: gdt and pmode problem
all right :D it was an addressing problem.... i've set segment registers to 0 and it has worked but i would like to understand why it was wrong... i loaded stage2 to 0:0x500 or 0x50:0 (i hope it's the same o.o), but i had to set segments to 0 why didnt it work setting org to 0x50 ? i had to set segm...
- Tue Mar 23, 2010 11:36 am
- Forum: Beginning OS Development
- Topic: gdt and pmode problem
- Replies: 12
- Views: 51825
gdt and pmode problem
hi i have a problem while installing gdt and in far jmp to set cs. i think my first problem is gdt install: this is my code Stage2 org 0x500 ; loaded to first real mode unused address bits 16 jmp main ;******************************************* ; Global Description Table (GDT) Predef ;*************...