summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfaissaloo <faissaloo@gmail.com>2016-07-22 16:02:51 +0100
committerfaissaloo <faissaloo@gmail.com>2016-07-22 16:02:51 +0100
commite255b0dca861700d5b6358db8855b037268be8bb (patch)
treea0aa2c41a6f74652d658ad31ae9b365f655e2259
parentb6099ab700d1af16647c1bc8d17f2b4d84bfd338 (diff)
downloaddbsh-e255b0dca861700d5b6358db8855b037268be8bb.tar.gz
Oops, forgot to stage some changes
-rwxr-xr-xshbin4568 -> 4560 bytes
-rw-r--r--sh.asm10
-rw-r--r--sh.obin4912 -> 4896 bytes
3 files changed, 5 insertions, 5 deletions
diff --git a/sh b/sh
index 291733a..946ab75 100755
--- a/sh
+++ b/sh
Binary files differ
diff --git a/sh.asm b/sh.asm
index d899a31..edcf859 100644
--- a/sh.asm
+++ b/sh.asm
@@ -129,7 +129,7 @@ _parse_path:
mov rdi, env
xor rsi, rsi
syscall
- cmp rax, 0x0
+ test rax, rax ;check if rax is 0
jl _quit
mov r8, -0x1
@@ -142,7 +142,7 @@ _parse_path2:
mov rsi, r9
mov rdx, 0xff
syscall
- cmp rax, 0x0
+ test rax, rax
jl _quit
mov r8, r9
dec r8
@@ -168,7 +168,7 @@ _pathfinder:
mov byte al, [r8+5]
cmp al, `"`
jne _pathfinder
- cmp al, 0x0
+ test al, al ;checks for 0
je _quit
add r8, 0x6
mov r10, 0x1
@@ -439,7 +439,7 @@ _builtin_cd:
mov rdi,rax
mov rax, sys_chdir
syscall
- cmp rax, 0
+ test rax, rax
jz _read_loop
mov rax, sys_write
mov rdi, 0x1
@@ -461,7 +461,7 @@ _builtin_exit:
jz _string_to_int_end
_string_to_int_loop:
mov dl, [rax] ; Convert this to a number
- cmp dl, 0 ;Checks for NULL
+ test dl, dl ;Checks for NULL
jz _string_to_int_end
sub dl, `0` ;sub because we'll need to do this anyway
jl _invalid_int
diff --git a/sh.o b/sh.o
index 621e66e..e9ab2e1 100644
--- a/sh.o
+++ b/sh.o
Binary files differ