Pointers in ASM

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
Matt

Pointers in ASM

Post by Matt »

I have this in my bootloader:
vesa_pmode_interface dw ''
...code to put stuff in vesa_pmode_interface

And I want to access this variable in my Kernel ASM. How would I do this? Is there even a way I could?
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:Pointers in ASM

Post by Pype.Clicker »

er ... if i understand well, your problem is just to pass the pointer to the Vesa Pmode Interface between the different stages of your boot... so i suggest you simply do

mov ax, [vesa_...]
just before you start your kernel

and have a kvesa_pmode_itf variable in your kernel that will simply be filled at kernel startup with
mov [kvesa_pmode_itf],ax

:)
Matt

Re:Pointers in ASM

Post by Matt »

that simple... ok :)
Thanks
Post Reply