diff --git a/Asuro.iso b/Asuro.iso index 862dac85..1cb73a84 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/bin/kernel.bin b/bin/kernel.bin index 66f7dd13..f2985698 100755 Binary files a/bin/kernel.bin and b/bin/kernel.bin differ diff --git a/iso/boot/asuro.bin b/iso/boot/asuro.bin index 8976e909..f2985698 100755 Binary files a/iso/boot/asuro.bin and b/iso/boot/asuro.bin differ diff --git a/lib/ACE.ppu b/lib/ACE.ppu index 73cf64ce..cdc97521 100644 Binary files a/lib/ACE.ppu and b/lib/ACE.ppu differ diff --git a/lib/BPE.ppu b/lib/BPE.ppu index 2a28094c..69346039 100644 Binary files a/lib/BPE.ppu and b/lib/BPE.ppu differ diff --git a/lib/BTSSE.ppu b/lib/BTSSE.ppu index eab772ab..fe0a3ae5 100644 Binary files a/lib/BTSSE.ppu and b/lib/BTSSE.ppu differ diff --git a/lib/CFE.ppu b/lib/CFE.ppu index b6c810d7..5298f2e4 100644 Binary files a/lib/CFE.ppu and b/lib/CFE.ppu differ diff --git a/lib/CSOE.ppu b/lib/CSOE.ppu index 62d493bf..78fa17d5 100644 Binary files a/lib/CSOE.ppu and b/lib/CSOE.ppu differ diff --git a/lib/DBGE.ppu b/lib/DBGE.ppu index 256ff189..6e70a494 100644 Binary files a/lib/DBGE.ppu and b/lib/DBGE.ppu differ diff --git a/lib/DBZ.ppu b/lib/DBZ.ppu index 932384ff..de731b4c 100644 Binary files a/lib/DBZ.ppu and b/lib/DBZ.ppu differ diff --git a/lib/DFE.ppu b/lib/DFE.ppu index a3854553..10ff54be 100644 Binary files a/lib/DFE.ppu and b/lib/DFE.ppu differ diff --git a/lib/E1000.ppu b/lib/E1000.ppu index 6b98cd5f..b5c0a5b5 100644 Binary files a/lib/E1000.ppu and b/lib/E1000.ppu differ diff --git a/lib/GPF.ppu b/lib/GPF.ppu index ce893cae..063dc3c5 100644 Binary files a/lib/GPF.ppu and b/lib/GPF.ppu differ diff --git a/lib/IDE.ppu b/lib/IDE.ppu index 06775dd8..fe9e133f 100644 Binary files a/lib/IDE.ppu and b/lib/IDE.ppu differ diff --git a/lib/IDOE.ppu b/lib/IDOE.ppu index 22664683..c7cee895 100644 Binary files a/lib/IDOE.ppu and b/lib/IDOE.ppu differ diff --git a/lib/IOPE.ppu b/lib/IOPE.ppu index e1def09b..07b26afb 100644 Binary files a/lib/IOPE.ppu and b/lib/IOPE.ppu differ diff --git a/lib/MCE.ppu b/lib/MCE.ppu index 3bcb2e6a..28c45554 100644 Binary files a/lib/MCE.ppu and b/lib/MCE.ppu differ diff --git a/lib/NCE.ppu b/lib/NCE.ppu index e46833e8..d816f749 100644 Binary files a/lib/NCE.ppu and b/lib/NCE.ppu differ diff --git a/lib/NMIE.ppu b/lib/NMIE.ppu index bb016cf6..3d35c0d5 100644 Binary files a/lib/NMIE.ppu and b/lib/NMIE.ppu differ diff --git a/lib/OOBE.ppu b/lib/OOBE.ppu index e8869605..a702b73b 100644 Binary files a/lib/OOBE.ppu and b/lib/OOBE.ppu differ diff --git a/lib/PCI.ppu b/lib/PCI.ppu index 8fb8a2c8..86df5aba 100644 Binary files a/lib/PCI.ppu and b/lib/PCI.ppu differ diff --git a/lib/PF.ppu b/lib/PF.ppu index c5a8dcf6..6e7e92a3 100644 Binary files a/lib/PF.ppu and b/lib/PF.ppu differ diff --git a/lib/PS2_KEYBOARD_ISR.ppu b/lib/PS2_KEYBOARD_ISR.ppu index 3c7d56bc..bdbc8f41 100644 Binary files a/lib/PS2_KEYBOARD_ISR.ppu and b/lib/PS2_KEYBOARD_ISR.ppu differ diff --git a/lib/RTC.ppu b/lib/RTC.ppu index 9fa09ada..066e329e 100644 Binary files a/lib/RTC.ppu and b/lib/RTC.ppu differ diff --git a/lib/SFE.ppu b/lib/SFE.ppu index 6fe41aee..db5046e8 100644 Binary files a/lib/SFE.ppu and b/lib/SFE.ppu differ diff --git a/lib/SNPE.ppu b/lib/SNPE.ppu index a0738a60..88573b95 100644 Binary files a/lib/SNPE.ppu and b/lib/SNPE.ppu differ diff --git a/lib/TMR_0_ISR.ppu b/lib/TMR_0_ISR.ppu index f065448d..dc426b27 100644 Binary files a/lib/TMR_0_ISR.ppu and b/lib/TMR_0_ISR.ppu differ diff --git a/lib/UIE.ppu b/lib/UIE.ppu index fb2080ff..b43e066a 100644 Binary files a/lib/UIE.ppu and b/lib/UIE.ppu differ diff --git a/lib/USB.ppu b/lib/USB.ppu index 167a62b2..c7a76c2a 100644 Binary files a/lib/USB.ppu and b/lib/USB.ppu differ diff --git a/lib/arp.ppu b/lib/arp.ppu index 7e0c757b..b8a2ee89 100644 Binary files a/lib/arp.ppu and b/lib/arp.ppu differ diff --git a/lib/asuro.ppu b/lib/asuro.ppu index c310514a..a53676eb 100644 Binary files a/lib/asuro.ppu and b/lib/asuro.ppu differ diff --git a/lib/bios_data_area.ppu b/lib/bios_data_area.ppu index 4c1950d5..a07aa423 100644 Binary files a/lib/bios_data_area.ppu and b/lib/bios_data_area.ppu differ diff --git a/lib/console.o b/lib/console.o index 4e2e7014..5b4e8f7b 100644 Binary files a/lib/console.o and b/lib/console.o differ diff --git a/lib/console.ppu b/lib/console.ppu index 9bc8e290..0ce35125 100644 Binary files a/lib/console.ppu and b/lib/console.ppu differ diff --git a/lib/cpu.ppu b/lib/cpu.ppu index 065ff04a..50381c91 100644 Binary files a/lib/cpu.ppu and b/lib/cpu.ppu differ diff --git a/lib/drivermanagement.ppu b/lib/drivermanagement.ppu index 22aa6ee3..73407cde 100644 Binary files a/lib/drivermanagement.ppu and b/lib/drivermanagement.ppu differ diff --git a/lib/eth2.ppu b/lib/eth2.ppu index d941ff96..dfbf804f 100644 Binary files a/lib/eth2.ppu and b/lib/eth2.ppu differ diff --git a/lib/fat32.ppu b/lib/fat32.ppu index a59cf464..f4488f57 100644 Binary files a/lib/fat32.ppu and b/lib/fat32.ppu differ diff --git a/lib/gdt.ppu b/lib/gdt.ppu index 8bedb292..dce0ab4a 100644 Binary files a/lib/gdt.ppu and b/lib/gdt.ppu differ diff --git a/lib/idt.ppu b/lib/idt.ppu index b4c8fc1c..9ce122cb 100644 Binary files a/lib/idt.ppu and b/lib/idt.ppu differ diff --git a/lib/ipv4.ppu b/lib/ipv4.ppu index 6760e50a..5edafc1f 100644 Binary files a/lib/ipv4.ppu and b/lib/ipv4.ppu differ diff --git a/lib/irq.ppu b/lib/irq.ppu index 99d179e8..ce52e4e4 100644 Binary files a/lib/irq.ppu and b/lib/irq.ppu differ diff --git a/lib/isr.ppu b/lib/isr.ppu index d58a7e67..e3374640 100644 Binary files a/lib/isr.ppu and b/lib/isr.ppu differ diff --git a/lib/isrmanager.ppu b/lib/isrmanager.ppu index 0a1e4c8a..ee53c3e8 100644 Binary files a/lib/isrmanager.ppu and b/lib/isrmanager.ppu differ diff --git a/lib/kernel.ppu b/lib/kernel.ppu index 7940b4ea..d5c98047 100644 Binary files a/lib/kernel.ppu and b/lib/kernel.ppu differ diff --git a/lib/keyboard.ppu b/lib/keyboard.ppu index 3a4ca8a9..bdcb3013 100644 Binary files a/lib/keyboard.ppu and b/lib/keyboard.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index be3bae34..0dfd340e 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index d2c0ad20..a1ca542e 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index 7e2bd596..067e8fb5 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/lib/lists.ppu b/lib/lists.ppu index 7fe65f20..d1ed8b81 100644 Binary files a/lib/lists.ppu and b/lib/lists.ppu differ diff --git a/lib/lmemorymanager.ppu b/lib/lmemorymanager.ppu index a1d3085f..520bdc52 100644 Binary files a/lib/lmemorymanager.ppu and b/lib/lmemorymanager.ppu differ diff --git a/lib/memview.ppu b/lib/memview.ppu index 0d17b415..eb982757 100644 Binary files a/lib/memview.ppu and b/lib/memview.ppu differ diff --git a/lib/mouse.ppu b/lib/mouse.ppu index 8e2b6d49..e28e1e8f 100644 Binary files a/lib/mouse.ppu and b/lib/mouse.ppu differ diff --git a/lib/net.ppu b/lib/net.ppu index 8caeeee9..85f1ee2c 100644 Binary files a/lib/net.ppu and b/lib/net.ppu differ diff --git a/lib/netutils.ppu b/lib/netutils.ppu index ac99a0e3..1eae8529 100644 Binary files a/lib/netutils.ppu and b/lib/netutils.ppu differ diff --git a/lib/pmemorymanager.ppu b/lib/pmemorymanager.ppu index 2e15eb07..587aec0a 100644 Binary files a/lib/pmemorymanager.ppu and b/lib/pmemorymanager.ppu differ diff --git a/lib/scheduler.ppu b/lib/scheduler.ppu index 88d610f0..113e8121 100644 Binary files a/lib/scheduler.ppu and b/lib/scheduler.ppu differ diff --git a/lib/serial.ppu b/lib/serial.ppu index c6ce9ff0..cc815cfe 100644 Binary files a/lib/serial.ppu and b/lib/serial.ppu differ diff --git a/lib/shell.ppu b/lib/shell.ppu index d41ac494..dd206d03 100644 Binary files a/lib/shell.ppu and b/lib/shell.ppu differ diff --git a/lib/splash.ppu b/lib/splash.ppu index 1a7d4444..f8732110 100644 Binary files a/lib/splash.ppu and b/lib/splash.ppu differ diff --git a/lib/storagemanagement.ppu b/lib/storagemanagement.ppu index bd528bc6..99dc0fff 100644 Binary files a/lib/storagemanagement.ppu and b/lib/storagemanagement.ppu differ diff --git a/lib/strings.ppu b/lib/strings.ppu index 9318dd38..b596d638 100644 Binary files a/lib/strings.ppu and b/lib/strings.ppu differ diff --git a/lib/terminal.ppu b/lib/terminal.ppu index f1ef3bc0..b3639a4e 100644 Binary files a/lib/terminal.ppu and b/lib/terminal.ppu differ diff --git a/lib/testdriver.ppu b/lib/testdriver.ppu index e44f6ab8..1a0836b4 100644 Binary files a/lib/testdriver.ppu and b/lib/testdriver.ppu differ diff --git a/lib/tracer.ppu b/lib/tracer.ppu index 325f2b22..edbd740a 100644 Binary files a/lib/tracer.ppu and b/lib/tracer.ppu differ diff --git a/lib/tss.ppu b/lib/tss.ppu index b8c106d0..b13e1674 100644 Binary files a/lib/tss.ppu and b/lib/tss.ppu differ diff --git a/lib/util.ppu b/lib/util.ppu index 82f73ffa..2c33b315 100644 Binary files a/lib/util.ppu and b/lib/util.ppu differ diff --git a/lib/vmemorymanager.ppu b/lib/vmemorymanager.ppu index 83fcdd4d..0b71bf0f 100644 Binary files a/lib/vmemorymanager.ppu and b/lib/vmemorymanager.ppu differ diff --git a/src/console.pas b/src/console.pas index 4318285d..c8873b75 100644 --- a/src/console.pas +++ b/src/console.pas @@ -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; diff --git a/src/include/asuro.pas b/src/include/asuro.pas index c73b6e18..7ec90363 100644 --- a/src/include/asuro.pas +++ b/src/include/asuro.pas @@ -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 diff --git a/src/include/strings.pas b/src/include/strings.pas index 4123523d..135e2fbb 100644 --- a/src/include/strings.pas +++ b/src/include/strings.pas @@ -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; diff --git a/src/include/util.pas b/src/include/util.pas index 2a68de46..b22a902c 100644 --- a/src/include/util.pas +++ b/src/include/util.pas @@ -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; diff --git a/src/kernel.pas b/src/kernel.pas index ad81f92b..89a3e5e9 100644 --- a/src/kernel.pas +++ b/src/kernel.pas @@ -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; diff --git a/src/prog/memview.pas b/src/prog/memview.pas index cabf0d9a..7818c292 100644 --- a/src/prog/memview.pas +++ b/src/prog/memview.pas @@ -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'); diff --git a/src/prog/shell.pas b/src/prog/shell.pas index 9a2015b0..1008a1e3 100644 --- a/src/prog/shell.pas +++ b/src/prog/shell.pas @@ -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 ', getTerminalHWND); + console.writestringlnWND(' colors taskbar ', getTerminalHWND); + console.writestringlnWND(' colors window ', getTerminalHWND); + console.writestringlnWND(' colors button ', 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 '); + terminal.registerCommand('COLORS', @Command_Colors, 'Set the desktop colors'); end; end. \ No newline at end of file