aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-16 19:45:51 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-16 19:45:51 +0200
commit29835759655b94e7f45b68489ee14e3b4308570d (patch)
tree556235c481c64209de6a743570fa6c427a8d7439 /asm
parentHex, removed lowbat bin (diff)
downloadlowbat-bsd-29835759655b94e7f45b68489ee14e3b4308570d.tar.gz
lowbat-bsd-29835759655b94e7f45b68489ee14e3b4308570d.tar.bz2
lowbat-bsd-29835759655b94e7f45b68489ee14e3b4308570d.tar.xz
lowbat-bsd-29835759655b94e7f45b68489ee14e3b4308570d.tar.zst
lowbat-bsd-29835759655b94e7f45b68489ee14e3b4308570d.zip
Now getting percent
Diffstat (limited to 'asm')
-rw-r--r--asm/jo_f_percent.asm29
1 files changed, 29 insertions, 0 deletions
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