From ebee21c457ed4ce095b075cdf5e28ed2d2c8dab8 Mon Sep 17 00:00:00 2001 From: Kwarde Date: Sun, 20 Jul 2025 22:38:06 +0200 Subject: [PATCH] mov X, 0 -> xor X, X - Fixes #3 --- src/console.asm | 4 ++-- src/tests.asm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/console.asm b/src/console.asm index 18a7533..19feb2a 100644 --- a/src/console.asm +++ b/src/console.asm @@ -141,7 +141,7 @@ printf: mov rcx, 1 jmp %%movr8 ;nice label name isn't it? %%padSpaces: - mov rcx, 0 + xor rcx, rcx %%movr8: mov r8, %2 call %3 @@ -176,7 +176,7 @@ printf: .process: cmp byte [rdi], EOS je .wrapup - mov r9b, 0 + xor r9b, r9b cmp r10, printfBuffLen-1 je .flushBuffer .flushReturn_0: diff --git a/src/tests.asm b/src/tests.asm index 6911f93..5598764 100644 --- a/src/tests.asm +++ b/src/tests.asm @@ -1120,5 +1120,5 @@ _start: ;--- exit() ;--- leave - mov rdi, 0 + xor rdi, rdi call exit