C language pointer to another pointer

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.
Post Reply
Thunder

C language pointer to another pointer

Post 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
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:C language pointer to another pointer

Post 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.
Thunder

Re:C language pointer to another pointer

Post by Thunder »

My base address is at 0 and limit 4GB.
Then it should work ::)
Post Reply