Академический Документы
Профессиональный Документы
Культура Документы
Date Performed:
Date Submitted:
Instructor:
1. Objective(s):
The students shall be able to create a program that applies function 06h/07h and 02h.
3. Discussion
A typical screen has eighty (80) columns numbered from 0 to 79 and twenty five (25) rows numbered from
0 to 24. The columns and rows provide a grid of addressable locations at any one of which the cursor can
be set.
The background can display one out of eight colors and text can display one out of sixteen colors.
Black 0 0 0 0 0
Blue 1 0 0 0 1
Green 2 0 0 1 0
Cyan 3 0 0 1 1
Red 4 0 1 0 0
Magenta 5 0 1 0 1
Brown 6 0 1 1 0
White 7 0 1 1 1
Gray 8 1 0 0 0
Light blue 9 1 0 0 1
Light green A 1 0 1 0
Light cyan B 1 0 1 1
Light red C 1 1 0 0
Light magenta D 1 1 0 1
Yellow E 1 1 1 0
High-intensity White F 1 1 1 1
4. Resources:
1 Desktop Computer
TASM
5. Procedure:
Text and Background Colors
Set the text and background colors where BH displays color respectively.
BL R G B I R G B
Video Function
Displaying characters “T(space), I(space), and P” at the center of the screen with BLUE
background
.model small
.stack
.data
.code
start:
mov ah, 06
mov bh, 10H
mov cx, 0
mov dx, 184fH
int 10h
mov ah, 02
mov bh, 0
mov dh, 10 ; y position
mov dl, 34 ; x position
int 10h
mov ah, 02
mov dl, 'T'
int 21h
mov dl, 20H
int 21h
mov dl, 'I'
int 21h
mov dl, 20H
int 21h
mov dl, 'P'
int 21h
______________________________________________________________________________
______________________________________________________________________________
2. What is the used of “mov ah,4ch” and when you removed it what will happen?
______________________________________________________________________________
______________________________________________________________________________
3. Change your background into four color horizontal “ Light Blue, Yellow, Magenda, and cyan” and
write down the code in the space provided for every color.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Create your own favorite value of resistor using interrupt function 10h that will display the
corresponding color value. Use string character printing and cursor positioning to display whatever you
want .information displayed in your resistor.
7. Conclusion:
Based from the results of the experiment, what general rule can you apply for?
FUNCTION 06
______________________________________________________________________________________________
______________________________________________________________________________________________
______________________________________________________________________________________
FUNCTION 7
______________________________________________________________________________________________
______________________________________________________________________________________________
______________________________________________________________________________________