From 29835759655b94e7f45b68489ee14e3b4308570d Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Thu, 16 Apr 2020 19:45:51 +0200 Subject: Now getting percent --- asm/jo_f_percent.asm | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 asm/jo_f_percent.asm (limited to 'asm') diff --git a/asm/jo_f_percent.asm b/asm/jo_f_percent.asm new file mode 100644 index 0000000..765ca99 --- /dev/null +++ b/asm/jo_f_percent.asm @@ -0,0 +1,29 @@ +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; ;; +;; File : jo_f_percent.asm /_________/ ;; +;; Author : Joe | ;; +;; Date : 04/2020 | ;; +;; Info : gets batt remaining capacity | ;; +;; / | ;; +;; \ / ;; +;; \_____/ ;; +;; ;; +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +section .text + extern system + global jo_f_percent + +jo_f_percent: + mov rdi, f_cmd + call system + retq + +err: + mov rax, 0xff + retq + + +section .data + f_cmd: db "apm -l > /tmp/lowbat.percent", 0x0 + buff: db 0x0, 0x0, 0x0, 0x0 -- cgit v1.2.3