hi
can any one tell me how to write a programe with different font colors and back grounds????
thanks.
look for it in ralph browns interrupt list. looking for int 10h
http://www.ctyme.com/intr/int-10.htm
hi
thanks for replies
but int 10h which fuction??????
thankx
It would depend on what you are trying to do. If you are trying to display characters and control the foreground and background colors, then try functions AH=9 or AH=13h.
A quick example:
.model small
.stack
.data
str1 db "a",1,"b",2,"c",3,"d",4,"e",5,"f",6,"g",7,"h",8
db "i",9,"j",10,"k",11,"l",12,"m",13,"n",14,"o",15
.code
.startup
mov ah, 13h ; function number
mov al, 11b ; mode (char-attribute, update cursor)
mov bh, 0 ; page number
mov cx, 15 ; length of string
mov dh, 0 ; start at row 0
mov dl, 0 ; start at column 0
push ds ; es:bp -> string
pop es
mov bp, OFFSET str1
int 10h
mov ah, 9 ; function number
mov al, "X" ; character
mov bh, 0 ; page number
mov bl, 14h ; attribute, red on blue
mov cx, 4 ; repeat count
int 10h
mov ah, 0 ; wait for key press
int 16h
.exit
end