diff options
-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 |