diff --git a/Asuro.iso b/Asuro.iso index dad63d0d..96aff9d4 100644 Binary files a/Asuro.iso and b/Asuro.iso differ diff --git a/bin/kernel.bin b/bin/kernel.bin index 196b8a04..7d5e3f24 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 196b8a04..7d5e3f24 100755 Binary files a/iso/boot/asuro.bin and b/iso/boot/asuro.bin differ diff --git a/lib/kernel.ppu b/lib/kernel.ppu index 3d33f93b..811be646 100644 Binary files a/lib/kernel.ppu and b/lib/kernel.ppu differ diff --git a/lib/libpconsole.a b/lib/libpconsole.a index 34246e77..923e9add 100644 Binary files a/lib/libpconsole.a and b/lib/libpconsole.a differ diff --git a/lib/libpmultiboot.a b/lib/libpmultiboot.a index 6921f657..0ae31bd8 100644 Binary files a/lib/libpmultiboot.a and b/lib/libpmultiboot.a differ diff --git a/lib/libpsystem.a b/lib/libpsystem.a index 4db4b08a..b4422541 100644 Binary files a/lib/libpsystem.a and b/lib/libpsystem.a differ diff --git a/lib/scheduler.ppu b/lib/scheduler.ppu index 3d7efd72..7c218b3a 100644 Binary files a/lib/scheduler.ppu and b/lib/scheduler.ppu differ diff --git a/lib/terminal.ppu b/lib/terminal.ppu index 507f7f45..ca6fe983 100644 Binary files a/lib/terminal.ppu and b/lib/terminal.ppu differ diff --git a/src/kernel.pas b/src/kernel.pas index 8e294974..19e37982 100644 --- a/src/kernel.pas +++ b/src/kernel.pas @@ -41,7 +41,7 @@ begin Terminal.run; end; -procedure terminal_command_meminfo(buffer : TCommandBuffer); +procedure terminal_command_meminfo(params : PParamList); begin console.writestring('Lower Memory = '); console.writeint(multibootinfo^.mem_lower); diff --git a/src/scheduler.pas b/src/scheduler.pas index b63cb9cb..2f8c5aeb 100644 --- a/src/scheduler.pas +++ b/src/scheduler.pas @@ -80,7 +80,7 @@ begin end; end; -procedure terminal_command_tasks(buffer : TCommandBuffer); +procedure terminal_command_tasks(params : PParamList); var list : PScheduler_Entry; diff --git a/src/strings.pas b/src/strings.pas index 45b88d20..7f1be8ff 100644 --- a/src/strings.pas +++ b/src/strings.pas @@ -119,7 +119,7 @@ end; function stringContains(str : pchar; sub : pchar) : boolean; begin - result:= false; + stringContains:= false; end; end. \ No newline at end of file diff --git a/src/terminal.pas b/src/terminal.pas index 9aba1d2d..2810b454 100644 --- a/src/terminal.pas +++ b/src/terminal.pas @@ -24,7 +24,7 @@ type Next : PParamList; end; TCommandBuffer = array[0..1023] of byte; - TCommandMethod = procedure(buf : TCommandBuffer); + TCommandMethod = procedure(params : PParamList); TCommand = record registered : boolean; command : pchar; @@ -59,15 +59,10 @@ begin current^.Param:= nil; start:= 0; finish:= 0; - while (char(buf[finish]) <> ' ') and (buf[finish] <> 0) do begin - inc(finish); - end; while buf[start] <> 0 do begin - start:=finish+1; - inc(finish); while (char(buf[finish]) <> ' ') and (buf[finish] <> 0) do begin inc(finish); - end; + end; size:= finish - start; if size > 0 then begin ptr:= uint32(@buf[start]); @@ -78,47 +73,46 @@ begin current:= current^.next; current^.next:= nil; current^.Param:= nil; - end; + end; + start:=finish+1; + inc(finish); end; getParams:= root; end; -procedure testParams(buffer : TCommandBuffer); -var - params : PParamList; - +procedure testParams(params : PParamList); begin - params:= getParams(buffer); while params^.Param <> nil do begin writestringln(params^.Param); params:= params^.next; end; end; -procedure echo(buffer : TCommandBuffer); +procedure echo(params : PParamList); var - idx : uint32; + current : PParamList; begin - idx:= 5; - while buffer[idx] <> 0 do begin - console.writechar(char(buffer[idx])); - inc(idx); + current:= params^.next; + while current^.param <> nil do begin + console.writestring(current^.param); + console.writestring(' '); + current:= current^.next; end; console.writestringln(''); end; -procedure clear(buffer : TCommandBuffer); +procedure clear(params : PParamList); begin console.clear(); end; -procedure version(buffer : TCommandBuffer); +procedure version(params : PParamList); begin console.writestringln('Asuro v1.0'); end; -procedure help(buffer : TCommandBuffer); +procedure help(params : PParamList); var i : uint32; begin @@ -180,7 +174,9 @@ end; procedure process_command; var fallthrough : boolean; + params : PParamList; i : uint32; + next : PParamList; begin console.writecharln(' '); @@ -189,7 +185,16 @@ begin for i:=0 to 65534 do begin if Commands[i].registered then begin if isCommand(Commands[i].command) then begin - Commands[i].method(buffer); + params:= getParams(buffer); + Commands[i].method(params); + params:= params; + next:= params^.next; + while params^.next <> nil do begin + if params^.param <> nil then kfree(void(params^.param)); + kfree(void(params)); + params:= next; + next:= params^.next; + end; fallthrough:= false; end; end;