;---------------------System-Control Registers----------------

;Control Register 0
PROTECTION_ENABLED		equ 00000001h
MONITOR_COPROCESSOR		equ 00000002h
EMULATION				equ 00000004h
TASK_SWITCHED			equ 00000008h
EXTENSION_TYPE			equ 00000010h
NUMERIC_ERROR			equ 00000020h
WRITE_PROTECT			equ 00010000h
ALIGNMENT_MASK			equ 00040000h
NOT_WRITETHROUGH		equ 20000000h
CACHE_DISABLE			equ 40000000h
PAGING					equ 80000000h

;CR2 and CR3 Registers
PWT	equ 08h
PCD	equ 10h

;CR4 Register
VME			equ 00000001h
PVI			equ 00000002h
TSD			equ 00000004h
DE			equ 00000008h
PSE			equ 00000010h
PAE			equ 00000020h
MCE			equ 00000040h
PGE			equ 00000080h
PCE			equ 00000100h
OSFXSR		equ 00000200h
OSXMMEXCPT	equ 00000400h

;CR8 Register
TPR equ cr8

;RFLAGS Register
CARRY_FLAG		equ 00000001h
PARITY_FLAG		equ 00000004h
AUXILIARY_FLAG	equ 00000010h
ZERO_FLAG		equ 00000040h
SIGN_FLAG		equ 00000080h
TRAP_FLAG		equ 00000100h
INTERRUPT_FLAG	equ 00000200h
DIRECTION_FLAG	equ 00000400h
OVERFLOW_FLAG	equ 00000800h
IOPL0			equ 00001000h
IOPL1			equ 00002000h
NESTED_TASK		equ 00004000h
RESUME_FLAG		equ 00010000h
VIRTUAL8086_MODE			equ 00020000h
ALIGNMENT_CHECK				equ 00040000h
VIRTUAL_INTERRUPT			equ 00080000h
VIRTUAL_INTERRUPT_PENDING	equ 00100000h
ID_FLAG						equ 00200000h

;EFER MSR Register
MSR_EFER	equ 0C0000080h
SCE			equ 00000001h
LME			equ 00000100h
LMA			equ 00000400h
NXE			equ 00000800h
SVME		equ 00001000h
LMSLE		equ 00002000h
FFXSR		equ 00004000h

SYS_CTRL STRUC
	_cr0	dq ?
	_cr2	dq ?
	_cr3	dq ?
	_cr4	dq ?
	_cr8	dq ?
	RFLAGS	dq ?
	EFER	dq ?
SYS_CTRL ends

;------------------Model-Specific Registers (MSRs)---------------------
MSR_SYSCFG	equ C0010010h
TOM2		equ 1 shl 21
MVDM		equ 1 shl 20
MFDM		equ 1 shl 19
MFDE		equ 1 shl 18
