From 3eb2b353ccce59f0b09b5b3c56caac5be6bbbb24 Mon Sep 17 00:00:00 2001 From: JozanLeClerc Date: Fri, 17 Apr 2020 18:40:13 +0200 Subject: in progress --- asm/jo_r_lowbat.asm | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'asm/jo_r_lowbat.asm') diff --git a/asm/jo_r_lowbat.asm b/asm/jo_r_lowbat.asm index 9753a12..6fadc86 100644 --- a/asm/jo_r_lowbat.asm +++ b/asm/jo_r_lowbat.asm @@ -19,32 +19,29 @@ section .text extern puts - extern jo_n_speak + ;; extern stoa extern jo_c_args + extern jo_r_loop global jo_r_lowbat jo_r_lowbat: - call jo_c_args - cmp rax, 0x0 - jne joprint + ;; call stoa push rdi - mov rdi, msg - call jo_n_speak - pop rdi - xor rax, rax - mov rax, rdi - retq - -joprint: - push rdi - push rsi - ;; mov rdi, fmt mov rdi, rax call puts - pop rsi pop rdi retq -section .data - msg: db "Welcome back, partner!", 0x0 - ;; fmt: db "argv[2]: %s\n", 0x0 +;; call jo_c_args +;; mov bl, byte [rax + 0x0] +;; cmp bl, 0x0 +;; jne joprint +;; call jo_r_loop ; jo_r_loop(speak: 0-1, *argv[]) +;; xor rax, rax +;; retq + +;; joprint: +;; push rdi +;; mov rdi, rax +;; call puts +;; pop rdi -- cgit v1.2.3