How do I use PCPUT

I have a Z80 SBC with CPM installed and also PCPUT and PCGET. I have successfully used PCGET many times to retrieve files from my Windows PC buc can’t work out how to move files from my Z80 to my PC with PCPUT.

I am using ExtraPuTTY for the X modem transfers… If I start with “pcput filename” I get the “Start XMODEM file receive now…” prompt. I select Files Transfer/Xmodem/Receive and am prompted for a file name. Have tried entering a full path to my windows pc plus a filename and the file transfer process appears to start and then hangs. What am I doing wrong?

What side is the file name prompt? CP/M or windows.

The name prompt is in ExtraPuTTY in Windows.

Terra Term also does XMODEM.
Might be a strange version XMODEM with PCPUT.

Tks, will try TT and see what happens.

First, apart from a bit of general experience with sending files via a serial port, I have no experience with your specific setup. Having said that, at first glance, it seems you are doing everything right and you do get it going, initially. Until the transmission apparently stalls. Which really should leave communication settings. Are they all right? (baud rate, word length, parity, stop bits, line status: XON/XOF) Maybe, decreasing the baud rate may help. Maybe, any interrupts are interferring? (Can you turn interrupts off? Both communication speed settings and interrupts may work sort of in tandem, regarding speed limits.)

BTW, here’s the source for PCPUT (maybe useful for trouble shooting):

Edit: Mind that there’s a build flag SD$SYSTEMS (“True if SD Systems Serial 8-IO Board”, default: false), which alters quite a few things. So it may just be that the binary, you have, isn’t really compatible with your SBC.
There are a few more sources here:

BTW are you using 8.3 file names?

“z80sqrt.lst” is the filename 7.3

But not upper case, windows might not send a 8.3 filename.
Is the CPM side started first?
I hope you don’t default to 110 baud on the cpm side

As I understand it, @Moonlight is trying to send a file from the SBC to the PC using PCPUT, so the filname is set on the Windows side of things independently (compare the prompt for a filename, mentioned above).

But the same file name must read on the CPM side.
The other got ya, XMODEM is modem software, what hardware hand shaking was expected back

I don’t see this in the source.
(Also, how does the local file/buffer name on the receiver side matter? If it must be the same, why prompt the user for a local filename in the first place?)

Speaking of the source, here’s the initialization of the stream:

        PUSH    H
        LXI     H,UPLOAD$MSG    ;Speak downloading file
        CALL    SMSG
        POP     H
        CALL    OPEN$FILE       ;OPEN THE FILE
        LXI     D,OPENM
SENDB   XRA     A               ;GET A ZERO
        STA     ERRCT           ;ZERO ERROR COUNT
                                ;READ SECTOR, SEND IT

        LDA     SECTNO          ;INCR SECT NO.
        INR     A
        STA     SECTNO
                                ;SEND OR REPEAT SECTOR
REPTB   (...)

What’s interesting about this is that the code for sending any actual data/sectors (following immediately after this) is guarded by 4 sec timeouts, which should show up as an error message on the sender’s side. On the other hand, the initialization seems to work, as the terminal on the Windows side recognizates the stream and prompts for a filename. So it appears that it’ should be about here that things break.

The string UPLOADMESSAGE is “Up loading file Started.”
So, if you arrive here, you should see something like:


Send a File to a PC using the SD Systems IO-8 Serial Board
Zilog SCC Ports 10H & 12H. Requires RTS & CTS, 19,200 Baud.
SCC Port A initilized to 19,200 Baud.


Send a File to a PC using the S100Computers IO Board
Zilog SCC Ports A1H & A3H. Requires RTS & CTS, 38,400 Baud.
38,400 Baaud.[sic!]


Up loading file Started.

(If you’re seeing something completely different, it may be one of the customized versions of PCPUT.)

Thanks guys, will read through all this and try some different scenarios. I can PCGET no problems from PC to SBC and until today had never tried the reverse. I am using 9600 for the terminal speed btw. I will create a simple 8.3 file and via PCGET, transfer from PC to SBC and then try the reverse.

Well, after many variations Tera term does the job.After the pcput filename, I open File/Transfer/XMODEM/Receive and I get a proper dialog box where I can select the Windows folder and enter a filename. It does not have to be the same filename as entered in CPM. I tried an 8.3 and a 7.3 file name and both worked without problems. So, thanks @oldben for that suggestion and @NoLand I will have a look at the source you for PCPUT you provided. Many thanks.

1 Like