- Use __writeeflags instead of clc to clear the carry flag.

svn path=/trunk/; revision=43108
This commit is contained in:
Stefan Ginsberg 2009-09-21 22:08:44 +00:00
parent 9422016556
commit aaff3e2d56

View file

@ -19,19 +19,6 @@
#include <freeldr.h>
FORCEINLINE
VOID
ClearCarryFlag(VOID)
{
#if defined(__GNUC__)
__asm__ ("clc");
#elif defined(_MSC_VER)
__asm clc;
#else
#error
#endif
}
#define BCD_INT(bcd) (((bcd & 0xf0) >> 4) * 10 + (bcd &0x0f))
TIMEINFO*
@ -44,7 +31,7 @@ PcGetTime(VOID)
* in the Compaq Deskpro EP/SB, leave CF unchanged
* if successful, so CF should be cleared before
* calling this function. */
ClearCarryFlag();
__writeeflags(__readeflags() & ~EFLAGS_CF);
/* Int 1Ah AH=04h
* TIME - GET REAL-TIME CLOCK DATE (AT,XT286,PS)
@ -68,7 +55,7 @@ PcGetTime(VOID)
/* Some BIOSes leave CF unchanged if successful,
* so CF should be cleared before calling this function. */
ClearCarryFlag();
__writeeflags(__readeflags() & ~EFLAGS_CF);
/* Int 1Ah AH=02h
* TIME - GET REAL-TIME CLOCK TIME (AT,XT286,PS)