summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfaissaloo <faissaloo@gmail.com>2016-07-22 16:00:38 +0100
committerfaissaloo <faissaloo@gmail.com>2016-07-22 16:00:38 +0100
commitb6099ab700d1af16647c1bc8d17f2b4d84bfd338 (patch)
tree2a8d65307bac621aa2bf26b94a876d0d3f45da48
parent97f8ecb25566b3eb0431f7cdc42e712638ec7c3b (diff)
downloaddbsh-b6099ab700d1af16647c1bc8d17f2b4d84bfd338.tar.gz
Switched to a faster cpid check, as well as other 0 dependant checks
-rwxr-xr-xshbin4576 -> 4568 bytes
-rw-r--r--sh.asm4
-rw-r--r--sh.obin4928 -> 4912 bytes
3 files changed, 2 insertions, 2 deletions
diff --git a/sh b/sh
index 42f7bed..291733a 100755
--- a/sh
+++ b/sh
Binary files differ
diff --git a/sh.asm b/sh.asm
index 0ef79d4..d899a31 100644
--- a/sh.asm
+++ b/sh.asm
@@ -90,7 +90,7 @@ _exec:
mov rax, stub_fork
syscall
mov dword [cpid], eax
- cmp dword [cpid], 0x0
+ test eax, eax ;checks if cpid is 0
jne _wait_for_proc
; now that we know what to execute, do so
@@ -146,7 +146,7 @@ _parse_path2:
jl _quit
mov r8, r9
dec r8
-
+; Reads the PATH variable
_pathfinder:
inc r8
xor rax, rax
diff --git a/sh.o b/sh.o
index d5ee55b..621e66e 100644
--- a/sh.o
+++ b/sh.o
Binary files differ