-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCKLAN.PAS
57 lines (51 loc) · 1.07 KB
/
CKLAN.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
54
55
56
57
{ @author: Sylvain Maltais ([email protected])
@created: 2023
@website(https://www.gladir.com/corail)
@abstract(Target: Turbo Pascal 7, Free Pascal 3.2)
}
Program CKLAN;
Uses DOS;
Function NetworkExist:Boolean;
Var
Regs:Registers;
Begin
Regs.AX:=$B800;
Intr($2F,Regs);
NetworkExist:=Regs.AL<>0;
End;
Function GetNetBIOSMachineNumber:Byte;
Var
Regs:Registers;
Begin
Regs.AX:=$B807;
Regs.CX:=0;
Intr($2F,Regs);
GetNetBIOSMachineNumber:=Regs.CH;
End;
Function GetLanVersion:Word;
Var
Regs:Registers;
Begin
Regs.AX:=$B809;
Intr($2F,Regs);
GetLanVersion:=Regs.AX;
End;
BEGIN
If(ParamStr(1)='/?')or(ParamStr(1)='--help')or(ParamStr(1)='-h')Then Begin
WriteLn('CKLAN : Cette commande permet de v‚rifier la pr‚sence d''un ',
'r‚seau LAN.');
WriteLn;
WriteLn('Syntaxe : CKLAN [/?]');
End
Else
Begin
Write('R‚seau LAN install‚ : ');
If(NetworkExist)Then Begin
WriteLn('Oui');
WriteLn('LAN Version ',Lo(GetLanVersion),'.',Hi(GetLanVersion));
WriteLn('Num‚ro de machine: ',GetNetBIOSMachineNumber);
End
Else
WriteLn('Non');
End;
END.