CP/M PIP Issue

discuss bbc micro and electron emulators (including mame) here!
Post Reply
Paolo_R
Posts: 39
Joined: Sun Mar 10, 2019 3:14 am
Contact:

CP/M PIP Issue

Post by Paolo_R » Sat Jul 11, 2020 3:45 am

I am running CP/M 2.2 on an emulator (BeebEm/BBC Master 128/Acorn Z80 second processor) following DutchAcorn's guidance - see earlier thread.

I have User 0, 1 and 2 on my hard disk. I have a file FILEA.CBL in User 2. I want to copy FILEA.CBL from User 2 to User 1.

I input the following command from within User 1 (which has PIP installed): PIP A:=A:FILEA.CBL[G2] and I get the following message:"Requires CPM 2.0 or newer for operation".

This is very strange because I had earlier used PIP to do a lot of copying between User Areas.
Can anyone cast light on this issue?

Thanks

User avatar
Richard Russell
Posts: 1668
Joined: Sun Feb 27, 2011 10:35 am
Location: Downham Market, Norfolk
Contact:

Re: CP/M PIP Issue

Post by Richard Russell » Sat Jul 11, 2020 5:04 pm

Paolo_R wrote:
Sat Jul 11, 2020 3:45 am
Can anyone cast light on this issue?
It seems that Google can: "PIP doesn't work if it is launched from the source or destination drive" (found here). It appears that you need to run PIP from a drive other than the source or destination, but I have no idea why.

User avatar
DutchAcorn
Posts: 2288
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: CP/M PIP Issue

Post by DutchAcorn » Sat Jul 11, 2020 9:27 pm

I could not replicate this.

I tried the following:

Code: Select all

A>DDT PIP.COM
DDT VERS 2.2
NEXT   PC
1E00  0100
-^C
A>USER 3
A>SAVE 29 PIP.COM
A>PIP A:A:STAR.COM[G0]
That copies the STAR.COM program from the user 0 area to the user 3 area.

It's all a bit involved imo because CP/M lets you copy files FROM another user area but not TO another user area. If you enter a new user area it is empty but you need the PIP program to get stuff from other areas. The DDT loads the PIP.COM program into memory and gives you the next free memory position (1E00H). The SAVE command needs the number of pages from 100H that PIP.COM uses, in decimal: 29.
Paul

Image

Paolo_R
Posts: 39
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: CP/M PIP Issue

Post by Paolo_R » Sun Jul 12, 2020 12:28 am

@Richard - thanks. Intriguing.
@DutchAcorn - So I loaded the CPM Utilities disk into drive G: (the floppy) and this contains PIP.COM. Given the User areas I have described, using PIP on drive G: how could I copy FILEA.CBL from User 2 (on A:, hard disk) to User 1 (on A:, hard disk)?

I tried : G>PIP A:=FILEA.CBL{G2} but this returns NO FILE: =FILEA.CBL[G2}.

If there is no way I can copy between User areas I will just have to reload the programs I currently have in User 2 into User 1 - which defeats the object of segregating programs in a 'folder'-like arrangement :(

Paolo_R
Posts: 39
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: CP/M PIP Issue

Post by Paolo_R » Sun Jul 12, 2020 2:40 am

I posted this issue on comp.os.cpm and, having described the issue and the message received, got this reply:

"That message is only printed if PIP gets the wrong value back from BDOS function 12. It is expecting the return (HL) to be >= 0020h.
Perhaps you have a corrupted version of PIP.COM somewhere. There is no bug in PIP, that I have ever seen, where it mattered which drive contained PIP.COM vs. the source and destination of the copy."

I would have no idea if this is the case, but I post it here for info.

User avatar
jonb
Posts: 2686
Joined: Sat May 21, 2011 1:42 pm
Location: South Coast of England
Contact:

Re: CP/M PIP Issue

Post by jonb » Sun Jul 12, 2020 6:05 am

G>PIP A:=FILEA.CBL{G2}

Should be:

G>PIP A:=FILEA.CBL[G2]

That is, square brackets around the G2 argument.

Assuming your file FILEA.CBL is in user area 2 on the currently logged disk, it should work. If not, get another copy of PIP.

Paolo_R
Posts: 39
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: CP/M PIP Issue

Post by Paolo_R » Sun Jul 12, 2020 6:27 am

jonb

The } was a typo in my post - the actual command used in BeebEm had the correct [ ] brackets.

User avatar
DutchAcorn
Posts: 2288
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: CP/M PIP Issue

Post by DutchAcorn » Sun Jul 12, 2020 7:06 am

I'm a bit confused. How did the files end up in the USER 2 area? There are no files in the USER areas by default, they must have been copied from another USER area (probably USER 0).

But following from what I believe is your setup I did the following:

Code: Select all

A>DDT PIP.COM
DDT VERS 2.2
NEXT   PC
1E00  0100
-^C
A>USER 1
A>SAVE 29 PIP.COM
A>USER 2
A>SAVE 29 PIP.COM
A>PIP A:=A:STAR.COM[G0]

A>USER 1
A>PIP A:=A:STAR.COM[G2]

A>
  • I first got PIP in both user areas by loading PIP into memory without executing the program (using DDT.COM from the CPM utilities disc (attached)) and then use SAVE to save a copy of PIP.COM from memory first in USER 1 and then in USER 2. 29 in the SAVE command is the number of pages that need to be saved.
  • Next I had to get a file in USER 2 so I used PIP to get the STAR.COM file from USER area 0 using PIP with the [G0] option.
  • Then I switched to USER 1 and used the PIP program there to copy the STAR.COM file from USER 2 to USER 1. Worked fine.
I believe most likely you have a corrupted version of PIP in USER 1. Can you try to delete that version and get a new one using the DDT and SAVE commands?
Attachments
CPM_Utilities_Disc.zip
(75.14 KiB) Downloaded 13 times
Paul

Image

Paolo_R
Posts: 39
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: CP/M PIP Issue

Post by Paolo_R » Sun Jul 12, 2020 10:16 am

DutchAcorn

First, I used this website page (http://primrosebank.net/computers/cpm/c ... k_user.htm) to instruct myself on User Areas and PIP. One difference I've noted is that you use SAVE 29 PIP.COM whereas this website , and therefore I, uses SAVE 28 PIP.COM - could this be the problem?

Second, using hard disk A: (User 0) I set up User 1. Copied files to A: User 0 then, having installed PIP on User 1, copied these files to User 1. Set up User 2 and, using the same approach, copied files via A: User 0 to User 2. Since I wasn't anticipating a need to copy any further files into User 2 I didn't install PIP there.

Thanks

User avatar
DutchAcorn
Posts: 2288
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: CP/M PIP Issue

Post by DutchAcorn » Sun Jul 12, 2020 10:31 am

Paolo_R wrote:
Sun Jul 12, 2020 10:16 am
DutchAcorn

First, I used this website page (http://primrosebank.net/computers/cpm/c ... k_user.htm) to instruct myself on User Areas and PIP. One difference I've noted is that you use SAVE 29 PIP.COM whereas this website , and therefore I, uses SAVE 28 PIP.COM - could this be the problem?
...
Yes, that could well be the cause. The PIP.COM program on the Acorn CPM2.2 apparently uses 29 pages, not 28. Saving only 28 may get you an incomplete/corrupted version of PIP.
Paul

Image

Paolo_R
Posts: 39
Joined: Sun Mar 10, 2019 3:14 am
Contact:

Re: CP/M PIP Issue

Post by Paolo_R » Sun Jul 12, 2020 11:23 am

DutchAcorn

SAVE 29 PIP.COM was the correct command to use. So I saved PIP again to User 1 and 2 and I am now able to do PIP A:=FILEA.CBL[G2] and copy files to User 1.

Many thanks for your perseverance :D

User avatar
DutchAcorn
Posts: 2288
Joined: Fri Mar 21, 2014 9:56 am
Location: Maarn, Netherlands
Contact:

Re: CP/M PIP Issue

Post by DutchAcorn » Sun Jul 12, 2020 11:31 am

Good to hear it is now solved. I did not know about user areas in CPM2.2 before you popped the question here so I learned something usefull in the process! :D
Paul

Image

Post Reply

Return to “8-bit acorn emulators”