Program test system: Win98
Compilation Tool: TurboC2
The following is the source code of cmospass: cmospass.c
Code:
-------------------------------------------------- ------------------------------
#include
#include
#include
void main ()
{
Int n;
CHAR Comspass;
CHAR TEMP = 0;
Printf ("/ NTHIS Program Only Is Tested At Win98 and Award Bios !! / N");
Printf ("The Password of The CMOS:");
OUTPORTB (0x70, 0x1d);
COMSPASS = Inportb (0x71);
For (n = 6; n> = 0; n- = 2)
{TEMP = CMOSPASS;
TEMP >> = N;
TEMP = TEMP & 0x03;
Printf ("% D", TEMP);
}
OUTPORTB (0x70, 0x1c);
Result = inportb (0x71);
For (n = 6; n> = 0; n- = 2)
{TEMP = CMOSPASS;
TEMP >> = N;
TEMP = TEMP & 0x03;
Printf ("% D", TEMP);
}
Printf ("/ n - by red");
Printf ("/N--Http://red123. ocp.net !!");
Printf ("/ n ---- 2004.01.04 ---- / n");
}