org 100h
jmp inicio
msg db " Hello World!",'$'
inicio:
; set video mode
mov ax, 3 ; text mode 80x25, 16 colors, 8 pages (ah=0, al=3)
int 10h ; do it!
; cancel blinking and enable all 16 colors:
mov ax, 1003h
mov bx, 0
int 10h
;***************************************************
; print "hello world"
; mensaje de salida tipo string, int21h funsion 09h
mov dx, offset msg
mov ah, 09h
int 21h
; set segment register:
; B800h, es la ubicacion en memoria de la zona de pantalla
; en modo texto, apuntada por DS
mov ax, 0b800h
mov ds, ax
;***************************************************
; color all characters:
mov cx, 12 ; number of characters.
mov di, 03h ; start from byte after 'h'
c: mov [di], 11101100b ; light red(1100) on yellow(1110)
add di, 2 ; skip over next ascii code in vga memory.
loop c
; wait for any key press:
mov ah, 0
int 16h
ret