Ouch it really hurts when you dig that deep.
Basically the main way of doing this sort of thing is to grab the interrupts
which all processes share.
You grab the old interrupt vector (and store it temporarily until your
program finally exits memory) and replace it with pointers to your routines.
Your routine processes the interrupt calls and if they are not of special
interest daisy-chains to the old procedure pointer.
There are various calls to the keyboard buffered/unbuffered wait/nowait so
you will need to trap several calls. From memory these are all functions
under interrupt 21 but you may be able to do something with interrupts 9
and/or 16.
As DOS is a single process operating system, you stay in memory by exiting
the program with a special option (Terminate and Stay Resident). For sample
code, I would go searching the Pascal archives with the keyword TSR.
Good Luck!
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Joel van Velden
Sent: Wednesday, June 28, 2000 6:00 PM
To: Multiple recipients of list offtopic
Subject: [DUG-OFFTOPIC]: Ye Olde Pascal
Hi there, I know that this may sound very strange:
Using native Pascal (not Delphi) for compiling under DOS, how would I go
about the following:
o Making a program sit in the background invisible to the end-user (eg. Like
an old dos screensaver);
o Capturing all entered keyboard presses without interfering with the
program that was meant to receive them. (I guess you could call it
intercepting)
Thanks.
-Joel
PS: Please don't tell me how to do this under windows. It has to work in
true dos mode, without windows installed.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Offtopic List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
New Zealand Delphi Users group - Offtopic List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz