-
Notifications
You must be signed in to change notification settings - Fork 0
/
ASUSBIOS.PAS
53 lines (44 loc) · 1011 Bytes
/
ASUSBIOS.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
unit AsusBios; { Unit to use Asus flash interface when exists } {v1.39}
interface
function AsusCheckFor: Boolean;
procedure AsusEnable;
procedure AsusDisable;
implementation
uses Tools;
const Sign: array[1..10] of Char='ASUS_FLASH';
type AsusBIOSHook=record
Sign: array[1..16] of Char;
X: Word; {???}
Disable: Procedure;
Len: Word;
Enable: Procedure;
end;
var Hook: ^AsusBIOSHook;
function AsusCheckFor: Boolean;
var A: Word;
type Array10= array[1..10] of Char;
begin
AsusCheckFor:=False;
{search for signature in $F000 segment}
for A:=$0 to $FFFF-SizeOf(Sign) do
begin
Hook:=Ptr($F000, A);
if Copy(Hook^.Sign, 1, Length(Sign))=Sign then
begin
AsusCheckFor:=True;
Break;
end;
end;
end;
procedure AsusEnable;
begin
Hook^.Enable;
LogWrite('Asus flash interface - flash enable');
end;
procedure AsusDisable;
begin
Hook^.Disable;
LogWrite('Asus flash interface - flash disable');
end;
{begin}
end.