aboutsummaryrefslogtreecommitdiffstats
path: root/asm/jo_f_percent.asm
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-27 01:02:18 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-27 01:02:18 +0200
commitea0eca4f717d7f4408273613a566f3550d27085b (patch)
treeb1c1fa062823bb36bbd8bb9dab6437c83c229eec /asm/jo_f_percent.asm
parentMakefile change (diff)
downloadlowbat-bsd-ea0eca4f717d7f4408273613a566f3550d27085b.tar.gz
lowbat-bsd-ea0eca4f717d7f4408273613a566f3550d27085b.tar.bz2
lowbat-bsd-ea0eca4f717d7f4408273613a566f3550d27085b.tar.xz
lowbat-bsd-ea0eca4f717d7f4408273613a566f3550d27085b.tar.zst
lowbat-bsd-ea0eca4f717d7f4408273613a566f3550d27085b.zip
Rewrite started
Diffstat (limited to 'asm/jo_f_percent.asm')
-rw-r--r--asm/jo_f_percent.asm47
1 files changed, 0 insertions, 47 deletions
diff --git a/asm/jo_f_percent.asm b/asm/jo_f_percent.asm
deleted file mode 100644
index 6a41c2f..0000000
--- a/asm/jo_f_percent.asm
+++ /dev/null
@@ -1,47 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; ;;
-;; File : jo_f_percent.asm /_________/ ;;
-;; Author : Joe | ;;
-;; Date : 04/2020 | ;;
-;; Info : Gets batt remaining capacity | ;;
-;; / | ;;
-;; \ / ;;
-;; \_____/ ;;
-;; ;;
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-section .text
- extern system
- extern atoi
- global jo_f_percent
-
-jo_f_percent:
- mov rdi, f_cmd
- call system
- mov rdi, pr_file
- mov rsi, 0x0
- mov rax, 0x5
- syscall
- jc err
- mov rdi, rax
- mov rsi, buff
- mov rdx, 0x3
- mov rax, 0x3
- syscall
- jc err
- mov rax, 0x6
- syscall
- xor rax, rax
- mov rdi, rsi
- call atoi
- retq
-
-err:
- mov rax, 0xfe
- retq
-
-
-section .data
- f_cmd: db "apm -l > /tmp/lowbat.percent", 0x0
- pr_file: db "/tmp/lowbat.percent", 0x0
- buff: db 0x0, 0x0, 0x0, 0x0