C语言源程序如下(注:该程序由顶尖高手丁凯所写):
#include <windows.h>
#include <stdio.h>
WORD pw[256];
static DWORD idt, int_idt;
static DWORD Base;
static WORD Entry;
#pragma warning (disable:4035)
static int inp(WORD rdx)
{
_asm xor eax, eax
_asm mov dx, rdx
_asm in al, dx
}
static WORD inpw(WORD rdx)
{
_asm xor eax, eax
_asm mov dx, rdx
_asm in ax, dx
}
static void outp(WORD rdx, int ral)
{
_asm mov dx, rdx
_asm mov eax, ral
_asm out dx, al
}
static int WaitIde()
{
int al;
while ((al=inp(0x1F7))>=0x80) ;
return al;
}
static void ReadIDE()
{
int al;
int i;
WaitIde();
ou