Sunday 9 March 2014

Write a program to interchange the Small and Capital Letters.




Code for Program to interchange the Small and Capital Letters in C Programming

 # include <dos.h>


 void interrupt (*OldInterruptFunction)( );
 void interrupt NewInterruptFunction( );


 int main( )
 {
    OldInterruptFunction=getvect(0x17);
    setvect(0x17,NewInterruptFunction);

    keep(0,(_SS+(_SP/16)-_psp));

    return 0;
 }

 /*************************************************************************///---------------------  NewInterruptFunction( )  -----------------------///*************************************************************************/void interrupt NewInterruptFunction( )
 {
    if(_AH==0x00)
    {
       if(_AL>='a' && _AL<='z')
      _AL-=32;

       elseif(_AL>='A' && _AL<='Z')
      _AL+=32;
    }

    (*OldInterruptFunction)( );
 }

No comments:

Post a Comment