From: utzoo!decvax!harpo!npoiv!npois!ucbvax!C70:info-cpm Newsgroups: fa.info-cpm Title: [awd: Directory Utility in BDS C for CP/M 2.x] Article-I.D.: ucb.1506 Posted: Tue Jul 13 23:36:56 1982 Received: Wed Jul 14 05:52:26 1982 >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.