Lab9 BIOS Services-1
Lab9 BIOS Services-1
0CH Display a selected color (background and palette) in graphics mode. Set the registers
as:
AL: Color of the pixel CX: Column
BH: Page number DX: Row
0DH Read pixel dot to determine its color value. For this set page number in BH, column
in CX, and row in DX. The operation returns the pixel color in AL.
0EH Monitor is used as a terminal for simple displays in test and graphics modes. For this
set AL by the character to display, and BL by the foreground color.
0FH Get current video mode. The operation returns the values as:
AL: Current video mode AH: umber of screen columns
BH: Active video page
Assignments:
1. Write an assembly language program to read a string (having 60 characters at max.) as an input
from the user, and display the string at the center of the clear screen.
2. Write an assembly language program to scroll a window from row 5, column 20 to row 20,
column 60 with a reverse video attribute. Then locate the cursor at row 12, column 30. And
display a string as “Programming in Assembly Language is Fun”.
3. Write an assembly language program that takes a string (having 24 characters at max.) from the
user and display each character at the center of each line.
4. Write an assembly language program that takes a string (having 14 characters at max.) as an
input from the user and scrolls a window of size 20×20 at the center of the screen. Then display
the string at the center of the scrolled window. (You can choose the color attribute yourself).
5. Write a program that reads a string from the user and displays each word in a new line
diagonally from upper left towards bottom right in a clear screen. If the string is “Programming
in Assembly Language is Fun”, it should be displayed as:
Programming
In
Assembly
Language
is
Fun
***