Sie sind auf Seite 1von 6

COMPUTER ENGINEERING DEPARTMENT

Computer Systems Organization and Architecture Manual

ACTIVITY 4: Character Input and Password Protected Program

4.1 Program Outcomes (POs) Addressed by the Activity


a. ability to apply knowledge of mathematics and science to solve engineering
problems
b. ability to design and conduct experiments, as well as to analyze and interpret data
c. ability to design a system, component, or process to meet desired needs within
realistic constraints such as economic, environmental, social, political, ethical, health
and safety, manufacturability, and sustainability, in accordance with standards
d. ability to identify, formulate, and solve engineering problems
e. ability to use techniques, skills, and modern engineering tools necessary for
engineering practice.
f. knowledge and understanding of engineering and management principles as a
member and leader in a team, to manage projects and in multidisciplinary
environments

4.2 Activity’s Intended Learning Outcomes (AILOs)


At the end of this activity, the student shall be able to:
a. Classify the different input service function call
b. Discuss the function of the Service Function call 01H, 07H & 08H of INT 21H
c. Discuss the function of the Service Function call 02, INT 10H
d. Apply and demonstrate the use of the Service Function Call 01H, 07H & 08H of INT
21H in assembly language.

4.3 Objectives of the Activity


The objectives of this activity are to:
a. To be able to compare the three character input services of INT 21h.
b. The students should be able to create character input and password protected
program.

4.4 Principle of the Activity


INT 21 Function 01H: Keyboard Input with Echo. This operation accepts a
character from the keyboard buffer or, if none is present, waits for keyboard entry.

ACTIVITY 4: CHARACTER INPUT AND PASSWORD PROTECTED PROGRAM 1


INT 21 Function 07H: Direct Keyboard Input without Echo. This peration works
like function 01H, except that the entered character does not echo on the screen and the
operation does not respond to a Ctrl-Break request. It could be used to key in a password
that is to be visible.
INT 21 Function 08H: Keyboard Input without Echo. This operation works like
function 01H, except that the entered character does not echo on the screen.

4.5 Materials/Equipment

1 unit Personal Computer


DOS / Command Prompt
Text Editor (SK, Notrepad, Wordpad)
Assembler (TASM.EXE)
Linker (TLINK.EXE )
Storage unit

4.6 Circuit Diagrams / Figures / Source Codes (if Applicable)

Figure 1. Title

4.7 Procedure/s

1. Write the following program using SK’s notepad as your text editor using the filename
sam4.asm

.model small
.code
org 100h
start:
mov ah,1
int 21h
mov dl, al
add dl, 20h
mov ah,2
int 21h
int 20h

ACTIVITY 4: CHARACTER INPUT AND PASSWORD PROTECTED PROGRAM 2


end start

2. Execute the given program. Write the outputs for the following inputs.

SAM4.ASM

X - Xx
R - Rr
D – Dd

3. Modify the program, use service 8 instead of service 1. Execute the program using the
same input. Write down your observation.

There will be no echo and no respond to Ctrl + Pause/Break function

4. Replace service 8 by service 7. Execute the program using the same input. Write down
your observation.

There will be no echo, but responds to Ctrl + Pause/Break function

4.8 Activity Report

Section: Date Performed:

Course Code: Date Submitted:

Course Title:

Instructor:

Group No.: Activity No.:

Student Name (LN, FN MI) Signature:

ACTIVITY 4: CHARACTER INPUT AND PASSWORD PROTECTED PROGRAM 3


4.8.1 Data and Results

1. Given the sample output coming from your instructor, write down and compile the
required program that will provide the expected sample output using expt4.com as
the filename.

cpre.asm

2. Encode the program.

3. Ask your instructor to check your work

4. Save the program to your data disk.

5. Compare the character input services of INT21h (service 1, 7 and 8).

Service 1 give a output in echo and responds in CTRL + pause/break, Service 8 no


echo, but responds to Ctrl + Pause/Break function and Lastly Service 7 no echo and
no respond to Ctrl + Pause/Break function

6. Give an application for which service 1 of INT 21h is advantageous to service 7 of


INT 21h.

Service 1 can have both echo and Ctrl + pause/break Output but Service 7 doesn’t
have output in both function

7. Why is service 8 of INT 21h suited for a password program?


Using service 8, while inputting password there will be no output can be seen.

ACTIVITY 4: CHARACTER INPUT AND PASSWORD PROTECTED PROGRAM 4


4.8.2 Calculations

4.8.3 Observations (if applicable)

Character Input and Password Protected Program Activity helps us to learn the difference
of mov ah, 1 int 21h “service 1” to mov ah, 7 int 21h “service 7” and mov ah, 8 int 21h
“service 8”

4.8.4 Conclusion/s

I conclude in this laboratory activity that using mov ah, 8 int 21h is more suitable in using
password protected programs because it doesn’t output echo.

ACTIVITY 4: CHARACTER INPUT AND PASSWORD PROTECTED PROGRAM 5


4.8.5 Rating (include Rubric)
Criteria Grade

Activity Conduct (1-5)

Correctness of Command(s)/Program(s) (1-5) x 2

Completeness of Tasks (1-5)

Data Analysis and Results Interpretation (1-5)

Total Score

Mean Score = (Total Score / 5)

Percentage Score = (Total Score/25) * 100


Other Comments:

ACTIVITY 4: CHARACTER INPUT AND PASSWORD PROTECTED PROGRAM 6

Das könnte Ihnen auch gefallen