; draw 1 blue pixel to screen Title base program for graphics example .model small .stack 100h .data .code main proc ; load data segment mov ax, @data mov ds, ax ; get current video mode mov ah, 0fh int 10h push ax ; set video mode mov ah, 00h mov al, 0Dh int 10h ;Function 0Ch: Write pixel dot ;this function uses values from registers as follows ;AL : color of the pixel ;BH : page number ;CX : column ;DX : row ; draw a sample pixel mov ah, 0Ch mov al, 1100b mov bh, 0 mov cx, 100 top1: mov dx, 10 int 10h mov dx, 100 int 10h dec cx cmp cx, 10 jae top1 mov ah, 0Ch mov al, 1010b mov dx, 100 mov bh, 0 top2: mov cx, 10 int 10h mov cx, 100 int 10h dec dx cmp dx, 10 jae top2 mov dx, 99 mov ah, 0Ch mov al, 1111b mov bh, 0 top3: mov cx, 99 top4: int 10h dec cx cmp cx, 11 jae top4 dec dx cmp dx, 11 jae top3 ; wait for key mov ah, 10h int 16h ; restore video mode pop ax mov ah, 00h int 10h ; exit program mov ax, 4C00h int 21h main endp end main