Lenovo ThinkPad 600 Technical Reference Manual for the ThinkPad 600 - Page 135
Checksum is OK?, Restore Direction flags
View all Lenovo ThinkPad 600 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 135 highlights
@@: ; mov Find Smapi Head dx, BIOS_SEG ; pushf cld mov xor movzx @@: lodsb add loop Calculate Checksum.. next. ; Save direction flag ; Clear it si, bx ax, ax cx,byte ptr ds:[bx].@SMBHDR_LEN ah, al @b popf cmp cmc ah, 1 ; Restore Direction flags ; Checksum is OK? FindSmapiFin: pop ds pop si pop cx pop eax ret FindSmapi Endp SMAPI BIOS B-59
@@:
;
Find Smapi Head
mov
dx, BIOS_SEG
;
Calculate Checksum.. next.
pushf
; Save direction flag
cld
; Clear it
mov
si, bx
xor
ax, ax
movzx
cx,byte ptr ds:[bx].@SMBHDR_LEN
@@:
lodsb
add
ah, al
loop
@b
popf
; Restore Direction flags
cmp
ah, 1
; Checksum is OK?
cmc
FindSmapiFin:
pop
ds
pop
si
pop
cx
pop
eax
ret
FindSmapi
Endp
SMAPI BIOS
B-59