X-Git-Url: http://git.dujemihanovic.xyz/posts?a=blobdiff_plain;f=boot%2Fx86%2Fprint.s;h=7148bc511854ed36c22dadf308a0f182fc7b3312;hb=5abfd3ff79ee9a4eb10334ac6729205cc1a35546;hp=bffa2299019d392d6be5eea70a04817c1dfe2a95;hpb=0b02cbac466992423caa450f9659b18d251a4158;p=nameless-os.git diff --git a/boot/x86/print.s b/boot/x86/print.s index bffa229..7148bc5 100644 --- a/boot/x86/print.s +++ b/boot/x86/print.s @@ -1,27 +1,21 @@ -; cs:si - pointer to ASCIIZ string -print +; ds:si - pointer to ASCIIZ string +print: + pusha pushf - push ax - push bx - push si + cld xor bh, bh mov ah, 0Eh - -.loop - mov al, [cs:si] +.loop: + lodsb cmp al, 0 je .done int 10h - inc si jmp .loop - -.done +.done: mov al, 0Dh int 10h mov al, 0Ah int 10h - pop si - pop bx - pop ax popf + popa ret