Solved

locking

Posted on 2004-04-27
5
219 Views
Last Modified: 2010-04-15
I am using turboc 2.0 and I want to lock floppy drive.
0
Comment
Question by:mdamjad
5 Comments
 
LVL 2

Expert Comment

by:anupvijay
Comment Utility
I assume that your OS is DOS.
What does the LOCK command do on DOS ? Is that what you are looking for?

Cheers.
0
 
LVL 2

Expert Comment

by:Avik77
Comment Utility
I think u wan't to lock the device and not allow other processes to access it. But in that case u have to run the locking program as a background job. DOS is not multiprogrammable, in that case u need to go for TSR approach. It is impossible to give u the code but I recommend u to visit
http://amitmathur.8m.com/resources/article4.html

Do not misuse it :-)

Avik.
0
 
LVL 9

Expert Comment

by:ankuratvb
Comment Utility
This has what you require,enabling/disabling the floppy drive using Turboc code:
http://c.ittoolbox.com/code/d.asp?d=2042&a=s
0
 
LVL 10

Expert Comment

by:Mercantilum
Comment Utility
Nice shot ankura,

Turbo C 2.0 still alive?? I was using the 3.0 a few hundred years ago :)
0
 
LVL 9

Accepted Solution

by:
ankuratvb earned 125 total points
Comment Utility
>Turbo C 2.0 still alive?? I was using the 3.0 a few hundred years ago :)
Yeah.Its available for free from the Borland Museum.

I still have the 3.0 version.It was a pretty good compiler.

mdamjad,
You say you need code without asm.
well,to do this sort of thing in dos,you will have to use dos interrupts(which is what the link i posted does).
Even if a compiler does(i dont think any compiler does) offer you a library function for this,it,too would probably be using dos interrupts.

0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Preface I don't like visual development tools that are supposed to write a program for me. Even if it is Xcode and I can use Interface Builder. Yes, it is a perfect tool and has helped me a lot, mainly, in the beginning, when my programs were small…
Windows programmers of the C/C++ variety, how many of you realise that since Window 9x Microsoft has been lying to you about what constitutes Unicode (http://en.wikipedia.org/wiki/Unicode)? They will have you believe that Unicode requires you to use…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use while-loops in the C programming language.

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now