cpu.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * cpu.h
  3. *
  4. * Copyright (C) 2017 Aleksandar Andrejevic <theflash@sdf.lonestar.org>
  5. *
  6. * This program is free software: you can redistribute it and/or modify
  7. * it under the terms of the GNU Affero General Public License as
  8. * published by the Free Software Foundation, either version 3 of the
  9. * License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU Affero General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Affero General Public License
  17. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef __MONOLITHIUM_CPU_H__
  20. #define __MONOLITHIUM_CPU_H__
  21. typedef struct
  22. {
  23. dword_t data_selector;
  24. dword_t edi, esi, ebp, esp, ebx, edx, ecx, eax;
  25. dword_t error_code;
  26. dword_t eip, cs, eflags;
  27. } registers_t;
  28. typedef struct
  29. {
  30. dword_t data_selector;
  31. dword_t edi, esi, ebp, esp, ebx, edx, ecx, eax;
  32. dword_t error_code;
  33. dword_t eip, cs, eflags, esp3, ss;
  34. } registers_ext_t;
  35. typedef struct
  36. {
  37. dword_t data_selector;
  38. dword_t edi, esi, ebp, esp, ebx, edx, ecx, eax;
  39. dword_t error_code;
  40. dword_t eip, cs, eflags, esp3, ss, es, ds, fs, gs;
  41. } registers_ext_vm86_t;
  42. #endif