🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.micro.pc
Article #8581

Re: Need virtual disk ==> directory program

#8581
From: Jim Frost
Date: Wed, 29 Oct 1986 00:06
41 lines
2751 bytes
In article <3111@wateng.UUCP> mjwingrove@wateng.UUCP (Mike Wingrove) writes:
>
>What I need is a program which maps drive names (existing or virtual) to
>particular directories on a disk (especially a hard disk).  The program would 
>be such that it would stay resident once loaded, and hopefully allow the
>user to specify what directory to map a drive letter to through the use 
>of interactive commands.
>
>I guess this could be considered sort of like an extended DOS assign command.
> [...]
>Has any one heard of anything like this?  
> [...]
>Mike Wingrove

Which version of DOS do you have?  The newer versions (3.1 & 3.2
anyway) have a function built-in that I believe will do this.  I don't
have the manual handy, but try looking up ASSIGN and JOIN.  I know
that there are PD utilities to handle this that were created for
earlier versions of DOS (they *do* intercept one of the INT 21 calls,
usually the OPEN call).  I don't have one handy to email you, but if
you look around on some BBS's they probably have at least one version.

If you really want to create one, wedge your program onto INT 21 and
pass through any function call other than OPEN.  Keep a table of names
and drives that you want substituted inside the program, and just
remake the call with the extended name.  I think that you have to put
the file handle into the FCB after this, but you'll have to
experiment.  I never needed to do this so I never looked.  You'll need
to have your program restore its stacks and things so it can make the
DOS call, otherwise things crash (non-reentrancy sucks).  I really
recommend finding a tested one to use though.

Good luck.
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
                   - Jim Frost * The Madd Hacker -
UUCP:  ..!harvard!bu-cs!bucsb!madd | ARPANET: madd@bucsb.bu.edu
CSNET: madd%bucsb@bu-cs            | BITNET:  cscc71c@bostonu
-----------------------------------+-----------+------------------------
"Use the key, unlock the door                  |    o/ <- Rudolf the
 See what Fate might have in store." -- Rush   |   _O_    waving penguin
Technical Details
Message-ID: <566@bucsb.bu.edu.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!husc6!bu-cs!bucsb.bu.edu!madd
References: <3111@wateng.UUCP>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!husc6!bu-cs!bucsb.bu.edu!madd
From: madd@bucsb.bu.edu.UUCP (Jim Frost)
Newsgroups: net.micro.pc
Subject: Re: Need virtual disk ==> directory program
Message-ID: <566@bucsb.bu.edu.UUCP>
Date: Tue, 28-Oct-86 19:06:04 EST
Article-I.D.: bucsb.566
Posted: Tue Oct 28 19:06:04 1986
Date-Received: Wed, 29-Oct-86 02:43:50 EST
References: <3111@wateng.UUCP>
Reply-To: madd@bucsb.bu.edu.UUCP (Jim Frost)
Distribution: net.micro.pc
Organization: Boston Univ Comp. Sci.
Lines: 41
Keywords: virtual, directory