1
0
Fork 0
EttinOS/src/PRINTSTR.INC

29 lines
402 B
Plaintext

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