Page 1 of 1

C language pointer to another pointer

Posted: Sun Jun 01, 2003 10:10 am
by Thunder
Hello
I have just managed where VESA LFB is :D.
In asm it works fine, but how to implement this:

if VESA LFB address is at 0x9A28 32 bit long.
can pointer to this LFB address pointer be like this :

unsigned char *VGAMEM=(unsigned char*)(VESA_MODE_INFO_BLOCK[0xA]);

unsigned int *VESA_MODE_INFO_BLOCK=(unsigned int*)0x9A00;

Thanks for help

Re:C language pointer to another pointer

Posted: Mon Jun 02, 2003 1:14 am
by Pype.Clicker
hmm ... provided that you have offset == physical address mapping, it should work. If you have non-zero data segment base, you need to substract the data segment base first. And if you have some paging, you must use the "pointer" of the VBE LFB as the frame value for some pages and map the LFB in your address space.

Re:C language pointer to another pointer

Posted: Mon Jun 02, 2003 1:52 am
by Thunder
My base address is at 0 and limit 4GB.
Then it should work ::)