GV> How do i write a string to the screen, but being able to specify a text
GV> attribute?
GV>
GV> Like the Mov Ah,9 Int 21 function, only with colors?
Check out int 10h, function 13h. The following program illustrates
the use of this function.
;---------------------------------------------------------------------
;A program to illustrate the use of the BIOS write_string function.
;---------------------------------------------------------------------
cseg segment
assume cs:cseg, ds:cseg
org 100h
begin: jmp main
buf db "This is my test string--printed out as"
db "yellow text on a black background.",13,10
len dw $ - buf
main:
mov ah,13h ;write_string function (int 10h)
mov al,0
mov bl,0eh ;color attribute yellow on black
mov bh,0 ;page
mov dh,20
mov dl,2 ;dh,dl = row, col of start of string output
mov cx,len ;cx holds length of string
mov bp,offset buf ;es:bp==>start of string
int 10h
mov ax,4c00h
int 21h
cseg ends
end begin
--Hugh Noland--
--- Maximus/2 3.01
---------------
* Origin: Madman BBS * Chico, California * 916-893-8079 * (1:119/88)
|