[contrib] Allow Network Protocol header to display in rom-o-matic
[gpxe.git] / src / arch / i386 / core / dumpregs.c
blob82dc21847e6b9a7208ff770395d9e937d4be6b28
1 #include <stdio.h>
2 #include <realmode.h>
4 void __asmcall _dump_regs ( struct i386_all_regs *ix86 ) {
6 __asm__ __volatile__ (
7 TEXT16_CODE ( ".globl dump_regs\n\t"
8 "\ndump_regs:\n\t"
9 "pushl $_dump_regs\n\t"
10 "pushw %%cs\n\t"
11 "call prot_call\n\t"
12 "addr32 leal 4(%%esp), %%esp\n\t"
13 "ret\n\t" ) : : );
15 printf ( "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n"
16 "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n"
17 "CS=%04x SS=%04x DS=%04x ES=%04x FS=%04x GS=%04x\n",
18 ix86->regs.eax, ix86->regs.ebx, ix86->regs.ecx,
19 ix86->regs.edx, ix86->regs.esi, ix86->regs.edi,
20 ix86->regs.ebp, ix86->regs.esp,
21 ix86->segs.cs, ix86->segs.ss, ix86->segs.ds,
22 ix86->segs.es, ix86->segs.fs, ix86->segs.gs );