Add to Favorites    Make Home Page 27596 Online  
 Language Categories  
 Our Services  

Home » C Home » Terminate but Stay Resident (TSR) Home » Flash name of exe com file that is being opened in write mode

A D V E R T I S E M E N T

Search Projects & Source Codes:

Title Flash name of exe com file that is being opened in write mode
Author Nitin
Author Email nitin14312003 [at] yahoo.com
Description this tsr specify names of exe files which are opened in write
mode.
try this beautiful program
Category C » Terminate but Stay Resident (TSR)
Hits 6453
Code Select and Copy the Code
// flash name of exe com file that is being opened in write mode #pragma inline #include <dos.h> #include<bios.h> void interrupt(*old_21)(); void interrupt new_21(unsigned BP_21, unsigned DI_21, unsigned SI_21, unsigned DS_21, unsigned ES_21, unsigned DX_21, unsigned CX_21, unsigned BX_21, unsigned AX_21, unsigned IP_21, unsigned CS_21, unsigned flags_21); char far *scr = (char far *)0xb8000000; int k = 2000, i = 0,j; char filename[50], ch, op[50], *ptr = "open is"; char far *fname; void main() { old_21 = getvect(0x21); setvect(0x21, new_21); keep(0, 1000); } void interrupt new_21(unsigned BP_21, unsigned DI_21, unsigned SI_21, unsigned DS_21, unsigned ES_21, unsigned DX_21, unsigned CX_21, unsigned BX_21, unsigned AX_21, unsigned IP_21, unsigned CS_21, unsigned flags_21) { if(_AH == 0x4b) { fname = MK_FP(DS_21, DX_21); i = 0; while(*fname) { ch = *fname; op[i] = ch; fname++; i++; } op[i] = 0; } if(_AH == 0x3d || _AH == 0x3c) { fname = MK_FP(DS_21, DX_21); i = 0; while(*fname) { ch = *fname; filename[i] = ch; fname++; i++; } filename[i] = 0; strupr(filename); i = 0; while(filename[i] != '.' && filename[i]) { i++; } if((!strcmp(&filename[i+1], "EXE")) || (!strcmp(&filename[i+1], "SYS")) || (!strcmp(&filename[i+1], "COM"))) { //*(scr + 1000) = 'P'; // scr = ptr; if(AX_21 & 3) { //fwrite(39, 1, 1, "file opened is:- "); // fwrite(58, 1, 1, " "); //fwrite(58, 1, 1, op); //printf("%sname is",op); for(j = 0; op[j]; j++) { *(scr + k + j * 2) = op[j]; } k = k + j * 2 + 8; for(j = 0; filename[j]; j++) { *(scr + k + j * 2) = filename[j]; } k = k + j * 2; while((ch = bioskey(0)) != 'y' && ch != 'n') if(ch == 'n') { asm stc; asm pushf; asm pop flags_21; return; } } } } asm pop bp; asm pop di; asm pop si; asm pop ds; asm pop es; asm pop dx; asm pop cx; asm pop bx; asm pop ax; asm jmp cs:_old_21; }

Related Source Codes

Script Name Author
The Game Opposite as seen on Nokia 2300 Mobile Manikanta
RECURSIVE BALANCED QUICK SORT ashish
Radix Sort ashish
Change your mouse pointer Ashim
The blinking star Shashank
Data Validation Crylittlebaby
To search a file by giving file type like mp3 or mpeg or doc Prashanth SR
Menus Demonstration B.Chidhambaram
Employee Database Project Using C. Reenku Raman Nayak
Creating a Lexical Analyzer in c fahad bader al-buhairi դ ? ??
Calendar Program Omkar & Devendra
Stop double Process for start in C Cedrik Jurak
Stop double Process for start in C Cedrik Jurak
Time Scheduler Atiq Anwar
A timepass game between atmost two players Rahul Roy

A D V E R T I S E M E N T




Google Groups Subscribe to SourceCodesWorld - Techies Talk
Email:

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!


ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page

 Advertisements  

Google Search

Google

Source Codes World.com is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions
Copyright ©2003-2019 SourceCodesWorld.com, All Rights Reserved.
Page URL: http://www.sourcecodesworld.com/source/show.asp?ScriptID=617


Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review