Professional Documents
Culture Documents
Input/Output Lab2: I/O Service Codes
Input/Output Lab2: I/O Service Codes
Objectives:
In this lab you will be introduced to the basic Input and Output (I/O) operations using
assembly language. Note that different service codes/ functions (an integer constant) are used
for input and output of values of different data types in order to access the keyboard and
video display.
Table-1 summarizes the main I/O service codes (functions). These service codes are mainly
used to read a character, a string, word (32 bit integer), float and double type value from the
keyboard, which could be an input data to a program, and display as output of a program.
Sample output:
TASK 2:
Write an assembly language program that prompts the user to input your semester
number.
Sample output:
TASK3:
Write an assembly language program that prompts the user to input your complete
registration number.
Sample output:
.
TASK 1:
Write an assembly language program that prompts the user to print first three characters
of your name separately. Print them all the three letter entered again
Sample output:
TASK 2:
Write an assembly language program that prompts the user to accept input at run time and
output your semester number.
Sample output:
Enter your semester: SP12
Your semester number: SP12
TASK3:
Write an assembly language program that prompts the user to take run time input and
print your complete registration number.
Sample output:
TASK4:
Write an assembly language program to a) Read three initials b) Display them in the
middle of 11 X 11 box of asterisks.