EttinOS/source/printstr.inc

31 lines
316 B
PHP

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