section .text

global k_getch
global k_print

section .bss
buffer:
   resb 1024

section .text

k_print:
        push ebp
        mov ebp,esp
        mov si,[ebp+8]
        again:
        mov al,[si]
        mov ah,0eh
        int 10h
        inc si
        mov al,[si]
        cmp al,0
        je endit
        jmp again
        endit:
        mov esp,ebp
        pop ebp
        ret

k_getch:
	mov ax,0
	mov ah,10h
	int 16h
	mov [buffer],ax
	mov ax,[buffer]
	ret
