www.delorie.com/djgpp/faq/lowlevel/rmcb.html   search  
How can I make any real-mode service call my function? E.g., the mouse driver has a provision (function 0Ch) to call user-defined handler when certain events occur, which expects a far pointer to my function in ES:DX register pair.

Those services expect a real-mode function, so you should wrap your protected-mode function with a real-mode stub. To this end, call _go32_dpmi_allocate_real_mode_callback_retf() library function, and pass the rm_segment and rm_offset fields it returns to the service you want (in the above example, Int 33h function 0Ch) by calling _go32_dpmi_simulate_int(). See the docs in the libcref.i info file for further details about allocating wrapper function.


  webmaster     delorie software   privacy  
  Copyright © 1995     Updated Feb 1995