So you have no issues stealing someone's vesa code, without even knowing what it does?
Anyway...
Do you at least know how to get a copy of the Vesa protected mode interface? Theoretically, you don't have to do anything else (I don't think..?) but you _should_ copy this memory into your pmode address space, and protect it somehow.
in a nutshell:
ax = 0x4f0a
bx = 0
int 0x10 ; in real mode!
if(ah) error
pmBuffer = alloc cx bytes in pmode
make memory (pmBuffer) executable/read-only (if need be)
copy real mode memory (es:di) to new buffer (cx bytes long, as above)
Done.
Now all pmode interface functions (setWindow, setDisplayStart, setPalette, and IOPrivInfo) can be called as offsets from your newly allocated pmode buffer...
ie: bankRoutine = (pmBuffer + pmBuffer->setWindow);
I'm not gonna bother with an assembly implementation... I don't have the time
This is not trivial. If you don't have a memory management system in place, you'll have to improvise on the malloc, etc part... I'd reccomend getting a memory management system in place first, actually. You'll also need methods of switching to and from real-mode or (better yet) a vm86 task.
Jeff
PS: the protected mode interface is part of VBE _2_