]> git.lizzy.rs Git - loadnothing.git/commitdiff
Shorten string iteration with the help of lodsb
authorHimbeerserverDE <himbeerserverde@gmail.com>
Sun, 11 Sep 2022 09:21:35 +0000 (11:21 +0200)
committerHimbeerserverDE <himbeerserverde@gmail.com>
Sun, 11 Sep 2022 09:21:35 +0000 (11:21 +0200)
boot.asm

index 30d728e86e7a971c9345752842b187193308d53e..3b23d5830ce6c39f01eedfca10189fd1dbd41479 100644 (file)
--- 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