A few years ago I started with programming. At that stage I was programming in Clipper 5.2c. That was in the old days of the 80286 computers. At that stage 1Mb of ram and a 40 megabyte hardrive was state of the art, everybody used DOS and monochrome screens was at the order of the day.
One day my manager showed me that a application developed in Clarion had a built in screensaver. Clarion was a development system that uses a specification type of language. My manager showed me that since most of the users used the same application, screens used to suffer from screenburn. You could see the ghost image of the main screen of a application on the screen even when it was switched off.
I was asked to build a screensaver into my application. I found that a impossible task to complete. I knew a little of assembler but not enough to accomplish the task. I knew what I had to do is to develop a TSR (Terminate and Stay resident) type of application. The editor Sidekick used to be like that. I knew I had to write a type of application that would be loaded in memory with my Clipper application. This application then would have to monitor the keyboard and do a type of time count from the moment no keys are pressed, after a certain amount of time without keyboard activity this application then would have to take over the screen and place random characters like asterisks and fullstops on the screen at random intervals with a random pattern.
I knew I had to write some type of Interrupt handler and that I would have to store the state of the registers on the stack, run the screensaver app and as soon as a key is pressed again restore the registers to the state they were in to continue running the Clipper application.
I believe the IN function should be used to monitor the port from which keyboard input is received.
I do not know how to write a Interrupt handler, I do also not know what port is used by the keyboard and the mouse. If you you pop the registers can you restore it on the stack? How do you do that?
This matter has been outstanding for a few years now, at that stage it gave me sleepless nights.
Can you help me to resolve this issue and put it to rest.