summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandromeda <andromeda@lenovo>2026-03-24 10:05:21 +0100
committerandromeda <andromeda@lenovo>2026-03-24 10:05:21 +0100
commit26b6b44caf00a1605c501be82b0fcc3eef3c04a2 (patch)
treede466b2ebdeb480c78f3d699128adda1d77c4839
parent8b0e4759beaa550f7b1d19a44cf86a9ae04268f7 (diff)
improve print
-rw-r--r--twasm/asm/main.asm16
1 files 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