0% found this document useful (0 votes)
14 views

Activity No 8 Attributes 1

CPE Activity

Uploaded by

You Know Who
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Activity No 8 Attributes 1

CPE Activity

Uploaded by

You Know Who
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Activity No.

8
ATTRIBUTES
Course Code: CPE005 Program:
Course Title: Computer Systems Organization with Assembly Date Performed:
Language
Section: Date Submitted:
Name: Instructor:
1. Objective:
This activity aims to demonstrate cursor positioning and text-based attributes in Assembly.

2. Intended Learning Outcomes (ILOs):

After completion of this activity the students should be able to:

1.1 Display a text based on a specified position on a monitor screen


1.2 Create a program that involves text-based attributes.
3. Discussion :
The Screen

The screen is typically has 80(0-79) columns x 25 (0-24). The columns and rows provide a grid of
addressable locations at any one of which the cursor can be set.INT 10h and Service 06h handles the
process of clearing the screen.
It is required to determine the position of X and Y coordinates where the next character is to be
displayed.INT 10H Service 02H sets the cursor position.

The attribute byte in text mode determines the characteristics of each displayed character. When a
program set an attribute, it remains set; that is , all subsequent displayed character have the same attribute
until one operation changes it. You can use INT 10H functions to generate a screen attribute and perform
such actions as scroll up or down, read attribute or character, or print / display attribute or character.

4. Resources:
Computer with 32-bit Operating System
TASM
5. Procedure:
Sample Problem A. TITLE screen1.asm
1. Type the following program .model small in Notepad.
.stack
.data
.code
start:

mov ax, 0600h


movbh, 00eh
mov cx,0
mov dx, 0184fh
int 10h

mov ah, 02
mov bh,0
mov dh, 10
mov dl,34
int 10h

mov ah,02
2. Save the program as screen1.asm.
3. Assemble and execute the program.
4. Analyze and record the output in Table 8.1.
Sample Problem B.
1. Modify program screen1.asm, replace line number 15 with “mov bh,0ch”.
2. Analyze and record the output in Table 8.2.
3. How is your output different from before? Why?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________

Sample Problem C.
1. Modify program screen1.asm, replace line number 2 with “mov bh,1bh”.
2. Analyze and record the output in Table 8.3.
3. How is your output different from before? Why?
_________________________________________________________________________________
_________________________________________________________________________________
_________________________________________________________________________________

Sample Problem D.
1. Type the following program in Notepad.
TITLE screen2.asm
dosseg
.model small
.stack
.code
start:
mov ax, 0b800h
moves, ax
mov ah, 06h
mov cl, 00h
movch, 00h
mov dl, 18h
mov dh, 18h
movbh, 20h
int 10h

mov ah, 06h


mov cl, 18h
movch, 00h
mov dl, 36h
mov dh, 18h
movbh, 40h
int 10h

mov ah, 06h


mov cl, 36h
movch, 00h
mov dl, 4fh
mov dh, 18h
movbh, 10h
int 10h

mov ah, 4ch


int 21h
end start
2. Save the program as screen2.asm.
3. Assemble and execute the program.
4. Analyze and record the output in Table 8.2.

6. DATA ANALYSIS:
Table 8.1- Output of screen1.asm Table 8.2- Output of screen2.asm

7. PROBLEMS:

1. Modify screen2.asm. Change the background into four-color vertical “Light blue, yellow, magenta
and Cyan” and write down the name of the color on the space provided for every color.
Sample Output:

2. Modify program screen2.asm so that it will display the figure below:


3. Make an assembly program that will display the figure shown below. Save your file as Football.asm

8. CONCLUSIONS

8. Assessment (Rubric for Laboratory Performance):

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy