Page 1 of 1

Pointers in ASM

Posted: Fri Aug 09, 2002 8:25 pm
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?

Re:Pointers in ASM

Posted: Tue Aug 13, 2002 7:02 am
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

:)

Re:Pointers in ASM

Posted: Tue Aug 13, 2002 8:43 am
by Matt
that simple... ok :)
Thanks