Display a message

Store the video-function mode we are going to use, which currently is only typing. In total, there are 256 video-function modes mov ah, 0x0E The 0x0E (teletype mode) requires two more values in the register, where A is the character to write, and 0x00 is the page number which is visible to us. mov al, 'A'     mov bh, 0x00 Call an interrupt, which pauses the program so that the CPU can look in a special table stored in the memory. 0x10 tells the CPU to find a simple videodriver

Character: db 'A'     [BITS 16] [ORG 0x7C00]

main: mov ax, 0x0000 mov ds, ax

mov si, String1 mov si, String2

call PrintMsg jmp $

printmsg:

mov ah, 0x0E mov bh, 0x00 .next char: loadsb or al, al         jz .return int 0x10 jmp .nextchar .return ret

String1: db "It works",B,10,0 String2: db "It still works",0

times 510-($-$$) db 0 dw 0xAA55