From 26b6b44caf00a1605c501be82b0fcc3eef3c04a2 Mon Sep 17 00:00:00 2001 From: andromeda Date: Tue, 24 Mar 2026 10:05:21 +0100 Subject: [PATCH] improve print --- twasm/asm/main.asm | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/twasm/asm/main.asm b/twasm/asm/main.asm index 32a08d8..bdcba88 100644 --- a/twasm/asm/main.asm +++ b/twasm/asm/main.asm @@ -1342,8 +1342,8 @@ print: mov edx, 0x3F8 .loop: mov al, [rsi] - test al, al - jz .done + cmp al, 0x00 + je .done out dx, al inc rsi jmp .loop @@ -1357,29 +1357,25 @@ print: mov rsi, .debug_msg call print pop rsi - call print - ret + jmp print ; tail call .error: push rsi mov rsi, .error_msg call print pop rsi - call print - ret + jmp print ; tail call .test: push rsi mov rsi, .test_msg call print pop rsi - call print - ret + jmp print ; tail call .warn: push rsi mov rsi, .warn_msg call print pop rsi - call print - ret + jmp print ; tail call .debug_msg db "[DEBUG]: ", 0x00 .error_msg db "[ERROR]: ", 0x00 .test_msg db "[TEST]: ", 0x00