[fa.info-cpm] Directory Utility in BDS C for CP/M 2.x

C70:info-cpm (07/14/82)

>From FJW@Mit-Mc Tue Jul 13 23:36:22 1982
Date: 13 Jul 1982 at 1635-CDT
From: awd at UTEXAS-11
Re:   Directory Utility in BDS C for CP/M 2.x

AR36:CPM;CDIR C on MC:
--------------------

	CDIR.C - A CP/M 2.2 utility that allows operators to switch
between user numbers by specifiying a name, rather than a number. This
has the effect of simulating sixteen named directories in a convenient
manner.

	When used in conjunction with ZCPR, and DUPUSR, CDIR can make
CP/M a lot more livable until an operating system with a nice
directory structure arrives.

	CDIR.C - (C) 1982 by Barry A. Dobyns.
	Commercial use (sales) of this program is prohibited,
	however, private use by individuals is encouraged.

[Details can be found in front of the source file itself - FJW]

[FJW - Other comments from Barry:]

	As best as I can determine, CP/M loses the user number set from
within an application program iff the program terminates with a warm
boot instead of a ret. In other words, in the code below, the program
on the left leaves one in user 15, as expected. The program on the
right leaves one in whatever the previously selected user area was.

          ;I win                        ;I lose
          ;                             ;
          org  100H                     org  100H
          mvi  c,32                     mvi  c,32
          mvi  e,15                     mvi  e,15
          call 5                        call 5
          ret                           jmp  0

	Anyone know why?? Therefore, CDIR must be run over with NOBOOT so
that it returns and does not boot, otherwise it isn't very useful.