git-svn-id: https://spexeah.com:8443/svn/Asuro@504 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -12,6 +12,7 @@ unit mouse;
|
||||
interface
|
||||
|
||||
uses
|
||||
tracer,
|
||||
console,
|
||||
util,
|
||||
isr44,
|
||||
@@ -44,6 +45,7 @@ var
|
||||
r : pchar;
|
||||
|
||||
begin
|
||||
push_trace('mouse.callback');
|
||||
packet:= PMousePacket(kalloc(sizeof(TMousePacket)));
|
||||
f:= (uint32(raw) AND $FF000000) SHR 24;
|
||||
x:= (uint32(raw) AND $00FF0000) SHR 16;
|
||||
@@ -102,13 +104,16 @@ begin
|
||||
kfree(void(packet));
|
||||
//console.writestring('Mouse Packet: ');
|
||||
//console.writehexln(DWORD(raw));
|
||||
pop_trace;
|
||||
end;
|
||||
|
||||
function load(ptr : void) : boolean;
|
||||
begin
|
||||
push_trace('mouse.load');
|
||||
isr44.hook(uint32(@callback));
|
||||
console.outputln('PS/2 MOUSE', 'LOADED.');
|
||||
load:= true;
|
||||
pop_trace;
|
||||
end;
|
||||
|
||||
procedure init();
|
||||
@@ -116,6 +121,7 @@ var
|
||||
devid : TDeviceIdentifier;
|
||||
|
||||
begin
|
||||
push_trace('mouse.init');
|
||||
console.outputln('PS/2 MOUSE', 'INIT BEGIN.');
|
||||
devid.bus:= biUnknown;
|
||||
devid.id0:= 0;
|
||||
@@ -126,6 +132,7 @@ begin
|
||||
devid.ex:= nil;
|
||||
drivermanagement.register_driver_ex('PS/2 Mouse', @devid, @load, true);
|
||||
console.outputln('PS/2 MOUSE', 'INIT END.');
|
||||
pop_trace;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -49,6 +49,7 @@ procedure register();
|
||||
begin
|
||||
memset(uint32(@Hooks[0]), 0, sizeof(pp_hook_method)*MAX_HOOKS);
|
||||
IDT.set_gate(33, uint32(@Main), $08, ISR_RING_0);
|
||||
inb($60);
|
||||
end;
|
||||
|
||||
procedure hook(hook_method : uint32);
|
||||
|
||||
+43
-9
File diff suppressed because it is too large
Load Diff
+4
-1
@@ -40,7 +40,8 @@ uses
|
||||
storagemanagement,
|
||||
lists,
|
||||
net,
|
||||
fat32;
|
||||
fat32,
|
||||
isrmanager;
|
||||
|
||||
procedure kmain(mbinfo: Pmultiboot_info_t; mbmagic: uint32); stdcall;
|
||||
|
||||
@@ -140,6 +141,7 @@ begin
|
||||
{ Memory/CPU Init }
|
||||
idt.init();
|
||||
isr.init();
|
||||
//isrmanager.init();
|
||||
irq.init();
|
||||
pmemorymanager.init();
|
||||
vmemorymanager.init();
|
||||
@@ -194,6 +196,7 @@ begin
|
||||
console.setdefaultattribute(console.combinecolors(Green, Black));
|
||||
console.writestringln('Asuro Booted Correctly!');
|
||||
console.setdefaultattribute(console.combinecolors(White, Black));
|
||||
if INTE then console.writestringln('Interrupts are enabled.') else console.writestringln('Interrupts are disabled.');
|
||||
console.writestringln('');
|
||||
console.writestringln('Press any key to boot in to Asuro Terminal...');
|
||||
tracer.pop_trace;
|
||||
|
||||
Reference in New Issue
Block a user