From 99de900255307757e9ca3198c496df5e75f3b5ff Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Sat, 18 Apr 2020 14:45:49 +0200 Subject: Not working --- asm/jo_r_loop.asm | 30 +++++++++++++++++++++--------- 1 file 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 -- cgit v1.2.3