From 71f9b90adfc029fceb7b139698d6196fefa87c2b Mon Sep 17 00:00:00 2001 From: HimbeerserverDE Date: Sun, 11 Sep 2022 11:21:35 +0200 Subject: [PATCH] Shorten string iteration with the help of lodsb --- boot.asm | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/boot.asm b/boot.asm index 30d728e..3b23d58 100644 --- a/boot.asm +++ b/boot.asm @@ -12,15 +12,14 @@ print_al: ret -; Call print_al on all characters in SI -; SI must be null terminated +; Call print_al on all characters in si +; si must be null terminated print_bytes_si: mov cl, 0 ; Start with iteration 0 - equivalent of int i = 0 print_bytes_si_loop: - mov al, [si] + lodsb ; Load next characet of si into al call print_al - inc si inc cl cmp cl, ch -- 2.44.0