bits 16 org 0x7c00 ; main code init: mov si,mesg call puts ; read keyboard, once we get one print something else mov ah,0 ; function: read scancode (blocking) int 0x16 ; keyboard interrupt ; AH = BIOS scan code ; AL = ASCII character ; for non-blocking version (ah=1) ; ZF set if no keystroke available ; ZF clear if keystroke available mov si,more call puts ; hang around hang: jmp hang ; message mesg: db 13,10,"Hello UniMAP! ... again!",13,10,0 more: db 13,10,"Got you!",13,10,0 ; sub-routine to print string pointed by si puts: lodsb or al,al jz .done mov ah,0x0e ; function: display char (tty?) int 0x10 ; video display interrupt jmp puts .done: ret ; filler times 510-($-$$) db 0 ; the boot signature db 0x55,0xAA