IBM 560E Laptop User Manual


 
BOOLEAN GetSmapiEntry(PSMB pFunc)
{
PFSMB_HEADER_REAL MyPtr = xF ;
WORD cnt =  ;
BYTE cksum =  ;
//
// 1) Search for signature first
//
while((cnt++ < x1) &&
!(((MyPtr->SMBHDR_SIG)[] == '$') &&
((MyPtr->SMBHDR_SIG)[1] == 'S') &&
((MyPtr->SMBHDR_SIG)[2] == 'M') &&
((MyPtr->SMBHDR_SIG)[3] == 'B') )) {
MyPtr++ ;
}
//
// 2) Find the Signature?
//
if (cnt >= x1) {
// We cannot find it.
return FALSE ;
} else {
//
// 3) Calculate Checksum
//
for (cnt =  ; cnt < MyPtr->SMBHDR_LEN ; cnt++)
cksum += (BYTE)((MyPtr->SMBHDR_SIG)[cnt]) ;
if (cksum) {
// Bad Checksum
return FALSE ;
} else {
// Build Return Address
(ᑍpFunc) = ( (DWORD)(MyPtr->SMBHDR_R_OFFSET) +
(((DWORD)(MyPtr->SMBHDR_R_SEGMENT)) << 16) ) ;
return TRUE ;
}
}
}
ThinkPad 560/560E SMAPI BIOS A-61