You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

dumpregs.c 640B

1234567891011121314151617181920
  1. #include <stdio.h>
  2. #include <realmode.h>
  3. void __asmcall _dump_regs ( struct i386_all_regs *ix86 ) {
  4. __asm__ __volatile__ (
  5. TEXT16_CODE ( ".globl dump_regs\n\t"
  6. "\ndump_regs:\n\t"
  7. VIRT_CALL ( _dump_regs )
  8. "ret\n\t" ) : );
  9. printf ( "EAX=%08x EBX=%08x ECX=%08x EDX=%08x\n"
  10. "ESI=%08x EDI=%08x EBP=%08x ESP=%08x\n"
  11. "CS=%04x SS=%04x DS=%04x ES=%04x FS=%04x GS=%04x\n",
  12. ix86->regs.eax, ix86->regs.ebx, ix86->regs.ecx,
  13. ix86->regs.edx, ix86->regs.esi, ix86->regs.edi,
  14. ix86->regs.ebp, ix86->regs.esp,
  15. ix86->segs.cs, ix86->segs.ss, ix86->segs.ds,
  16. ix86->segs.es, ix86->segs.fs, ix86->segs.gs );
  17. }