Hi,
I was reading about BDA having valuable information and that I shouldn't overwrite it.
So I was thinking maybe it would be better to just relocate it to someplace(possibly a page that would be moved on disk).
And I also was thinking to overwrite the IVT since I am not going back to real mode anyways.
So are there any cons for overwriting the IVT or relocating the BDA?
Thanks
Should I overwrite the IVT and relocate the BDA?
Re: Should I overwrite the IVT and relocate the BDA?
Only if you are in real mode. However there are some information that should't be erased, because in the future you could have to return in real mode in some way.
Re: Should I overwrite the IVT and relocate the BDA?
Well except for changing VGA mode I don't really think there is a reason to return to real mode(and for that too I can write a vga driver)Karlosoft wrote:Only if you are in real mode. However there are some information that should't be erased, because in the future you could have to return in real mode in some way.
But what I am asking is - will there be side affects of doing this?
-
- Member
- Posts: 255
- Joined: Tue Jun 15, 2010 9:27 am
- Location: Flyover State, United States
- Contact:
Re: Should I overwrite the IVT and relocate the BDA?
If you stay in protected mode, there shouldn't be any side effects at all. But if you ever have any desire to use V86 mode, you should leave the BDA and IVT untouched.
Re: Should I overwrite the IVT and relocate the BDA?
Thanks, I thought it was much complicated than that.Tosi wrote:If you stay in protected mode, there shouldn't be any side effects at all. But if you ever have any desire to use V86 mode, you should leave the BDA and IVT untouched.
Re: Should I overwrite the IVT and relocate the BDA?
"I have the word 'Complicated' ".(Just kidding)shedokan wrote:Thanks, I thought it was much complicated than that.Tosi wrote:If you stay in protected mode, there shouldn't be any side effects at all. But if you ever have any desire to use V86 mode, you should leave the BDA and IVT untouched.
Anyway, I don't see any reason to overwrite the BDA and the IVT even if you don't use them in the future.What is so annoying about just saving them? They don't even cost you any reasonable amount of memory.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !
Re: Should I overwrite the IVT and relocate the BDA?
I just want to have my system on 0:0Chandra wrote:"I have the word 'Complicated' ".(Just kidding)shedokan wrote:Thanks, I thought it was much complicated than that.Tosi wrote:If you stay in protected mode, there shouldn't be any side effects at all. But if you ever have any desire to use V86 mode, you should leave the BDA and IVT untouched.
Anyway, I don't see any reason to overwrite the BDA and the IVT even if you don't use them in the future.What is so annoying about just saving them? They don't even cost you any reasonable amount of memory.
that way everything's organized, it's not fair letting something I'm not going to use(or rarely) be on the memory before my kernel.
if the kernel is in control it should be placed at 0:0
Re: Should I overwrite the IVT and relocate the BDA?
Bad Idea. If your kernel grows in size significantly, then it'll write over the VRAM and you end up with a BROKEN OS.Shedokan wrote: if the kernel is in control it should be placed at 0:0
A neatly written OS always organizes things so it's always best to load your kernel at 1Mb mark and leave the data below it untouched. You can then use paging to remap it to some higher addresses.
Programming is not about using a language to solve a problem, it's about using logic to find a solution !