+ provided sysbeep for DOS targets

git-svn-id: trunk@47542 -
This commit is contained in:
Tomas Hajny 2020-11-24 00:25:20 +00:00
parent 63beb1e83a
commit 8038b711a5
3 changed files with 34 additions and 0 deletions

View File

@ -47,6 +47,7 @@ implementation
{$DEFINE FPC_FEXPAND_UNC} (* UNC paths are supported *)
{$DEFINE FPC_FEXPAND_DRIVES} (* Full paths begin with drive specification *)
{$DEFINE HAS_LOCALTIMEZONEOFFSET}
{ Include platform independent implementation part }
{$i sysutils.inc}
@ -644,6 +645,8 @@ end;
Time Functions
****************************************************************************}
{$I tzenv.inc}
Procedure GetLocalTime(var SystemTime: TSystemTime);
var
Regs: Registers;
@ -667,8 +670,16 @@ end ;
Misc Functions
****************************************************************************}
const
BeepChars: array [1..2] of char = #7'$';
procedure sysBeep;
var
Regs: Registers;
begin
Regs.dx := Ofs (BeepChars);
Regs.ah := 9;
MsDos (Regs);
end;
@ -916,6 +927,7 @@ end;
Initialization
InitExceptions; { Initialize exceptions. OS independent }
InitInternational; { Initialize internationalization settings }
InitTZ;
OnBeep:=@SysBeep;
Finalization
FreeTerminateProcs;

View File

@ -629,6 +629,8 @@ end;
Time Functions
****************************************************************************}
{$I tzenv.inc}
Procedure GetLocalTime(var SystemTime: TSystemTime);
var
Regs: Registers;
@ -652,8 +654,16 @@ end ;
Misc Functions
****************************************************************************}
const
BeepChars: array [1..2] of char = #7'$';
procedure sysBeep;
var
Regs: Registers;
begin
Regs.dx := Ofs (BeepChars);
Regs.ah := 9;
MsDos (Regs);
end;

View File

@ -658,6 +658,17 @@ end ;
Misc Functions
****************************************************************************}
const
BeepChars: array [1..2] of char = #7'$';
procedure sysBeep;
var
Regs: Registers;
begin
Regs.dx := Ofs (BeepChars);
Regs.ah := 9;
MsDos (Regs);
end;
{****************************************************************************
Locale Functions
@ -902,6 +913,7 @@ Initialization
InitExceptions; { Initialize exceptions. OS independent }
InitInternational; { Initialize internationalization settings }
InitDelay;
OnBeep:=@SysBeep;
Finalization
FreeTerminateProcs;
DoneExceptions;