VESA int 10h AX=4F00h and int 10h AH=0Eh [solved]

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post 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
User avatar
zaleschiemilgabriel
Member
Member
Posts: 232
Joined: Mon Feb 04, 2008 3:58 am

Post by zaleschiemilgabriel »

Thanks for the tip! I'm changing my code right now.
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post 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
User avatar
Wave
Member
Member
Posts: 50
Joined: Sun Jan 20, 2008 5:51 am

Post by Wave »

GRUB leaves me in real mode
That's wrong.
Conway's Law: If you have four groups working on a compiler, you'll get a 4-pass compiler.
Melvin Conway
User avatar
zaleschiemilgabriel
Member
Member
Posts: 232
Joined: Mon Feb 04, 2008 3:58 am

Post 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!
jal
Member
Member
Posts: 1385
Joined: Wed Oct 31, 2007 9:09 am

Post 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
User avatar
zaleschiemilgabriel
Member
Member
Posts: 232
Joined: Mon Feb 04, 2008 3:58 am

Post 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. ;)
Post Reply