Add EFLAGS_* macros, get rid of some more magic numbers.

git-svn-id: svn://kolibrios.org@7126 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2017-12-05 06:39:34 +00:00
parent 69f68d1bb2
commit 6494817540
2 changed files with 20 additions and 2 deletions

View File

@ -159,6 +159,24 @@ MXCSR_FZ equ 0x8000
MXCSR_INIT equ (MXCSR_IM+MXCSR_DM+MXCSR_ZM+MXCSR_OM+MXCSR_UM+MXCSR_PM)
EFLAGS_CF equ 0x000001 ; carry flag
EFLAGS_PF equ 0x000004 ; parity flag
EFLAGS_AF equ 0x000010 ; auxiliary flag
EFLAGS_ZF equ 0x000040 ; zero flag
EFLAGS_SF equ 0x000080 ; sign flag
EFLAGS_TF equ 0x000100 ; trap flag
EFLAGS_IF equ 0x000200 ; interrupt flag
EFLAGS_DF equ 0x000400 ; direction flag
EFLAGS_OF equ 0x000800 ; overflow flag
EFLAGS_IOPL equ 0x003000 ; i/o priviledge level
EFLAGS_NT equ 0x004000 ; nested task flag
EFLAGS_RF equ 0x010000 ; resume flag
EFLAGS_VM equ 0x020000 ; virtual 8086 mode flag
EFLAGS_AC equ 0x040000 ; alignment check flag
EFLAGS_VIF equ 0x080000 ; virtual interrupt flag
EFLAGS_VIP equ 0x100000 ; virtual interrupt pending
EFLAGS_ID equ 0x200000 ; id flag
IRQ_PIC equ 0
IRQ_APIC equ 1

View File

@ -356,7 +356,7 @@ proc test_cpu
pushfd
pop eax
mov ecx, eax
xor eax, 0x40000
xor eax, EFLAGS_AC
push eax
popfd
pushfd
@ -369,7 +369,7 @@ proc test_cpu
mov [cpu_type], CPU_486
mov eax, ecx
xor eax, 0x200000
xor eax, EFLAGS_ID
push eax
popfd
pushfd