geos/OST OS/os/x16/print/print.asm
2024-03-25 23:00:14 +01:00

33 lines
374 B
NASM

[ org 0x7c00 ]
write:
mov edx, 0
jmp print
writeLn:
mov edx, 1
print:
mov ah, 0x0e
print_loop:
mov al, [ ebx ]
cmp al, 0
je finish
int 0x10
add ebx, 0x01
call print_loop
finish:
cmp edx, 0
jle end
new_line:
mov al, 13
int 0x10
mov al, 10
int 0x10
dec edx
end:
ret