From e255b0dca861700d5b6358db8855b037268be8bb Mon Sep 17 00:00:00 2001 From: faissaloo Date: Fri, 22 Jul 2016 16:02:51 +0100 Subject: Oops, forgot to stage some changes --- sh | Bin 4568 -> 4560 bytes sh.asm | 10 +++++----- sh.o | Bin 4912 -> 4896 bytes 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sh b/sh index 291733a..946ab75 100755 Binary files a/sh and b/sh 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 Binary files a/sh.o and b/sh.o differ -- cgit v1.2.3