diff --git a/Asuro.iso b/Asuro.iso index 0c599f0d..862dac85 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/iso/boot/asuro.bin b/iso/boot/asuro.bin index 66f7dd13..8976e909 100755 Binary files a/iso/boot/asuro.bin and b/iso/boot/asuro.bin differ diff --git a/lib/E1000.ppu b/lib/E1000.ppu index 89854cca..6b98cd5f 100644 Binary files a/lib/E1000.ppu and b/lib/E1000.ppu differ diff --git a/lib/arp.ppu b/lib/arp.ppu index 8dbc5389..7e0c757b 100644 Binary files a/lib/arp.ppu and b/lib/arp.ppu differ diff --git a/lib/asuro.ppu b/lib/asuro.ppu index f3f1d9b5..c310514a 100644 Binary files a/lib/asuro.ppu and b/lib/asuro.ppu differ diff --git a/lib/console.ppu b/lib/console.ppu index 00ead835..9bc8e290 100644 Binary files a/lib/console.ppu and b/lib/console.ppu differ diff --git a/lib/drivermanagement.ppu b/lib/drivermanagement.ppu index 5cf13df7..22aa6ee3 100644 Binary files a/lib/drivermanagement.ppu and b/lib/drivermanagement.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index ca61fb07..be3bae34 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index 376002af..d2c0ad20 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index 920bdd03..7e2bd596 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/lib/lists.ppu b/lib/lists.ppu index d7e3dc28..7fe65f20 100644 Binary files a/lib/lists.ppu and b/lib/lists.ppu differ diff --git a/lib/mouse.ppu b/lib/mouse.ppu index 63e20e0f..8e2b6d49 100644 Binary files a/lib/mouse.ppu and b/lib/mouse.ppu differ diff --git a/lib/strings.ppu b/lib/strings.ppu index 026b4877..9318dd38 100644 Binary files a/lib/strings.ppu and b/lib/strings.ppu differ diff --git a/lib/terminal.ppu b/lib/terminal.ppu index 973910d0..f1ef3bc0 100644 Binary files a/lib/terminal.ppu and b/lib/terminal.ppu differ diff --git a/lib/tracer.ppu b/lib/tracer.ppu index e026c32b..325f2b22 100644 Binary files a/lib/tracer.ppu and b/lib/tracer.ppu differ diff --git a/src/include/asuro.pas b/src/include/asuro.pas index 8c3172d4..c73b6e18 100644 --- a/src/include/asuro.pas +++ b/src/include/asuro.pas @@ -3,20 +3,20 @@ unit asuro; interface const - VERSION = '1.0.1-663ia'; + VERSION = '1.0.1-664ia'; VERSION_MAJOR = '1'; VERSION_MINOR = '0'; VERSION_SUB = '1'; - REVISION = '663'; + REVISION = '664'; RELEASE = 'ia'; - LINE_COUNT = 26954; + LINE_COUNT = 26991; 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:04:28'; + COMPILE_TIME = '22:33:57'; implementation diff --git a/src/include/lists.pas b/src/include/lists.pas index 035b3901..ab02e994 100644 --- a/src/include/lists.pas +++ b/src/include/lists.pas @@ -5,7 +5,8 @@ interface uses console, lmemorymanager, - util; + util, + strings; type { Managed Linked List } @@ -33,6 +34,7 @@ function LL_Size(LinkedList : PLinkedListBase) : uint32; function LL_Insert(LinkedList : PLinkedListBase; idx : uint32) : Void; function LL_Get(LinkedList : PLinkedListBase; idx : uint32) : Void; procedure LL_Free(LinkedList : PLinkedListBase); +function LL_FromString(str : pchar; delimter : char) : PLinkedListBase; procedure LL_TEST(); implementation @@ -192,6 +194,39 @@ begin kfree(void(LinkedList)); end; +{function LL_FromString(str : pchar; delimter : char) : PLinkedListBase; //todo implment function for freeing pointer lists +var + list : PLinkedListBase; + i : uint32 = 0; + out_str : pchar; + elm : puint32; + head : pchar; + base : pchar; + size : uint32; + null_delim : boolean; + +begin + list := LL_New(sizeof(uint32)); + stringToLL:= list; + + head:= str; + base:= head; + null_delim:= false; + while not null_delim do begin + i:=0; + while (head[i] <> delimter) and (head[i] <> char(0)) do begin + inc(i); + end; + if head[i] = char(0) then null_delim:= true; + size:= (uint32(@head[i]) - uint32(base)) + 1; + out_str:= stringNew(size); + memset(uint32(out_str), 0, size); + memcpy(uint32(base), uint32(out_str), size-1); + elm:= puint32(LL_Add(list)); + elm + end; +end;} + procedure LL_Test(); var i : uint32; @@ -238,4 +273,39 @@ begin LL_Free(LList); end; +function LL_FromString(str : pchar; delimter : char) : PLinkedListBase; //todo implment function for freeing pointer lists +var + list : PLinkedListBase; + i : uint32 = 0; + out_str : pchar; + elm : puint32; + head : pchar; + tail : pchar; + size : uint32; + null_delim : boolean; + +begin + list := LL_New(sizeof(uint32)); + LL_FromString:= list; + + head:= str; + tail:= head; + + null_delim:= false; + while not null_delim do begin + if (head^ = delimter) or (head^ = char(0)) then begin + if head^ = char(0) then null_delim:= true; + size:= uint32(head) - uint32(tail); + if size > 0 then begin + elm:= puint32(LL_Add(list)); + out_str:= stringNew(size + 1); //maybe + memcpy(uint32(tail), uint32(out_str), size); + elm^:= uint32(out_str); + end; + tail:= head+1; + end; + inc(head); + end; +end; + end. \ No newline at end of file diff --git a/src/include/strings.pas b/src/include/strings.pas index 322593d6..4123523d 100644 --- a/src/include/strings.pas +++ b/src/include/strings.pas @@ -13,8 +13,7 @@ interface uses util, - lmemorymanager, - lists; + lmemorymanager; function stringToUpper(str : pchar) : pchar; function stringToLower(str : pchar) : pchar; @@ -27,7 +26,6 @@ function stringContains(str : pchar; sub : pchar) : boolean; function stringToInt(str : pchar) : uint32; function intToString(i : uint32) : pchar; function boolToString(b : boolean; ext : boolean) : pchar; -function stringToLL(str : pchar; delimter : char) : PLinkedListBase; implementation @@ -178,40 +176,4 @@ begin end; end; -function stringToLL(str : pchar; delimter : char) : PLinkedListBase; //todo implment function for freeing pointer lists -var - list : PLinkedListBase; - i : uint32 = 0; - out_str : pchar; - elm : puint32; - head : pchar; - tail : pchar; - size : uint32; - null_delim : boolean; - -begin - list := LL_New(sizeof(uint32)); - stringToLL:= list; - - head:= str; - tail:= head; - - null_delim:= false; - while not null_delim do begin - if (head^ = delimter) or (head^ = char(0)) then begin - if head^ = char(0) then null_delim:= true; - size:= uint32(head) - uint32(tail); - if size > 0 then begin - elm:= puint32(LL_Add(list)); - out_str:= stringNew(size + 1); //maybe - memcpy(uint32(tail), uint32(out_str), size); - elm^:= uint32(out_str); - end; - tail:= head+1; - end else begin - end; - inc(head); - end; -end; - end. \ No newline at end of file diff --git a/src/kernel.pas b/src/kernel.pas index ee3f608b..ad81f92b 100644 --- a/src/kernel.pas +++ b/src/kernel.pas @@ -92,6 +92,7 @@ var atmp : puint32; test : puint8; fb : puint16; + l : PLinkedListBase; begin { Store Multiboot info } @@ -211,6 +212,10 @@ 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;