diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-18 14:45:49 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-04-18 14:45:49 +0200 |
commit | 99de900255307757e9ca3198c496df5e75f3b5ff (patch) | |
tree | cbc8e7ad68684fe480090a7a33c3df89fe548046 | |
parent | Bus err when speaking (diff) | |
download | lowbat-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.asm | 30 |
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 |