git-svn-id: https://spexeah.com:8443/svn/Asuro@642 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c
This commit is contained in:
1 parent
8b7a8182b8
commit
6d8717a7fc
17 files changed
+129
-73
No files matched your search
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.
Binary file not shown.
+95
-52
File diff suppressed because it is too large.
Load diff
@@ -3,11 +3,11 @@ unit asuro;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
const
|
const
|
||||||
VERSION = '1.0.0-632a';
|
VERSION = '1.0.0-634a';
|
||||||
VERSION_MAJOR = '1';
|
VERSION_MAJOR = '1';
|
||||||
VERSION_MINOR = '0';
|
VERSION_MINOR = '0';
|
||||||
VERSION_SUB = '0';
|
VERSION_SUB = '0';
|
||||||
REVISION = '632';
|
REVISION = '634';
|
||||||
RELEASE = 'a';
|
RELEASE = 'a';
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|||||||
+7
-8
@@ -208,19 +208,18 @@ begin
|
|||||||
console.setdefaultattribute(console.combinecolors($17E0, $0000));
|
console.setdefaultattribute(console.combinecolors($17E0, $0000));
|
||||||
console.writestringln('Asuro Booted Correctly!');
|
console.writestringln('Asuro Booted Correctly!');
|
||||||
console.setdefaultattribute(console.combinecolors($FFFF, $0000));
|
console.setdefaultattribute(console.combinecolors($FFFF, $0000));
|
||||||
console.writestringln('');
|
//console.writestringln('');
|
||||||
console.writestringln('Press any key to boot in to Asuro Terminal...');
|
//console.writestringln('Press any key to boot in to Asuro Terminal...');
|
||||||
tracer.pop_trace;
|
//tracer.pop_trace;
|
||||||
|
|
||||||
{ Init Progs }
|
{ Init Progs }
|
||||||
shell.init();
|
shell.init();
|
||||||
memview.init();
|
memview.init();
|
||||||
|
|
||||||
console.writehexln(uint32(multibootinfo^.framebuffer_addr));
|
//console.writehexln(uint32(multibootinfo^.framebuffer_addr));
|
||||||
|
//tracer.push_trace('kmain.KEYHOOK');
|
||||||
tracer.push_trace('kmain.KEYHOOK');
|
//keyboard.hook(@temphook);
|
||||||
keyboard.hook(@temphook);
|
//tracer.pop_trace;
|
||||||
tracer.pop_trace;
|
|
||||||
|
|
||||||
tracer.push_trace('kmain.END');
|
tracer.push_trace('kmain.END');
|
||||||
|
|
||||||
|
|||||||
+13
-1
@@ -3,7 +3,7 @@ unit shell;
|
|||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Console, RTC;
|
Console, RTC, terminal;
|
||||||
|
|
||||||
procedure init();
|
procedure init();
|
||||||
|
|
||||||
@@ -49,6 +49,17 @@ begin
|
|||||||
writeIntExWND(DateTime.Seconds, Colors, Handle);
|
writeIntExWND(DateTime.Seconds, Colors, Handle);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure OnMouseClick(x : uint32; y : uint32; left : boolean);
|
||||||
|
begin
|
||||||
|
//WriteIntLn(x);
|
||||||
|
//WriteIntLn(y);
|
||||||
|
if left then begin
|
||||||
|
if (y = 0) and (x < 10) then begin
|
||||||
|
terminal.run;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure init();
|
procedure init();
|
||||||
begin
|
begin
|
||||||
colors:= console.combinecolors($0000, $FFFF);
|
colors:= console.combinecolors($0000, $FFFF);
|
||||||
@@ -58,6 +69,7 @@ begin
|
|||||||
//console.clearWNDEx(Handle, colors);
|
//console.clearWNDEx(Handle, colors);
|
||||||
console.setShellWindow(Handle, false);
|
console.setShellWindow(Handle, false);
|
||||||
console.registerEventHandler(Handle, EVENT_DRAW, void(@Draw));
|
console.registerEventHandler(Handle, EVENT_DRAW, void(@Draw));
|
||||||
|
console.registerEventHandler(Handle, EVENT_MOUSE_CLICK, void(@OnMouseClick));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
+12
-10
@@ -65,7 +65,7 @@ uses
|
|||||||
RTC;
|
RTC;
|
||||||
|
|
||||||
var
|
var
|
||||||
TERMINAL_HWND : HWND = 1;
|
TERMINAL_HWND : HWND = 0;
|
||||||
|
|
||||||
function getTerminalHWND : uint32;
|
function getTerminalHWND : uint32;
|
||||||
begin
|
begin
|
||||||
@@ -340,6 +340,7 @@ end;
|
|||||||
|
|
||||||
procedure key_event(info : TKeyInfo);
|
procedure key_event(info : TKeyInfo);
|
||||||
begin
|
begin
|
||||||
|
if TERMINAL_HWND <> 0 then begin
|
||||||
if (info.key_code >= 32) and (info.key_code <= 126) then begin
|
if (info.key_code >= 32) and (info.key_code <= 126) then begin
|
||||||
if bIndex < 1024 then begin
|
if bIndex < 1024 then begin
|
||||||
buffer[bIndex]:= info.key_code;
|
buffer[bIndex]:= info.key_code;
|
||||||
@@ -357,6 +358,7 @@ begin
|
|||||||
if info.key_code = 13 then begin //return
|
if info.key_code = 13 then begin //return
|
||||||
process_command;
|
process_command;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure change_dir(Params : PParamList);
|
procedure change_dir(Params : PParamList);
|
||||||
@@ -366,11 +368,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ToggleWND1(Params : PParamList);
|
|
||||||
begin
|
|
||||||
console.toggleWNDVisible(1);
|
|
||||||
end;
|
|
||||||
|
|
||||||
procedure SendSerial(Params : PParamList);
|
procedure SendSerial(Params : PParamList);
|
||||||
var
|
var
|
||||||
success : boolean;
|
success : boolean;
|
||||||
@@ -409,22 +406,27 @@ begin
|
|||||||
registerCommand('TEST', @test, 'Command for testing.');
|
registerCommand('TEST', @test, 'Command for testing.');
|
||||||
registerCommand('CD', @change_dir, 'Change Directory test.');
|
registerCommand('CD', @change_dir, 'Change Directory test.');
|
||||||
registerCommand('PATTERN', @cockwomble, 'Print an animated pattern to the screen.');
|
registerCommand('PATTERN', @cockwomble, 'Print an animated pattern to the screen.');
|
||||||
registerCommand('TOGGLEWND1', @ToggleWND1, 'Toggle WND 1 Visibility.');
|
|
||||||
registerCommand('TIME', @printTime, 'Print the current time.');
|
registerCommand('TIME', @printTime, 'Print the current time.');
|
||||||
registerCommand('SERIAL', @SendSerial, 'Send ''helloworld'' through COM1.');
|
registerCommand('SERIAL', @SendSerial, 'Send ''helloworld'' through COM1.');
|
||||||
console.writestringln('TERMINAL: INIT END.');
|
console.writestringln('TERMINAL: INIT END.');
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure OnClose();
|
||||||
|
begin
|
||||||
|
TERMINAL_HWND:= 0;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure run;
|
procedure run;
|
||||||
begin
|
begin
|
||||||
|
if TERMINAL_HWND = 0 then begin
|
||||||
TERMINAL_HWND:= newWindow(20, 10, 90, 20, 'ASURO TERMINAL');
|
TERMINAL_HWND:= newWindow(20, 10, 90, 20, 'ASURO TERMINAL');
|
||||||
//newWindow(10, 10, 32, 32, 'MEMVIEW');
|
console.registerEventHandler(TERMINAL_HWND, EVENT_KEY_PRESSED, void(@key_event));
|
||||||
keyboard.hook(@key_event);
|
console.registerEventHandler(TERMINAL_HWND, EVENT_CLOSE, void(@OnClose));
|
||||||
console.clearWND(TERMINAL_HWND);
|
console.clearWND(TERMINAL_HWND);
|
||||||
console.writestringWND('Asuro#', TERMINAL_HWND);
|
console.writestringWND('Asuro#', TERMINAL_HWND);
|
||||||
console.writestringWND(Working_Directory, TERMINAL_HWND);
|
console.writestringWND(Working_Directory, TERMINAL_HWND);
|
||||||
console.writestringWND('> ', TERMINAL_HWND);
|
console.writestringWND('> ', TERMINAL_HWND);
|
||||||
console.setWNDVisible(TERMINAL_HWND, true);
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
end.
|
end.
|
||||||
Reference in new issue
Block a user