git-svn-id: https://spexeah.com:8443/svn/Asuro@600 6dbc8c32-bb84-406f-8558-d1cf31a0ab0c

This commit is contained in:
kieron 2018-04-29 18:46:23 +00:00
parent d398a934d4
commit d986b7e224
75 changed files with 28 additions and 27 deletions

BIN
Asuro.iso

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.

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.

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.

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.

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.

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.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -3,11 +3,11 @@ unit asuro;
interface interface
const const
VERSION = '1.0.0-596a'; VERSION = '1.0.0-599a';
VERSION_MAJOR = '1'; VERSION_MAJOR = '1';
VERSION_MINOR = '0'; VERSION_MINOR = '0';
VERSION_SUB = '0'; VERSION_SUB = '0';
REVISION = '596'; REVISION = '599';
RELEASE = 'a'; RELEASE = 'a';
implementation implementation

View File

@ -14,9 +14,10 @@ interface
const const
KERNEL_VIRTUAL_BASE = $C0000000; KERNEL_VIRTUAL_BASE = $C0000000;
KERNEL_PAGE_NUMBER = KERNEL_VIRTUAL_BASE SHR 22; KERNEL_PAGE_NUMBER = KERNEL_VIRTUAL_BASE SHR 22;
BSOD_ENABLE = false; BSOD_ENABLE = true;
TRACER_ENABLE = true; TRACER_ENABLE = true;
CONSOLE_SLOW_REDRAW = false; //Redraws the Window manager after every character, but slows performance. CONSOLE_SLOW_REDRAW = false; //Redraws the Window manager after every character, but slows performance.
TRACE_TO_SERIAL = true;
type type
//internal types //internal types

View File

@ -372,7 +372,7 @@ begin
if trace <> nil then begin if trace <> nil then begin
console.writestring('[-0] '); console.writestring('[-0] ');
console.writestringln(trace); console.writestringln(trace);
for i:=1 to 6 do begin for i:=1 to tracer.get_trace_count-1 do begin
trace:= tracer.get_trace_N(i); trace:= tracer.get_trace_N(i);
if trace <> nil then begin if trace <> nil then begin
console.writestring(' ['); console.writestring(' [');

View File

@ -13,12 +13,17 @@ function get_trace_N(idx : uint32) : pchar;
implementation implementation
uses uses
console, util, lists, strings; console, util, lists, strings, serial;
const
MAX_TRACE = 40;
SERIALID = '[TRACER] ';
var var
t_ready : Boolean; t_ready : Boolean;
Locked : Boolean; Locked : Boolean;
TraceStack : PLinkedListBase; TraceStack : PLinkedListBase;
Traces : Array[0..MAX_TRACE-1] of PChar;
procedure freeze; procedure freeze;
begin begin
@ -27,16 +32,24 @@ end;
procedure push_trace(t_name : pchar); procedure push_trace(t_name : pchar);
var var
mem : void; i : uint32;
begin begin
if TRACER_ENABLE then begin if TRACER_ENABLE then begin
if t_ready then begin if t_ready then begin
if not Locked then begin if not Locked then begin
Locked:= true; Locked:= true;
mem:= LL_Insert(TraceStack, 0); for i:=MAX_TRACE-1 downto 1 do begin
memset(uint32(mem), 0, StringSize(t_name) + 5); Traces[i]:= Traces[i-1];
memcpy(uint32(t_name), uint32(mem), StringSize(t_name) + 1); end;
Traces[0]:= StringCopy(t_name);
for i:=0 to StringSize(SERIALID)-1 do begin
serial.send(COM1, uint8(SERIALID[i]), 10);
end;
for i:=0 to StringSize(t_name)-1 do begin
serial.send(COM1, uint8(t_name[i]), 10);
end;
serial.send(COM1, 10, 10);
Locked:= false; Locked:= false;
end; end;
end; end;
@ -45,31 +58,17 @@ end;
procedure pop_trace; procedure pop_trace;
begin begin
if TRACER_ENABLE then begin
if t_ready then begin
if not Locked then begin
Locked:= true;
LL_Delete(TraceStack, 0);
Locked:= false;
end;
end;
end;
end; end;
function get_last_trace : pchar; function get_last_trace : pchar;
begin begin
get_last_trace:= nil; get_last_trace:= Traces[0];
if TRACER_ENABLE then begin
if t_ready then begin
get_last_trace:= pchar(LL_Get(TraceStack, 0));
end;
end;
end; end;
procedure init; procedure init;
begin begin
if TRACER_ENABLE then begin if TRACER_ENABLE then begin
TraceStack:= LL_New(255);
t_ready:= true; t_ready:= true;
push_trace('kmain'); push_trace('kmain');
end; end;
@ -78,14 +77,15 @@ end;
function get_trace_count : uint32; function get_trace_count : uint32;
begin begin
if TRACER_ENABLE then begin if TRACER_ENABLE then begin
get_trace_count:= LL_Size(TraceStack); get_trace_count:= MAX_TRACE;
end; end;
end; end;
function get_trace_N(idx : uint32) : pchar; function get_trace_N(idx : uint32) : pchar;
begin begin
if idx > MAX_TRACE-1 then exit;
if TRACER_ENABLE then begin if TRACER_ENABLE then begin
get_trace_N:= pchar(LL_Get(TraceStack, idx)); get_trace_N:= traces[idx];
end; end;
end; end;