aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-18 21:43:12 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-18 21:43:12 +0200
commit8536c08f20e68046807b580f89ad429fbc898fa9 (patch)
tree9fc37fd3b6293df74fca28c01b4dd1ffec7dc123
parentFinished main program (diff)
downloadlowbat-bsd-8536c08f20e68046807b580f89ad429fbc898fa9.tar.gz
lowbat-bsd-8536c08f20e68046807b580f89ad429fbc898fa9.tar.bz2
lowbat-bsd-8536c08f20e68046807b580f89ad429fbc898fa9.tar.xz
lowbat-bsd-8536c08f20e68046807b580f89ad429fbc898fa9.tar.zst
lowbat-bsd-8536c08f20e68046807b580f89ad429fbc898fa9.zip
Removed some comments
-rw-r--r--asm/jo_c_args.asm2
-rw-r--r--asm/jo_f_status.asm2
-rw-r--r--asm/jo_r_cpyhead.asm4
-rw-r--r--asm/jo_r_loop.asm8
4 files changed, 8 insertions, 8 deletions
diff --git a/asm/jo_c_args.asm b/asm/jo_c_args.asm
index 94a9413..bb24057 100644
--- a/asm/jo_c_args.asm
+++ b/asm/jo_c_args.asm
@@ -44,4 +44,4 @@ no_args:
section .data
reference: db "--say", 0x0
- reflen: equ $ - reference ; reference len
+ reflen: equ $ - reference
diff --git a/asm/jo_f_status.asm b/asm/jo_f_status.asm
index 723df0b..5abaf24 100644
--- a/asm/jo_f_status.asm
+++ b/asm/jo_f_status.asm
@@ -38,7 +38,7 @@ jo_f_status:
mov rax, 0x6
syscall
movsx rax, byte [rsi + 0x0]
- sub rax, 0x30 ; 48
+ sub rax, 0x30
retq
err:
diff --git a/asm/jo_r_cpyhead.asm b/asm/jo_r_cpyhead.asm
index 421b17c..14b42da 100644
--- a/asm/jo_r_cpyhead.asm
+++ b/asm/jo_r_cpyhead.asm
@@ -19,7 +19,7 @@ jo_r_cpyhead: ; jo_r_cpyhead(percent: rdi)
push rdi
mov rdi, buff
mov rsi, 0x0
- mov rdx, 0x11 ; 17
+ mov rdx, 0x11
call memset ; memset 0 notification head
lea rsi, [rel n_head]
pop rdi
@@ -37,4 +37,4 @@ section .data
n_head: db "Low battery: %d%%", 0x0
section .bss
- buff: resb 0x11 ; 17, notification head len
+ buff: resb 0x11
diff --git a/asm/jo_r_loop.asm b/asm/jo_r_loop.asm
index 7aa68ac..dccb46c 100644
--- a/asm/jo_r_loop.asm
+++ b/asm/jo_r_loop.asm
@@ -38,7 +38,7 @@ bigloop:
call jo_f_percent ; check the capacity
cmp rax, 0xfe ; in case we couldn't read
je err
- cmp rax, 0xf ; 15%
+ cmp rax, 0xf
jge sleepalot
mov rdi, rax
call jo_r_cpyhead
@@ -56,13 +56,13 @@ speak:
call jo_n_speak
sleepabit:
- mov rdi, 0x14 ; 20s
+ mov rdi, 0x14
call sleep ; sleep 20 seconds before next check/notification
jmp bigloop
sleepalot:
- mov rdi, 0xf0 ; 240s
- call sleep ; sleep 4m if it's fine
+ mov rdi, 0xf0
+ call sleep ; sleep 240s (4m) if it's fine
jmp bigloop
return: