• Please review our updated Terms and Rules here

CPM-ish how to copy to another user area?

gertk

Experienced Member
Joined
Jan 26, 2016
Messages
407
Location
Netherlands
Hello,

Fiddling with CPM-ish on the Amstrad NC200 and having massive (32MB!) diskspace in the form of a CF card I would like to tidy up the main user area by copying/moving files over to other user areas.

This works:

COPY BBCBASIC.COM 1: (enter)

If I switch user area with USER 1 the file BBCBASIC.COM is there.

Alas trying anything with a filename with less than 8 characters (+3 ext) I get: Error, cannot open source file.
So:
COPY SBASIC.COM 2: (enter)
does not work..

Anyone else tried this ?
 

gertk

Experienced Member
Joined
Jan 26, 2016
Messages
407
Location
Netherlands
COPY isn't a standard CP/M command, is it?

I'd use PIP with the G parameter (user area for source files).

CPM_ish COPY.COM is used as an alternative for PIP (CPM-ish uses no DRI legacy code)

Alas (CP/M) PIP does not work (yet) on CPM-ish (it seems to mess with the interrupt locking the computer up hard, need to remove the batteries and reinstall to revive the unit)
The power button on the Amstrad uses the interrupt also..
 

GeoffB17

Veteran Member
Joined
Jun 8, 2016
Messages
514
Location
Guisborough, England
Yes, now that my PCW has multiple virtual HDs, something like NSWP (NewSWeeP) is even more useful, as I'm making far more use of User Areas than when my maximun disk size was 720k. Makes copying between User Areas much easier. Also, there's the Mass option, where files can be tagged, among the various options available.

Regarding the original problem, maybe the COPY prog is getting confused with it's parameter parsing. If it needs 8 chars, what about

COPY SBASIC??.COM

maybe even SBASIC*.COM might be OK.

Also, maybe there's a problem with the User # alone - have you tried

COPY SBASIC.COM C2:

Geoff
 

durgadas311

Veteran Member
Joined
Mar 13, 2011
Messages
1,364
Location
Minnesota
I am concerned about the information that PIP does not run on your machine, and appears to have problems with interrupts and requires such drastic recovery. PIP should be the most generic and standard as any CP/M program, and certainly shouldn't be able to affect interrupts or cause hardware lockups. I'm wondering if there is something else going on here, and PIP and COPY just manifest the problem differently.

Or else your copy of PIP.COM is corrupted.
 

gertk

Experienced Member
Joined
Jan 26, 2016
Messages
407
Location
Netherlands
Did some more testing and it seems there is some memory/buffer corruption going on.
In CPM-ish there is an option to 'flip the disks' aka drive A gets B and B gets A and with the command FLIPDISK
If I 'flip' the disks then suddenly COPY to another user area works fine.
Need to investigate this further.

Regarding PIP not working: yes would be nice to have it working
 

Timo W.

Veteran Member
Joined
Nov 25, 2014
Messages
1,696
Location
Germany
I am concerned about the information that PIP does not run on your machine, and appears to have problems with interrupts and requires such drastic recovery. PIP should be the most generic and standard as any CP/M program, and certainly shouldn't be able to affect interrupts or cause hardware lockups. I'm wondering if there is something else going on here, and PIP and COPY just manifest the problem differently.

Or else your copy of PIP.COM is corrupted.
He's using CP/Mish, which is a recreation of CP/M with no original code used. Having compatibility issues with original CP/M programs isn't that surprising therefore.
 

gertk

Experienced Member
Joined
Jan 26, 2016
Messages
407
Location
Netherlands
I tested the COPY.COM from cpm-ish under CPM 2.2 (on the Kaypro) and noticed the same problem.
My first assumption with the 8+3 format was not correct.

Wading through the (C) sourcecode of COPY.COM I think I found the culprit and added two setuser calls
Code:
    cpm_set_user(srcuser); // added by Gert
    if (cpm_open_file(src) == 0xff)
        fatal("cannot open source file");
    src->cr = 0;

    cpm_set_user(destuser); // added by Gert
    if (cpm_make_file(dest) == 0xff)
        fatal("cannot open destination file");

Now
Code:
COPY somefile 3:
copies as it should to user area 3 for example
 

geowar1

Experienced Member
Joined
Oct 1, 2018
Messages
56
I don’t think I’ve ever run across a COPY program for CP/M…
I’ve only ever used PIP. It’s (PLM) sources are included with the DRI sources for CP/M.
 

durgadas311

Veteran Member
Joined
Mar 13, 2011
Messages
1,364
Location
Minnesota
Many CP/M distros shipped with a COPY.COM, or similarly-named command. DRI never defined a utility with that name. But, the COPY being discussed here is something else and presumably there is source code somewhere. This discussion is not about standard DRI CP/M but something called CPM-ish.
 

KenUnix

Member
Joined
Nov 26, 2022
Messages
26
What I am trying to accomplish is copy a file from one drive and user number to another , example:

COPY E2:JUNK.TXT A0:JUNK.TXT

Copy junk.txt from E2 to A0

Thanks
 

Koolstar42

Member
Joined
Sep 24, 2019
Messages
46
Location
Netherlands
I use PPIP.com (included)

PPIP, Version 1.7

USAGE: PPIP [DU:]<SOURCE.TYP>[ [DU:][<DEST.TYP>][ /options]

<or>

PPIP [[DU:]<DEST.TYP>=][DU:]<SOURCE.TYP>[ /options]

Options (default):
/V (OFF) - do CRC Verification
/C (OFF) - print the CRC value
/A (OFF) - copy only unarchived files
/E (OFF) - delete (Erase) R/W files without asking
/W (OFF) - delete (Wipe) R/W and R/O files without asking
/M (OFF) - move files - deletes source after copy
 

Attachments

  • ppip.zip
    2.8 KB · Views: 5

KenUnix

Member
Joined
Nov 26, 2022
Messages
26

Koolstar42,​


That worked!! Where would I find that and other programs in 'C' or ASM or already compiled??

I never heard of PPIP before.

Thanks
Ken
 

Koolstar42

Member
Joined
Sep 24, 2019
Messages
46
Location
Netherlands
I'm not sure where I found it it says Copyright (C) David Jewett,III - 1986
I think it is on one of the CP/MUG or the SIG/M disks.

Glad I could help
 

KenUnix

Member
Joined
Nov 26, 2022
Messages
26
The CPMUG disks I have only go up to 092.

Do you ave a link to get the others?

Thanks
 
Top