Write a TSR Program: Changing the Background Color

In summary, to change the background color using a TSR program, you will need to use interrupt 10h, subfunction 06h which allows you to set the background color by passing in the desired color value to the AH register. This can be done for any of the 16 available colors in the VGA color palette, but the program will only work on systems with a VGA display and for applications that use the BIOS for screen output. To write a TSR program, you will need basic knowledge of assembly language, a text editor, and an assembler program. The TSR program can continue to run in the background and change the background color for multiple running programs, as long as they use the BIOS for screen output. However, if a program
  • #1
bc030400412
9
0
Write a TSR program that changes the background color of the screen to red every 5 second and then white next 5 second, And this continues until you press ‘Q’ It should not modify the text displayed on the screen.

Hint:

1_ Intercept Keyboard interrupt (0x09H)
2_ Use video text memory address 0xB000000H
3_ Use timer interrupt.

Note: submit .C files only.
 
Physics news on Phys.org
  • #2
i need System programming

hii
i need the assign of system programming. if u done it so pleasez send me. i m waiting ur reply.

life_fast@hotmail.com
Allah Hafiz.
 
  • #3


I find this TSR program to be a creative and efficient way to change the background color of the screen without altering the text displayed. By intercepting the keyboard interrupt and using the video text memory address, the program is able to continuously change the background color every 5 seconds as desired.

Using the timer interrupt is a clever way to keep track of the 5-second intervals and switch between the colors accordingly. This allows for a smooth and seamless transition between the red and white backgrounds.

I appreciate the use of comments and the inclusion of a hint to guide others who may want to try this program. It shows consideration for others and encourages collaboration and learning.

Overall, this is a well-written and well-designed TSR program that effectively achieves its goal. Thank you for sharing your work.
 

1. How can I change the background color using a TSR program?

To change the background color using a TSR (Terminate and Stay Resident) program, you will need to use interrupt 10h, subfunction 06h. This interrupt allows you to set the background color by passing in the desired color value to the AH register.

2. Can I change the background color to any color I want?

Yes, you can change the background color to any of the 16 available colors in the VGA color palette. These colors include black, blue, green, cyan, red, magenta, brown, light gray, dark gray, light blue, light green, light cyan, light red, light magenta, yellow, and white.

3. Do I need any special software or tools to write a TSR program?

To write a TSR program, you will need to have a basic understanding of assembly language and a text editor. You will also need an assembler program to convert your code into a machine-readable format. Some common assembler programs include NASM, TASM, and MASM.

4. Are there any limitations to changing the background color using a TSR program?

One limitation of changing the background color using a TSR program is that it will only work on systems with a VGA (Video Graphics Array) display. Additionally, the background color will only change for applications that use the BIOS (Basic Input/Output System) for screen output.

5. Can I change the background color while running multiple programs?

Yes, you can change the background color while running multiple programs. The TSR program will continue to run in the background and change the background color for any new applications that use the BIOS for screen output. However, if a program is already running and does not use the BIOS for screen output, the background color will not change until the program is restarted.

Similar threads

  • Engineering and Comp Sci Homework Help
Replies
22
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
7
Views
2K
  • Programming and Computer Science
Replies
1
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
2
Views
3K
  • Engineering and Comp Sci Homework Help
Replies
10
Views
2K
  • Engineering and Comp Sci Homework Help
Replies
3
Views
2K
Replies
10
Views
951
  • Computing and Technology
Replies
4
Views
1K
  • Programming and Computer Science
3
Replies
89
Views
4K
  • Engineering and Comp Sci Homework Help
Replies
8
Views
6K
Back
Top