Page 2 of 2

Posted: Thu Feb 21, 2008 7:04 am
by jal
zaleschiemilgabriel wrote:To go through the list, I set the DS to the segment in that pointer. This segment didn't match my data segment, so when I tried to display text from my data segment using int 10h 0Eh, it wouldn't work.
Heheh, welcome in the wonderful world of real mode x86 programming :). Just a tip: I'd use ES, not DS, to point to external structs like that. That avoids the problems you encountered.


JAL

Posted: Thu Feb 21, 2008 11:16 am
by zaleschiemilgabriel
Thanks for the tip! I'm changing my code right now.

Posted: Thu Feb 21, 2008 1:48 pm
by jal
zaleschiemilgabriel wrote:Thanks for the tip! I'm changing my code right now.
You're welcome. The only 'ligit' reason for changing DS is when you want to do a stos or movs or the like outside your normal data segment, where it is a requirement to use ds. In all other cases ds should stay the same (and yes, of course there are many exceptions thinkable, but as long as you keep your local stuf within 64Kb, DS better just stays what it is).


JAL

Posted: Fri Feb 22, 2008 5:16 am
by Wave
GRUB leaves me in real mode
That's wrong.

Posted: Fri Feb 22, 2008 6:21 am
by zaleschiemilgabriel
Wave wrote:
GRUB leaves me in real mode
That's wrong.
I load my partition boot sector using chain-loading. Then from the boot sector I load the kernel where I set PM. Either GRUB loads my boot sector in RM or in some kind of VM that feels like RM. I don't really care as long as my segments work as they do in RM!
I really don't think the guys who wrote GRUB went through the trouble of emulating RM in PM just to load a simple boot sector. If you have any proof of it, spill it out already!

Posted: Sun Feb 24, 2008 2:40 am
by jal
zaleschiemilgabriel wrote:I load my partition boot sector using chain-loading.
This means Grub does exaclty nothing, as it makes the chainloaded bootloader think it was the first to start (the only way to have a multiboot Windows). You could as well skip Grub alltogether.


JAL

Posted: Tue Feb 26, 2008 2:01 am
by zaleschiemilgabriel
jal wrote: This means Grub does exaclty nothing, as it makes the chainloaded bootloader think it was the first to start (the only way to have a multiboot Windows). You could as well skip Grub alltogether.
You're right, that's my intention, but I still need GRUB to boot other operating systems. ;)