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 ;
}
}
}
SMAPI BIOS
B-61
Содержание ThinkPad 770
Страница 1: ...05L1739 S05L 1739 00...
Страница 6: ...vi...
Страница 10: ...x Preface...
Страница 133: ...Function Declaration C Language Smapi BIOS function typedef WORD far SMB FPINPARM FPOUTPARM SMAPI BIOS B 57...
Страница 148: ...IBM Part Number 05L1739 Printed in the United States of America...