diff --git a/console.asm b/console.asm index 27649b9..77a16f1 100644 --- a/console.asm +++ b/console.asm @@ -27,11 +27,9 @@ puts: push rbp mov rbp, rsp - push rdi - sub rsp, 8 + mov r10, rdi call print - add rsp, 8 - pop rdi + mov rdi, r10 mov rax, 1 mov rdi, 1 mov rsi, NL diff --git a/string.asm b/string.asm index aa17097..ce91a5a 100644 --- a/string.asm +++ b/string.asm @@ -54,13 +54,11 @@ strcat: push rbp mov rbp, rsp - push rdi - sub rsp, 8 + mov r10, rdi call strlen add rdi, rax call strcpy - add rsp, 8 - pop rax + mov rax, r10 leave ret