Professional Documents
Culture Documents
EXPERIMENT 3
ADVANCE SCREEN OPERATION
I.
OBJECTIVES
1. To cover advance feature of screen handling
2. To be familiar with the techniques of designing program loops.
II.
INSTRUCTIONS / SERVICES
A. INT 10H SERVICE 00: Setting Mode
MOV AH, 00
MOV AL, 03
INT 10H
C. INT 10H SERVICE 09: Display character with attribute at cursor position
MOV AH, 09
MOV AL, character
MOV BH, page #
MOV BL, attribute
MOV CX, repetition
INT 10H
; request display
; character to display
; page number
; screen attribute
; number of repeated characters
ATTRIBUTE BYTE
BL
BACKGROUND COLOR
INT
FOREGROUND COLOR
; request display
; character to display
; page number
; number of repeated characters
1 | Page
; request display
; 0, 1, 2, or 3
; page number
; screen attribute
; address of string in ES:BP
; length of string
; row position of string
; column position of string
F. LOOP INSTRUCTIONS
FORMAT:
{register}, {register}
{memory location}, {register}
{register}, {memory location}
{register}, {immediate}
{memory location}, {immediate}
INC/DEC
2 | Page
EXERCISE
NAME:
SECTION:
DATE:
INSTRUCTOR:
GRADE:
1. Encode the given assembly language program, assemble, link and execute.
cseg segment para 'code'
assume cs:cseg, ds:cseg, es:cseg, ss:cseg
org 100h
start:
jmp begin
str1 db 'NCP 311$'
begin:
mov ax, 003h
int 10h
mov ah, 00
mov al, 01
int 10h
int 20h
cseg ends
end start
1. Modify the content of AL with 03. Compare the output of 01 and 03.
2. Modify the bold faced instruction after BLOCK A with the given instructions.
mov ah, 09h
mov al, $
mov bh, 0
mov bl, 61h
mov cx, 8
int 10h
Output:
3 | Page
4 | Page
EXERCISE
NAME:
SECTION:
INSTRUCTOR:
GRADE:
DATE:
*********************
I
WILL
PASS
NCP 311
*********************
Characteristics:
I TEXT: BLUE, BACKGROUND: LIGHT RED
WILL NO ATTRIBUTE
PASS TEXT: RED, BACKGROUND: GREEN
NCP 311 TEXT: RED, BACKGROUND: LIGHT BLUE
EXERCISE
NAME:
INSTRUCTOR:
5 | Page
SECTION:
DATE:
GRADE:
6 | Page
7 | Page
ACTIVITY
NAME:
SECTION:
DATE:
INSTRUCTOR:
GRADE:
1. Create an assembly program that will generate the given series of letters using
LOOP instruction:
AzByCxDwEv
8 | Page
2. Modify the answer in #1. with the given output format. Use only the control
characters to position the cursor
A
z
B
y
C
x
D
w
E
v
9 | Page