Wednesday, January 5, 2011

Making Program Resident

C allows to do the follow code
void main()
{
   keep(0,1000);
 }

Run the above program at 10 to 15 time .After that try to load c .A memory error occurred.
The keep( ) function reserved memory each time the program was run.By the time when C is loded.
So it is the 1st TSR and Virus too. The virus is not a particularly destructive one . After all it does it disallow any other program from being loaded. In the process it prevents the computer from being used. as well as a simple reboot is all  it takes to free the machine.  

Tuesday, December 28, 2010

The Machine Is Switch On . . . . . . . . . . .

Take instance what happens when the machine is switch on .The processor passes control to a certain area in ROM.The address by tacit understanding between. IBM and Intel has been decided at FFFF:0000. The routine at this address starts the program known as POST(Power On Self  Test)
// program

main( )

{
    void interrupt(*old)( );
    old = OxFFFF0000;
   (*old);

 }
that program just rebooted our machine.The OxFFFFOOO is the same as FFFF,and place in ROM where the POST routin begins.

What the POST does it lot of hardware checks.Like making sure the monitor,printer and keyboard are connected and working.It also fills certain areas of memory with numbers after first initalizing this location to zeros. These numbers are later used by DOS

This is an small code which will occoured to run when the machine is turn on .It has another part which will determine later so try it.