aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-04-18 14:45:49 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-04-18 14:45:49 +0200
commit99de900255307757e9ca3198c496df5e75f3b5ff (patch)
treecbc8e7ad68684fe480090a7a33c3df89fe548046
parentBus err when speaking (diff)
downloadlowbat-bsd-99de900255307757e9ca3198c496df5e75f3b5ff.tar.gz
lowbat-bsd-99de900255307757e9ca3198c496df5e75f3b5ff.tar.bz2
lowbat-bsd-99de900255307757e9ca3198c496df5e75f3b5ff.tar.xz
lowbat-bsd-99de900255307757e9ca3198c496df5e75f3b5ff.tar.zst
lowbat-bsd-99de900255307757e9ca3198c496df5e75f3b5ff.zip
Not working
-rw-r--r--asm/jo_r_loop.asm30
1 files changed, 21 insertions, 9 deletions
diff --git a/asm/jo_r_loop.asm b/asm/jo_r_loop.asm
index 51ee543..6264cf1 100644
--- a/asm/jo_r_loop.asm
+++ b/asm/jo_r_loop.asm
@@ -14,19 +14,31 @@
;; -------------------------------
section .text
+ extern puts
extern jo_n_speak
global jo_r_loop
jo_r_loop:
- cmp rdi, 0x1
- je speak1
-
-next:
- loop jo_r_loop
- mov rax, 25
- retq
+ push rcx
+ push rbx
+ mov rbx, rsi
+ mov rcx, rdi
speak1:
- mov rdi, [rsi + 8 * 2]
+ cmp rcx, 0x1
+ jne speak1
+ mov rdi, [rbx + 8 * 2]
call jo_n_speak
- jmp next
+ pop rcx
+ push rdi
+ mov rdi, message
+ call puts
+ pop rdi
+ jmp speak1
+
+return:
+ xor rax, rax
+ retq
+
+section .data
+ message: db "qwe", 0x0