EttinOS/src/PRINTSTR.INC

30 lines
308 B
Plaintext

;Prints a string from SI until a null.
printstr:
;Store the initial registers in the stack
push ax
.loop:
;Load a character
lodsb
;Check for the string end
cmp al, 0x0
je .done
;Print the character
mov ah, 0xe
int 0x10
;Repeat
jmp .loop
.done:
;Load the initial registers from the stack
pop ax
ret