zpm3 on RomWBW: no "user" command

292 views
Skip to first unread message

Edgar Salgado

unread,
Apr 8, 2023, 4:10:06 PM4/8/23
to retro-comp
Hello,

I am trying to access other user directories with the USER command, but it appears it is not available on the ZPM3 distribution for RomWBW?

I tried looking for USER.COM on the RomWBW site but I did not find it...

When I run USER, command is not found:
USER ?

How can I change the "directories"? :)

Thanks,

Wayne Warthen

unread,
Apr 8, 2023, 5:21:15 PM4/8/23
to retro-comp
The "USER" command is a built-in command in CP/M 2.2 and CP/M 3.  ZPM3 does not implement this command; instead, it allows you to switch user areas using the format "n:" where n is the user area.  For example, you you type "15:", you will see ZPM3 switches to user area 15.

Thanks,

Wayne

Edgar Salgado

unread,
Apr 9, 2023, 11:13:03 AM4/9/23
to retro-comp
Thanks Wayne, I tried and it works.

However, it does not behave like expected in the CPM3 user manual, where I should be able to run programs under the current user.

17:07 A1>2:
17:07 A2>dir

Scanning Directory...

Sorting  Directory...

Directory For Drive A:  User  2

    Name     Bytes   Recs   Attributes      Name     Bytes   Recs   Attributes
------------ ------ ------ ------------ ------------ ------ ------ ------------
2PIOTST  COM     4k      9 Dir RW       BANKTEST COM     4k      7 Dir RW
DMAMON   COM     4k     28 Dir RW       I2CLCD   COM     4k      7 Dir RW
I2CSCAN  COM     4k      6 Dir RW       INTTEST  COM     4k      9 Dir RW
KBDTEST  COM     4k      9 Dir RW       PIOMON   COM     4k     25 Dir RW
PORTSCAN COM     4k      8 Dir RW       PPIDETST COM     4k     27 Dir RW
PS2INFO  COM     8k     39 Dir RW       RAMTEST  COM     8k     34 Dir RW
RTCDS7   COM     4k      9 Dir RW       RZ       COM     8k     46 Dir RW
SZ       COM     8k     61 Dir RW       TSTDSKNG COM     4k     16 Dir RW
VDCONLY  COM    12k     93 Dir RW       VDCTEST  COM    12k     94 Dir RW
Z80CCF   COM    16k    116 Dir RW       Z80DOC   COM    16k    112 Dir RW
Z80DOCF  COM    16k    112 Dir RW       Z80FLAGS COM    16k    112 Dir RW
Z80FULL  COM    16k    112 Dir RW       Z80MPTR  COM    16k    112 Dir RW

Total Bytes     =    200k  Total Records =    1203  Files Found =   24
Total 1k Blocks =    159   Used/Max Dir Entries For Drive A:  249/ 512

17:07 A2>ps2info
PS2INFO ?
17:09 A2>

It does work, however, if I do what zcpr3 manual says, to run a program using the user prefix:

17:11 A2>2:ps2info

PS/2 Keyboard/Mouse Information v0.6a, 2-Apr-2022

PS/2 Controller Port Options:

  1 - MBC
  2 - RHYOPHYRE
  X - Exit Application

Selection?


I guess I will try to find the config file to set the path to also accept current user directory :)

Thanks,
Edgar

Wayne Warthen

unread,
Apr 9, 2023, 3:25:30 PM4/9/23
to retro-comp
Yeah, all of this is as intended by ZPM3.  I admit it is very confusing because ZPM3 is a Frankenstein combination of CP/M 3 and ZCPR3.  It is very powerful, but there are situations (like this one) where the behavior of CP/M 3 and ZCPR3 are different.  Since ZPM3 was never properly documented, you will need to experiment in these cases.

To address this specific behavior, if you look at the default search path for CP/M 3 (SETDEF), you will see that it is merely the current drive/user.  However, if you look at the default search path for ZPM3 (SETPATH), you will see that the current drive/user is not in the search path.  You will need to add "$$" to the search path in ZPM3 to cause it to search the current drive/user:

12:20 A0:SYSTEM>setpath

SETPATH, Version 1.1 (Type 3 at 0100H)

  Symbolic     DU        DIR

     $0:       A0:       SYSTEM:
     A15:      A15:      ROOT:
     A0:       A0:       SYSTEM:

12:20 A0:SYSTEM>setpath /a $$

SETPATH, Version 1.1 (Type 3 at 0100H)

  Symbolic     DU        DIR

     $0:       A0:       SYSTEM:
     A15:      A15:      ROOT:
     A0:       A0:       SYSTEM:
     $$:       A0:       SYSTEM:

12:21 A0:SYSTEM>


Thanks,

Wayne

Joao Miguel Duraes

unread,
Feb 6, 2025, 2:05:22 AM2/6/25
to retro-comp
Thanks Wayne - learned something new again today.

As an add-on, how do we make this addition persist across reboots? In other words, what's the "AUTOEXEC.BAT" for ZPM3? 

I read that we need to customise STARTZPM.COM using ZCPR, but my 3.5.0 beta2 doesn't seem to like it:

05:47 A0:SYSTEM>zcpr
ZCPR ?
05:48 A0:SYSTEM>

Thanks

Wayne Warthen

unread,
Feb 6, 2025, 12:48:40 PM2/6/25
to retro-comp
Hmmm... I must have misspoke in a prior post.  STARTZPM.COM is an "alias" file that if run automatically when ZPM starts.  You can view/modify alias files such as STARTZPM.COM using the SALIAS command which is included in the RomWBW ZPM disk image.

Thanks, Wayne

Joao Miguel Duraes

unread,
Feb 6, 2025, 7:06:52 PM2/6/25
to retro-comp
Thank you so much Wayne. As it turns out, $$ was already in my SETPATH on STARTZPM.COM, so I'm not sure whatr I was on about :-)

But again, learning all the time.

Cheers.

Wayne Warthen

unread,
Feb 6, 2025, 7:22:54 PM2/6/25
to retro-comp
Well, actually, there may be something going on there that I don't understand.

I checked and my STARTZPM also has a SETPATH with "$$" as the first path.  However, once the boot is complete, if I run SETPATH from the command prompt, it shows that the first path is "$0", not "$$" as expected.

If I rerun SETPATH from the command prompt and specify "$$", then it seems to work correctly ("$$" is in the first path).

  I can't explain this.

Thanks, Wayne

Joao Miguel Duraes

unread,
Feb 6, 2025, 7:28:30 PM2/6/25
to retro-comp
Yes, I was just about to say the same.

And check this out:

00:26 C13>setpath


SETPATH, Version 1.1 (Type 3 at 0100H)

  Symbolic     DU        DIR

     $0:       C0:       Noname:

     A15:      A15:      ROOT:
     A0:       A0:       SYSTEM:
     $0:       C0:       Noname:

It shows C0: even though I'm in C13:

Bizarre...

Wayne Warthen

unread,
Feb 6, 2025, 7:47:13 PM2/6/25
to retro-comp
Yup.  And if you take the /Q off the end of the SETPATH command that is in STARTZPM, you will see that the "$$" is converted to "$0" right there.  Using the exact same SETPATH command from the command prompt later on results in "$$" correctly.

I am stumped by this.

-Wayne

Wayne Hortensius

unread,
Feb 6, 2025, 7:50:55 PM2/6/25
to retro...@googlegroups.com
I'm coming into this late, and from a ZCPR3 perspective, but as I
understand it, you're trying to set a path from within an alias, using
$$ for the current directory?

It's PATH for ZCPR3, but other than that I'm betting it's the same.
From a command prompt, $$ is indeed the correct form for the current
directory. But within an alias, each $ has to be escaped (ie $$ becomes
$$$$). Because $ is used as a parameter indicator: $1 is the first
parameter, $2 the second, etc. So to get a literal $ passed to a
command, you have to double it up.

From the command prompt, if I wanted to set my path to the current
directory, followed by A15, I'd do:

PATH $$ A15

But inside an alias it would look like:

PATH $$$$ A15

Apologies in advance if I heard just the end of a conversation and
completely missed the point. :)

Regards,
Wayne
> >>>>> drive/user is *not* in the search path. You will need to add
> >>>>>>> you to switch user areas using the frmat "n:" where n is the

Wayne Warthen

unread,
Feb 7, 2025, 7:33:01 PM2/7/25
to retro-comp
You hit the nail on the head Wayne.  That is exactly the problem!

I will be updating the RomWBW ZPM3 disk image.

Thanks! Wayne

Joao Miguel Duraes

unread,
Feb 7, 2025, 7:33:50 PM2/7/25
to retro-comp
Yep, adding the "escaped" notation fixed it:

00:31 A0:SYSTEM>e:
00:31 E0>setpath


SETPATH, Version 1.1 (Type 3 at 0100H)

  Symbolic     DU        DIR

     $$:       E0:       Noname:

     A15:      A15:      ROOT:
     A0:       A0:       SYSTEM:

00:31 E0>15:
00:31 E15>setpath


SETPATH, Version 1.1 (Type 3 at 0100H)

  Symbolic     DU        DIR

     $$:       E15:      Noname:

     A15:      A15:      ROOT:
     A0:       A0:       SYSTEM:

Thank you kindly.

Wayne Warthen

unread,
Feb 7, 2025, 7:56:58 PM2/7/25
to retro-comp
And, BTW, this problem was also in STARTZCM of the NZCOM disk image!

Thanks again Wayne!

-Wayne

Wayne Hortensius

unread,
Feb 7, 2025, 8:57:13 PM2/7/25
to retro...@googlegroups.com
Happy to have been able to help! You'd see the exact same thing with
ZEX.COM or even SUBMIT.COM. Anywhere where command line parameters
might need to be substituted in.

Wayne

Wayne Warthen

unread,
Feb 8, 2025, 6:10:32 PM2/8/25
to retro-comp
On Friday, February 7, 2025 at 5:57:13 PM UTC-8 Wayne Hortensius wrote:
Happy to have been able to help! You'd see the exact same thing with
ZEX.COM or even SUBMIT.COM. Anywhere where command line parameters
might need to be substituted in.

Right, thank you.  I just checked the full repository and it looks like I have gotten all of the "missing escape" issues.

Thanks, Wayne 

Mark Pruden

unread,
Feb 10, 2025, 7:12:37 AM2/10/25
to retro-comp
Hi Wayne

I was (subconsciously) aware of the issue, think I came across and fixed it myself. 

Did you check out STARTZ3P.COM  for the issue ?

Mark.

Wayne Warthen

unread,
Feb 10, 2025, 7:18:08 PM2/10/25
to retro-comp
Thanks for the suggestion Mark.  I don't remember if I explicitly checked STARTZ3P.COM or not, but it appears to be OK currently.  If you previously fixed it, then thanks!

-Wayne

Reply all
Reply to author
Forward
0 new messages