Реферат: Разработка игровой программы на языке программирования Turbo Pascal
Procedure DoneButtons;
Function ButtonsInited:Boolean;
Function IsKeypressed:Boolean;
Function Pressed(Index:Byte):Boolean;
Procedure ClearKeys;
IMPLEMENTATION
Const
Init:Boolean=FALSE;
Var
OldKbdHandler:Pointer;
Procedure Int9; INTERRUPT;
Var
ScanCode,Tmp:Byte;
begin
ScanCode:=Port[$60];
if ScanCode and 128=0 then
begin
Key[ScanCode]:=TRUE;
KeyPressed:=TRUE;
end else
begin
ScanCode:=ScanCode xor 128;
Key[ScanCode]:=FALSE;
WasPressed[ScanCode]:=TRUE;
KeyPressed:=FALSE;
end;
if CheckWarmReboot and (ScanCode=keyDelete) then
begin
Tmp:=Mem[Seg0040:$0017];