主题:写cmos
#include "dos.h"
#include "stdio.h"
#include "bios.h"
unsigned char buf[128];
FILE *fp;
void writecmos()
{
int i;
for(i=0;i<128;i++)
{
outportb(0x70,i);
outportb(0x71,buf[i]);
}
}
main()
{
auto union REGS a;
int temp;
fp=fopen("li.dat","rb");
fread(buf,128,1,fp);
fclose(fp);
writecmos();
printf(" The computer is well now! press any key to reset!\n");
printf(" This program is copyright by bloodwolf.\n");
printf(" E_mail to: bloodwolf@371.net\n");
getch();
int86(0x19,&a,&a);
}
#include "stdio.h"
#include "bios.h"
unsigned char buf[128];
FILE *fp;
void writecmos()
{
int i;
for(i=0;i<128;i++)
{
outportb(0x70,i);
outportb(0x71,buf[i]);
}
}
main()
{
auto union REGS a;
int temp;
fp=fopen("li.dat","rb");
fread(buf,128,1,fp);
fclose(fp);
writecmos();
printf(" The computer is well now! press any key to reset!\n");
printf(" This program is copyright by bloodwolf.\n");
printf(" E_mail to: bloodwolf@371.net\n");
getch();
int86(0x19,&a,&a);
}