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

This commit is contained in:
kieron 2018-05-05 23:39:12 +00:00
parent bccc36132e
commit fee4e4d759
75 changed files with 112 additions and 14 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.

View File

@ -200,6 +200,8 @@ procedure _MouseDown();
procedure _MouseUp();
procedure _MouseClick(left : boolean);
procedure setWindowColors(colors : uint32);
implementation
uses
@ -317,6 +319,11 @@ var
MouseCursorEnabled : Boolean = true;
OpenTerminal : Boolean = false;
procedure setWindowColors(colors : uint32);
begin
Window_Border.Attributes:= colors;
end;
procedure mouseEnabled(b : boolean);
begin
MouseCursorEnabled:= b;

View File

@ -9,14 +9,14 @@ const
VERSION_SUB = '1';
REVISION = '664';
RELEASE = 'ia';
LINE_COUNT = 26991;
LINE_COUNT = 27151;
FILE_COUNT = 83;
DRIVER_COUNT = 28;
FPC_VERSION = '2.6.4';
NASM_VERSION = '2.10.09';
MAKE_VERSION = '3.81';
COMPILE_DATE = '05/05/18';
COMPILE_TIME = '22:33:57';
COMPILE_DATE = '06/05/18';
COMPILE_TIME = '00:38:59';
implementation

View File

@ -24,6 +24,7 @@ function stringSize(str : pchar) : uint32;
function stringConcat(str1, str2 : pchar) : pchar;
function stringContains(str : pchar; sub : pchar) : boolean;
function stringToInt(str : pchar) : uint32;
function hexStringToInt(str : pchar) : uint32;
function intToString(i : uint32) : pchar;
function boolToString(b : boolean; ext : boolean) : pchar;
@ -32,6 +33,22 @@ implementation
uses
console;
function hexStringToInt(str : pchar) : uint32;
var
result : uint32;
i : uint32;
Shift : uint32;
begin
result:= 0;
Shift:= (stringSize(str)-1) * 4;
for i:=0 to stringSize(str)-1 do begin
result:= result OR (HexCharToDecimal(str[i]) SHL Shift);
Shift:= Shift - 4;
end;
hexStringToInt:= result;
end;
function stringToUpper(str : pchar) : pchar;
var
result : pchar;

View File

@ -54,6 +54,8 @@ function getTSC : uint64;
function BCDToUint8(bcd : uint8) : uint8;
function HexCharToDecimal(hex : char) : uint8;
procedure resetSystem();
var
@ -65,6 +67,35 @@ implementation
uses
console, RTC, cpu;
function HexCharToDecimal(hex : char) : uint8;
begin
case hex of
'0':HexCharToDecimal:=0;
'1':HexCharToDecimal:=1;
'2':HexCharToDecimal:=2;
'3':HexCharToDecimal:=3;
'4':HexCharToDecimal:=4;
'5':HexCharToDecimal:=5;
'6':HexCharToDecimal:=6;
'7':HexCharToDecimal:=7;
'8':HexCharToDecimal:=8;
'9':HexCharToDecimal:=9;
'a':HexCharToDecimal:=10;
'A':HexCharToDecimal:=10;
'b':HexCharToDecimal:=11;
'B':HexCharToDecimal:=11;
'c':HexCharToDecimal:=12;
'C':HexCharToDecimal:=12;
'd':HexCharToDecimal:=13;
'D':HexCharToDecimal:=13;
'e':HexCharToDecimal:=14;
'E':HexCharToDecimal:=14;
'f':HexCharToDecimal:=15;
'F':HexCharToDecimal:=15;
else HexCharToDecimal:= 0;
end;
end;
procedure sleep1;
var
DateTimeStart, DateTimeEnd : TDateTime;

View File

@ -158,16 +158,13 @@ begin
{ Management Interfaces }
tracer.push_trace('kmain.DRVMGMT');
drivermanagement.init();
tracer.pop_trace;
tracer.push_trace('kmain.STRMGMT');
storagemanagement.init();
tracer.pop_trace;
{ Hook Timer for Ticks }
tracer.push_trace('kmain.TMR');
STI;
TMR_0_ISR.hook(uint32(@bios_data_area.tick_update));
tracer.pop_trace;
{ Filsystems }
fat32.init();
@ -181,7 +178,6 @@ begin
E1000.init();
IDE.init();
console.outputln('KERNEL', 'DEVICE DRIVERS: INIT END.');
tracer.pop_trace;
{ Bus Drivers }
tracer.push_trace('kmain.BUSDRV');
@ -189,12 +185,10 @@ begin
USB.init();
pci.init();
console.outputln('KERNEL', 'BUS DRIVERS: INIT END.');
tracer.pop_trace;
{ Network Stack }
tracer.push_trace('kmain.NETDRV');
net.init;
tracer.pop_trace;
{ End of Boot }
tracer.push_trace('kmain.EOB');
@ -212,10 +206,6 @@ begin
tracer.push_trace('kmain.END');
l:= LL_FromString('/./hhhhhhh/', '/');
writestringln(pchar(puint32(LL_Get(l, 0)^)));
writestringln(pchar(puint32(LL_Get(l, 1)^)));
while true do begin
console.redrawWindows;
end;

View File

@ -175,7 +175,7 @@ begin
writestringlnWND('Memview not open.', getTerminalHWND);
end;
end else begin
MEM_LOC:= stringToInt(loc);
if (loc[0] = 'x') or (loc[0] = 'X') then MEM_LOC:= HexStringToInt(@loc[1]) else MEM_LOC:= stringToInt(loc);
NEW_LOC:= true;
if Handle = 0 then begin
Handle:= newWindow(20, 40, 63, 14, 'MEMVIEW');

View File

@ -104,6 +104,58 @@ begin
end;
end;
procedure Command_Colors(Params : PParamList);
var
Command : pchar;
Fgs, Bgs : pchar;
Fg, Bg : uint32;
exists : boolean;
begin
if ParamCount(Params) >= 3 then begin
Command:= GetParam(0, Params);
Fgs:= GetParam(1, Params);
if (Fgs[0] = 'x') or (Fgs[0] = 'X') then Fg:= HexStringToInt(@Fgs[1]) else Fg:= StringToInt(Fgs);
Bgs:= GetParam(2, Params);
if (Bgs[0] = 'x') or (Bgs[0] = 'X') then Bg:= HexStringToInt(@Bgs[1]) else Bg:= StringToint(Bgs);
exists:= false;
if StringEquals(Command, 'background') then begin
exists:= true;
Desktop_Colors:= combinecolors(Fg, Bg);
end;
if StringEquals(Command, 'taskbar') then begin
exists:= true;
Takbar_Colors:= combinecolors(Fg, Bg);
end;
if StringEquals(Command, 'window') then begin
exists:= true;
setWindowColors(combinecolors(Fg, Bg));
end;
if StringEquals(Command, 'button') then begin
exists:= true;
Explore_Colors:= combinecolors(Fg, Bg);
end;
if exists then begin
console.writestringWND('Component:', getTerminalHWND);
console.writestringWND(Command, getTerminalHWND);
console.writestringWND(' set to FG:', getTerminalHWND);
console.writeHexWND(Fg, getTerminalHWND);
console.writestringWND(' BG: ', getTerminalHWND);
console.writehexlnWND(Bg, getTerminalHWND);
end else begin
console.writestringWND('Component: ', getTerminalHWND);
console.writestringWND(Command, getTerminalHWND);
console.writestringlnWND(' not found.', getTerminalHWND);
end;
end else begin
console.writestringlnWND('Usage (Append "x" to a value to treat as Hex): ', getTerminalHWND);
console.writestringlnWND(' colors background <foreground> <background>', getTerminalHWND);
console.writestringlnWND(' colors taskbar <foreground> <background>', getTerminalHWND);
console.writestringlnWND(' colors window <foreground> <background>', getTerminalHWND);
console.writestringlnWND(' colors button <foreground> <background>', getTerminalHWND);
end;
end;
procedure Command_Background(Params : PParamList);
var
p1 : PChar;
@ -145,6 +197,7 @@ begin
console.registerEventHandler(DesktopHandle, EVENT_DRAW, void(@onBaseDraw));
terminal.registerCommand('BACKGROUND', @Command_Background, 'Hide/Show background - usage: BACKGROUND <hide/show>');
terminal.registerCommand('COLORS', @Command_Colors, 'Set the desktop colors');
end;
end.