From: HimbeerserverDE Date: Sun, 11 Sep 2022 09:21:35 +0000 (+0200) Subject: Shorten string iteration with the help of lodsb X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=71f9b90adfc029fceb7b139698d6196fefa87c2b;p=loadnothing.git Shorten string iteration with the help of lodsb --- 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