Re: Somewhat confused with Interrupts/TSRs

Mike McCarty
2007-11-30T18:41:38Z

> Hello people.
>
> I accepted the task of trying to get a very old datalogging program
> working for a friend. It is needed to read an older sensor, and
> apparently no other software is available.
>
> It's a bit large (170 kB exe) to disassemble completely, but cursory
> investigation shows it was written in Turbo Pascal. Apparently the CRT
> unit was included, which makes executable use internal keyboard access
> instead of MsDOS functions.
>
> All this is important, because I want to simulate keypresses and the TSR
> doesn't seem to work with any CRT using Pascal program.

I don't understand this statement. Do you mean that there is another
TP program which uses the CRT module and which must run with this
TSR, but does not?

> I followed the program to be using Int16 for key input, which probably
> explains why no Int28 or Int1C calls are made anymore (needed for the
> TSR to work)...

I also don't follow this. The Int16 BIOS calls don't disturb the
clock interrupts, AFAIK. I've used them many times.

> I tried to follow where 16h goes to, but, using debug in DOSemu, this
> leads to a HLT instruction...

Sounds like the TSR may be trying to guard itself against debug. I wrote
some device drivers 'way back on contract, and the people I worked
for wanted to prevent them from running when debug was being used.

> Does anyone know of this (TSR) problem or can anyone suggest a solution?

You could try stuffing the BIOS type-ahead buffer. Is there a reason
you don't have source? Also, ISTM that you may have uncovered
an incompatibility. Are you running actual MSDOS, or freedos?
You might try running actual MSDOS rather than freedos, still
using dosemu.

Mike