dumpregs.c

Go to the documentation of this file.
00001 #include <stdio.h>
00002 #include <realmode.h>
00003 
00004 void __asmcall _dump_regs ( struct i386_all_regs *ix86 ) {
00005 
00006         __asm__ __volatile__ (
00007                 TEXT16_CODE ( ".globl dump_regs\n\t"
00008                               "\ndump_regs:\n\t"
00009                               "pushl $_dump_regs\n\t"
00010                               "pushw %%cs\n\t"
00011                               "call prot_call\n\t"
00012                               "addr32 leal 4(%%esp), %%esp\n\t"
00013                               "ret\n\t" ) : : );
00014 
00015         printf ( "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n"
00016                  "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n"
00017                  "CS=%04x SS=%04x DS=%04x ES=%04x FS=%04x GS=%04x\n",
00018                  ix86->regs.eax, ix86->regs.ebx, ix86->regs.ecx,
00019                  ix86->regs.edx, ix86->regs.esi, ix86->regs.edi,
00020                  ix86->regs.ebp, ix86->regs.esp,
00021                  ix86->segs.cs, ix86->segs.ss, ix86->segs.ds,
00022                  ix86->segs.es, ix86->segs.fs, ix86->segs.gs );
00023 }

Generated on Tue Apr 6 20:00:49 2010 for gPXE by  doxygen 1.5.7.1