static struct segoff __text16 ( int20_vector );
#define int20_vector __use_text16 ( int20_vector )
extern void int20_wrapper ( void );
static __cdecl void int20 ( struct i386_all_regs *ix86 ) {
   // INT 20 handler goes here
}

static void hook_int20 ( void ) {
        __asm__  __volatile__ (
              TEXT16_CODE ( "\nint20_wrapper:\n\t"
                             "pushl %0\n\t"
                             "pushw %%cs\n\t"
                             "call prot_call\n\t"
                             "addw $4, %%sp\n\t"
                             "iret\n\t" )
               : : "i" ( int20 ) );

        hook_bios_interrupt ( 0x20, ( unsigned int ) int20_wrapper,
                              &int20_vector );
}

Navigation

* [[:start|Home]] * [[:about|About our Project]] * [[:download|Download]] * [[:screenshots|Screenshots]] * Documentation * [[:howtos|HowTo Guides]] * [[:appnotes|Application Notes]] * [[:faq:|FAQs]] * [[:doc|General Doc]] * [[:talks|Videos, Talks, and Papers]] * [[:hardwareissues|Hardware Issues]] * [[:mailinglists|Mailing lists]] * [[http://support.etherboot.org/|Bugtracker]] * [[:contributing|Contributing]] * [[:editing_permission|Wiki Edit Permission]] * [[:wiki:syntax|Wiki Syntax]] * [[:contact|Contact]] * [[:relatedlinks|Related Links]] * [[:commerciallinks|Commercial Links]] * [[:acknowledgements|Acknowledgements]] * [[:logos|Logo Art]]

QR Code
QR Code soc:2008:dverkamp:notes:hook_bios_interrupt (generated for current page)