Chapter 1
wandering?,
how a program can stay in memory after its execution? . No wonder, C provides
this magic through its library function
keep(unsigned char status, unsigned size)
we
will examine this function later. What happens when a program stays in
memory. The obvious answer is nothing. All other programs run as usual.
But the memory occupied by this program cann't be allocated to other programs
even after its eecution. It stays in memory doing nothing but consuming
a valuable resource. Then why should we have a program which stays in
memory. To answer this it is better to recal what DOS does when we run
a program. The program will be loaded from the disk in to memory and after
its execution it will be removed from memory. Again if we want to run
the program we have to load it, execute it and remove it from memory.
for ordinary oprogram it is the better way to handel. Imagine a situation
in which a program should be executed so many times. In these situation
it is better tokeep the program in memory and execute it whenever it is
required.
Now the question is how to execute this resident program?. To get an answer
to this queston one shoulsd know about interrupts and interrupt vector
table. Next chapter provides these concepts.
|