Hello staff, I have a program to Paschal that when he starts allocates the message "one more" open a window of DOS.
When the program runs, is writing this message on the screen until you do not overthrow, is there.
I need to implement this same routine another routine to take the program from memory.
Someone could help me?
It follows the routine below:

{$M 2000, 0, 10}
program relogio;
uses crt,
dos;

var
ticks: byte;
anterior: pointer;

procedure ticktick; interrupt;
begin
inc(ticks);
if ticks = 18 then
begin
write('Mais um');
ticks := 0;
end;

end;
begin
ticks := 0;
GetIntVec($1C, anterior);
SetintVec($1C, Addr(ticktick));
keep(0); {mantem a instrucao alocada no SO}
end.

Usually a TSR will override one of the user interrupts (like $60) so that you can communicate with it (and, for example, tell it to stop).

If I remember correctly, once you load a TSR you cannot unload it, but you can disconnect it by restoring the interrupt vectors to their original values.

The only other way to stop it is to reboot.

Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.