Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I need a program to ckeck BIOS for a certain string

Status
Not open for further replies.

mahobest

Programmer
Feb 6, 2002
4
TR
Hi,

I’m trying to write an .exe file in C/C++ that will search BIOS (In fact memory locations between f000:0000 and f000:ffff) for a strind I specified (that is: “mybiosstring0123”). And if it finds the string, it will call pkunzip and unzip a zipped file. If it doesn’t find the string it will display an error message. I need the source codes of such a program. I used DMIFLASH and placed my string into the BIOS. And I can read it by using debug under DOS.

Thanks.
 
int flag=0;
far char *p = 0xf0000;
char a[15]; //the length of ur string
while(p<=0xfffff)
{
for(i=0;i<15;i++)
{
a = *(p+i);
}
if(!strcmp(a,&quot;mybiosstring0123&quot;))
{
flag=1;
break;
}
p++;
}

if(flag) {do the code to unzip}
else {error message}

i havent checked the code but it should work. the far pointer points to the initial location, loops until it reaches the end location. everytime, a number of bytes equal to the length of ur string are read, compared with ur string. if it matches, a flag is set.

luv
Karthik.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top