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
const
VERSION = '1.0.0-596a';
VERSION = '1.0.0-599a';
VERSION_MAJOR = '1';
VERSION_MINOR = '0';
VERSION_SUB = '0';
REVISION = '596';
REVISION = '599';
RELEASE = 'a';
implementation

View File

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

View File

@ -372,7 +372,7 @@ begin
if trace <> nil then begin
console.writestring('[-0] ');
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);
if trace <> nil then begin
console.writestring(' [');

View File

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