回 帖 发 新 帖 刷新版面

主题:写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);

回复列表 (共2个回复)

沙发

这种程序怎么调啊?
弄坏了CMOS不是死了!

板凳

没有用的,这不是486时代了,现在的主板上cmos不能这样写。

我来回复

您尚未登录,请登录后再回复。点此登录或注册