Bean wrote: > On Sun, Aug 17, 2008 at 7:31 PM, Vesa Jääskeläinen <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: >>> I have made generic function that does basically the same thing for bios >>> service 0x10 (video). In that modification you prepare registers >>> structure that will be configured during real mode switching. I am yet >>> to commit it for review, but I think it would be more generic way to do >>> this. When I come back from my holiday I will commit the code for review. >>> >>> So please wait a bit before committing this :) > > Hi, > > I'm thinking perhaps we can make it more generic and support multiple > INT in one function. One way to do this is not use INT, but retrieve > the address from IVT and do a far call. On return, pop the flag on > stack. This would also make it easily to support far call, In that > case, we just don't pop the flag.
Hmm. I have faint memory that this has been done previously somewhere :)... need to think this a bit more. > I also notice that you do the protected/real mode switch in > grub_bioscall_int10h, why not use the prot_to_real and real_to_prot ? > If you need to keep the value of %eax, you can store it in a structure > and pass it using other register like %ecx. I wanted it to be easily manageable so I can alter everything in order to get it working at the first :) But basically the points were: - I needed to put registers to the stack and thus need to differentiate esp and ebp. - When returning I need to store those registers to structure provided by caller. - There was no need to "corrupt" stack area with return address, and I needed stack for different purpose Thanks, Vesa Jääskeläinen _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel