aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-16 19:20:28 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-16 19:20:28 +0200
commitfaf716bd97c8d6c5429a5d8edc3ad1b59e430d66 (patch)
tree7df1bfd837936191b4de3093c88c2f85516cb239
parentBetter read function (diff)
downloadlowbat-bsd-faf716bd97c8d6c5429a5d8edc3ad1b59e430d66.tar.gz
lowbat-bsd-faf716bd97c8d6c5429a5d8edc3ad1b59e430d66.tar.bz2
lowbat-bsd-faf716bd97c8d6c5429a5d8edc3ad1b59e430d66.tar.xz
lowbat-bsd-faf716bd97c8d6c5429a5d8edc3ad1b59e430d66.tar.zst
lowbat-bsd-faf716bd97c8d6c5429a5d8edc3ad1b59e430d66.zip
No need to atoi, atoi is bloat
-rw-r--r--asm/jo_f_status.asm5
-rwxr-xr-xlowbatbin14832 -> 14720 bytes
2 files changed, 2 insertions, 3 deletions
diff --git a/asm/jo_f_status.asm b/asm/jo_f_status.asm
index c4f517c..04fc563 100644
--- a/asm/jo_f_status.asm
+++ b/asm/jo_f_status.asm
@@ -19,7 +19,6 @@
section .text
extern system
- extern atoi
global jo_f_status
jo_f_status:
@@ -41,8 +40,8 @@ jo_f_status:
mov rdi, rax
mov rax, 0x6
syscall
- mov rdi, rsi
- call atoi
+ movsx rax, byte [rsi + 0x0]
+ sub rax, 48
retq
err:
diff --git a/lowbat b/lowbat
index f5a864d..5bfc7ff 100755
--- a/lowbat
+++ b/lowbat
Binary files differ