NASM Assembly language code needed

i m giving you an very interesting problem.
i m also trying to solve it.
here is the problem.....

""Write a Terminate and Stay Resident program in Assembly language to change the background color of DOS-screen after every ten seconds. You will need to hook timer interrupt (real time interrupt) for this purpose.""

Solve it with code.


  • I don't think anybody here will do the problem for you -- you'll need to ask a more specific question. Do you need help with TSR's, timers, video screens, interrupts, ASM in general, or something else?
  • Hi..
    Yes sir i need help in TSR coding..while having the given problem on the above msg. i want to know how you will code it using NASM assembly language. ofcourse TSR is the technique used in Assembly language.

    But for now you just need to tell me what is the code or changing Dos screen color black and then green after every 10 second.i know that This interrupt is getting called 18.2 times per second, so you need to
    count number of times it will be getting called. When it counted 182 times - that means
    that 10 seconds is passed and you need to change the DOS desktop color.
    but i need code for further satisfaction.
  • There are several example TSR "skeleton" programs out there to help you get started writing a TSR. Here is one, though it's written for MASM rather than NASM. I'm sure there are examples out there for NASM as well, but I don't know where they would be.

    For your program, you'll need to hook INT 08, the timer interrupt that occurs 18.2 times a second.

    I'm not aware of a single command that will change the color of the entire screen at one time. You'll need to set up a loop that changes each individual character. You could do it with INT 10h (Video BIOS) functions, but that is probably too slow to use in a TSR. I would directly modify video memory rather than using the Video BIOS.

    I suggest you start writing your own code, and if you're having problems getting a particular section to work, post it here for some help. You should also have access to Ralf Brown's Interrupt List -- it's an indispensible resource for stuff like this. There are both on-line and downloadable versions of the List, you can just Google "Ralf Brown" and find what you need.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion