?
Solved

locking

Posted on 2004-04-27
5
Medium Priority
?
225 Views
Last Modified: 2010-04-15
I am using turboc 2.0 and I want to lock floppy drive.
0
Comment
Question by:mdamjad
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 2

Expert Comment

by:anupvijay
ID: 10929345
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
ID: 10930970
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
ID: 10932356
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
ID: 10940840
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 375 total points
ID: 10947806
>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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
The goal of this video is to provide viewers with basic examples to understand and use conditional statements in the C programming language.
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
Suggested Courses

777 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