Keyboard Driver Started/Hex output added
- Added writehexex/writehexlnex/writehexln/writehex - Started work on the keyboard driver, polling PS2 line for keystate. git-svn-id: https://spexeah.com:8443/svn/Asuro@16 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
31
src/keyboard.pas
Normal file
31
src/keyboard.pas
Normal file
@ -0,0 +1,31 @@
|
||||
unit keyboard;
|
||||
|
||||
{$ASMMODE intel}
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
util;
|
||||
|
||||
function get_scancode() : byte;
|
||||
|
||||
implementation
|
||||
|
||||
function get_scancode() : byte; [public, alias: 'get_scancode'];
|
||||
var
|
||||
c : byte;
|
||||
|
||||
begin
|
||||
c:= 0;
|
||||
while true do begin
|
||||
if inb($60) <> c then begin
|
||||
c:= inb($60);
|
||||
if c > 0 then begin
|
||||
get_scancode:= c;
|
||||
exit;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
Reference in New Issue
Block a user