PIP

74 views
Skip to first unread message
Message has been deleted

Paul Richards

unread,
Dec 15, 2021, 8:53:54 PM12/15/21
to
Using CP/M 2.2

Given two user areas on drive A with filea.txt in user area 1 how do I
PIP filea.txt to A0>?

A0>
A1>filea.txt ?

Thanks

Steven Hirsch

unread,
Dec 15, 2021, 10:29:27 PM12/15/21
to
On 12/15/21 8:53 PM, Paul Richards wrote:
> Using CP/M 2.2
>
> Given two user areas on drive A with filea.txt in user area 1 how do I PIP
> filea.txt to A0>?
>

From memory (and this may be CP/M 3 specific):

A0>pip a:=files.txt [g1]


> A1>filea.txt ?
>
> Thanks

Tony Nicholson

unread,
Dec 16, 2021, 5:29:50 PM12/16/21
to
In article <spe67g$u1t$1...@gioia.aioe.org>, Paul Richards writes:
> Using CP/M 2.2
>
> Given two user areas on drive A with filea.txt in user area 1 how do I
> PIP filea.txt to A0>?
>
> A0>
> A1>filea.txt ?

In a more general sense, CP/M 2 can be tricky when trying to copy files into a user
area where there are no files. I suggest you look at one of the utility programs
like SWEEP (aka NSWP207) that you'll find at

http://cpmarchives.classiccmp.org/cpm/Software/rlee/B/BAMDUA/097/

It provides menu-like file manipulation (including copying between user areas).

Using just CP/M 2 provided utilities, you'll need PIP in the current user area
(unless you're using one of the enhanced console command replacements
that can load programs from user area 0).

The following example will copy a file from user area 0 into an empty user area 1 -

A>stat pip.com

Recs Bytes Ext Acc
58 8k 1 R/O B:PIP.COM
Bytes Remaining On A: 420k

A>user 1
A>pip
* <------- hit Return here to exit from PIP

A>save 29 pip.com

Now theres a copy of PIP in user area 1 - where 29 is the number of 256-byte
pages and is equal to the number of 128-byte records (58) - rounded up by 1 if
this is odd. This works because there is still a copy of PIP loaded into memory.

A>dir
A: PIP COM
A>pip a:=a:filea.txt[g0r

A>dir
A: PIP COM : FILEA TXT
A>

The file is now copied to user area 1.

The PIP option G specifies the user area to copy from, and R means if it is set
with SYS attribute then copy it too.

Tony

Tony Nicholson

unread,
Dec 16, 2021, 5:32:54 PM12/16/21
to
On Friday, December 17, 2021 at 9:29:50 AM UTC+11, Tony Nicholson wrote:
> Now theres a copy of PIP in user area 1 - where 29 is the number of 256-byte
> pages and is equal to the number of 128-byte records (58)

Arghhhh... add here "divided by 2"

- rounded up by 1 if
> this is odd. This works because there is still a copy of PIP loaded into memory.

Tony

Paul Richards

unread,
Dec 16, 2021, 6:47:37 PM12/16/21
to
Thanks Steven. Just what I was looking for.

Paul Richards

unread,
Dec 16, 2021, 6:48:13 PM12/16/21
to
Tony - thanks for the explanation.

Paul Richards

unread,
Dec 25, 2021, 6:01:42 PM12/25/21
to
I am using the SIMH/AltairZ80 simulator running CP/M 2.2

There are a couple of questions I have for which I have not been able to
find the answers and I hope someone can provide them.

Say I have MSCOBOL and I want to write some source code to compile it. I
don't want to use ED so I unload MSCOBOL and load WordStar which I use
to type the source code and save it on the WS disk. My question is how
do I transfer the source code from the WS disk to the COBOL disk for
compilation?

I assume that I can use W.COM to transfer the code from WS to an
external file/directory and them R.COM to transfer on to the COBOL disk.
I am not sure how to specify the external directory in 'the host
environment'.

Given that my directory structure is C:/SIMH/AltairZ80/, I then load WS
and write something e.g. SAMPLE.TXT. Should I set up a TEMP directory
e.g. C:/SIMH/AltairZ80/TEMP? This is what I get:

B>write sample.txt [t] /temp
WRITE?

B>

Following the examples given with WRITE.COM I get a similar result:

B>write sample.txt
WRITE?

B>

So I am not sure how to Write to, and Read from, 'the host environment'.

I'd welcome an explanation :-)


Udo Munk

unread,
Dec 26, 2021, 5:55:10 AM12/26/21
to
Paul Richards schrieb am Sonntag, 26. Dezember 2021 um 00:01:42 UTC+1:
> Given that my directory structure is C:/SIMH/AltairZ80/, I then load WS
> and write something e.g. SAMPLE.TXT. Should I set up a TEMP directory
> e.g. C:/SIMH/AltairZ80/TEMP? This is what I get:
>
> B>write sample.txt [t] /temp
> WRITE?

The name of the executable is w.com and not write.com, so try
w sample.txt

Paul Richards

unread,
Dec 26, 2021, 7:16:06 PM12/26/21
to
Udo

Thank you. A silly error on my part. w sample.txt puts the file in the
altairz80 folder.
Reply all
Reply to author
Forward
0 new messages