[comp.os.cpm] CP/M Directory Entries

SAGE@LL.ARPA (03/14/88)

Local Cc: SAGE
Message-ID: <SAGE.07442362@LL.ARPA>

his is the classic problem of logical vs physical.  In one case
extent' is used to refer to the contents of one directory entry (32K or
56 logical records -- physical records probably only 32 or 64!).  The
ogical extent is always 16K, and thus there can be two logical extents
n one physical extent, just as there can be 2 or 4 or 8 logical records
128 bytes) in each physical record.  The extent number in the directory
ntry is the number of the last extent in that directory, and the record
ount is the number of logical records in that last extent.  With larger
lock sizes on a hard disk it is quite possible to have 4 or probably
ven 8 logical extents per physical extent.  The same rules apply.
 

Mike_W_Ryan@cup.portal.com (04/05/88)

Speaking of CPM directories....

Does anyone know of a PD utilty to hide/unhide files on CPM?

mwilson@crash.cts.com (Marc Wilson) (04/06/88)

In article <4314@cup.portal.com> Mike_W_Ryan@cup.portal.com writes:
>
>Does anyone know of a PD utilty to hide/unhide files on CPM?

     Sure.  In fact, if you have a CP/M system, you already have it.

     It's called 'STAT.'

     Like this...

A0:BASE>stat <filename> $sys			; will make it vanish

A0:BASE>stat <filename> $dir		   ; will make it re-appear

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Marc Wilson
     ARPA: ...!crash!mwilson@nosc.mil
           ...!crash!pnet01!pro-sol!mwilson@nosc.mil
     UUCP: [ cbosgd | hp-sdd!hplabs | sdcsvax | nosc ]!crash!mwilson
     INET: mwilson@crash.CTS.COM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

chad@anasaz.UUCP (Chad R. Larson) (04/09/88)

In article <4314@cup.portal.com> Mike_W_Ryan@cup.portal.com writes:
>Speaking of CPM directories....
>
>Does anyone know of a PD utilty to hide/unhide files on CPM?

Unless I completely misunderstand your question, you don't need any PD
utilities.  Under CP/M 2.x use "stat filename.typ $sys" and under CP/M
3.x use "set filename.typ[sys]".  You may use wildcards in either file
spec.  These commands set the system attribute in the directory entry
which makes the file not appear in directory listings.  You may reset
the bit with "stat filename.typ $dir" or "set filename.typ[dir]".
Other attributes that may be manipulated are read-only/read-write and
the "archived" bit.

In addition, under CP/M 3.x, files in user area 0 with the system
attribute may be opened in read-only mode by programs running in any
user area.  Makes a good way to stash all your .com files.
	-crl
---------------
"I read the news today, oh boy!"  --John Lennon
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| DCF, Inc.               | UUCP: ...noao!mcdsun!nud!anasaz!dcfinc!chad |
| 14623 North 49th Place  | Ma Bell: (602) 953-1392                     |
| Scottsdale, AZ 85254    | Loran: N-33deg37min20sec W-111deg58min26sec |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|         Disclaimer: These ARE the opinions of my employer!            |
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Mike_W_Ryan@cup.portal.com (04/17/88)

Thanks to all who responded with the suggestion of using STAT to
unhide files. But now another problem. The darn file names have
lower case letters. It seems the command interpreter (CCP?) converts
to upper case. My choices? Patch the CCP? Or patch my directory entries?

mwilson@crash.cts.com (Marc Wilson) (04/18/88)

In article <4544@cup.portal.com> Mike_W_Ryan@cup.portal.com writes:
>Thanks to all who responded with the suggestion of using STAT to
>unhide files. But now another problem. The darn file names have
>lower case letters. It seems the command interpreter (CCP?) converts
>to upper case. My choices? Patch the CCP? Or patch my directory entries?

     How did you create them?  With BASIC?  Microsoft's 'wonderful"
BASIC will allow you to create lower case filenames... why, I don't know.

     You have two possibilities:

		1) Rename the files ( which may be easier )
		2) Use a program that does *not* require input from
		   the command line.

     If you're going to try #2, I suggest NSWP.  It should have no problem
with the lower case name.  One moment, while I check...

     OK, NSWP *does* know what to do with the filename.  The "F"ind 
command won't locate it in the list ( probably due to the fact that
it's capitalizing it's input ), but if you step along to it, and "T"ag
it, then use the "Y" command to set its SYStem attribute, you can make it
disappear.

     'Nuff said.

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Marc Wilson
     ARPA: ...!crash!mwilson@nosc.mil
           ...!crash!pnet01!pro-sol!mwilson@nosc.mil
     UUCP: [ cbosgd | hp-sdd!hplabs | sdcsvax | nosc ]!crash!mwilson
     INET: mwilson@crash.CTS.COM
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cwwj@ur-tut (Clarence Wilkerson) (04/18/88)

In article <4544@cup.portal.com>, Mike_W_Ryan@cup.portal.com writes:
> Thanks to all who responded with the suggestion of using STAT to
> unhide files. But now another problem. The darn file names have
> lower case letters. It seems the command interpreter (CCP?) converts
> to upper case. My choices? Patch the CCP? Or patch my directory entries?

 I suggest you patch the directory entries. MBASIC also allowed lower 
case file names. If you have MBASIC, you might try
NAME "oldfile" AS "newfile"
to change the file name! At last, a use for BASIC.....

Mike_W_Ryan@cup.portal.com (04/20/88)

It seems the simplest way to deal with the lower case file names is to
use MBASIC to rename it. It is an isolated case and shouldnt be
encountered frequently for me. Thanks to all who responded.