Updated 9 April 2002

Z88 with [ ] Y. XY-Modem for the Z88


A Z88 popdown application for transfering files using the Xmodem and Ymodem protocols. Transfer speed around 3300 cps at 38400 bps using 1K blocks. Currently supported features are checksum and crc error detection, 128 byte and 1K blocksize in any combination, streaming -G mode (only for sending). Mailbox function to send a file marked in Filer. Batch sending with wildcards. Use :*//* to send all files in all directories on all :RAM devices. Ymodem preserves name, size and modification date/time of transfered files. User interface similar to []X Imp-Export.

XY-Modem Help screenshot

XY-Modem screenshot

Version History

At christmas 1993, I started this project with the goal of creating an alternative program for batch file transfers using the Ymodem protocol.

Xmodem with checksum error check and 128 byte blocksize implemented in Z88 BBC BASIC.

CRC error check implemented in BASIC.

Xmodem sending with checksum error check and 128 byte blocksize implemented in Z88 BBC BASIC inline assembler.

1K blocksize implemented in BASIC.

Ymodem sending implemented in BASIC.

Xmodem receive 128 byte and 1K blocksize implemented in assembler.

CRC error check implemented in assembler.

Sending 1K blocks implemented in assembler.

Changed format of program to a pre-assembled machinecode file, with a BASIC header from Richard Haw's ZCP program, loadable in BASIC.

970802 v. 0.22
Created my own BASIC header using indirection in BASIC.
Transfer speed up to 370-400 cps using checksum and 1K blocks.

Changed format to popdown application and use Gunther Strube's pcZ80asm after some help and pushing from Thierry Peycru and buying Rakewell's 1M flash eprom. Changed to Codewright editor/development environment in Windows 95. Use Gunther Strube's Zprom for flash eprom programming.

980801 version 1.0
Bypass the operating system to achive higher speed. Unfortunatly this means that transfers can not be terminated by escape. There is a timeout though.
Transfer speed at 9600 bps is 800 to 900 cps.
Transfer speed at 19200 bps is 1500 to 1700 cps.
Sending speed at 38400 bps is 2600 to 3000 cps, receiving does not work. 1K blocks is 10 to 15% faster than 128 byte blocks. Receiving is 5 to 10% faster than sending.
Shorter receiver start initiative intervals, 3s instead of specified 10s, to compensate for Windows 95 Hyperterminal's conservative sending start.
Shorter timeout on unsuccesful transfer. 30s instead of specified 60s.

Changed nak retries from 9 to 10.
Preserve partly entered filename over suspension.
Fixed bug preventing CRC mode receiving introduced when implementing stepdown from CRC to checksum mode.

Eliminated sending an empty last block when the file to send is an exact multiple of the current block size.
Fixed bug regarding stepdown from CRC to checksum mode.
Improved user interface when preserving partly entered filename over suspension.
Now also receive at 38400 bps without errors.
128 byte blocks are received at 2900 cps and 1K blocks at 3300 cps.

More error messages.

Mailbox function to enable marking a file in Filer and going to XY-Modem with []Y to send the marked file.

Wildcard handling for sending more than one file at the time. Good for backups even with Xmodem.

Moved all header preparation variables inside header block.
Doesn't crash at timeout anymore.

Now send filepath, size and modification time in Ymodem header.

Now waits for NAK or C after Ymodem header ACK before sending file.

Implemented Ymodem End Batch.
Implemented Ymoden-G send.

Enabled canceling transfer by pressing escape between blocks.

Succeeded in making quick keyboard escape detection in character send and receive routines.

Ymodem receive, first try.

Ymodem single file receive works.

Ymodem batch receive works.

Preservation of size and modification date/time also for files received with Ymodem.
Step down to blocksize 128 when rest of file is (1024-128=896) bytes or less when sending 1K blocks.
Send cancel characters to remote when giving up or aborting.
More error and status messages.
Escape sending rest of batch.

Possible updates

Step down to checksum when receiving from remote not capable of CRC error check.
Finish Ymodem protocol support in Z88-Xport to make a package suitable for backups.
Create directories as needed when receiving with Ymodem. Gunther has some nice code in stdlib.
Make Ymodem sending of full path as filename optional.
Command for sending cancel characters to remote.
Improve speed on batch transfers.
Improve transmit speed slightly. Possibly + 10 %.
Rename or prompt when receiving unsuitable filenames.
Prompted overwrite on receive.
Ymodem-G receive (not likely).


mailto address


Download xymod11a.zip. XY-Modem popdown application for the Z88. Version 1.1, 26 December 1999. 3K.

New 9 April
The binary file XY-Modem-32D4.3F has been renamed to XY-Modem.ap0, content and functionality is identical, and an XY-Modem.app file has been added to ease installation in RAM.

Installation on EPROM

Load XY-Modem.ap0 in top bank at offset 32D4 (hex) on any size eprom or other bank if application front dor is changed accordingly.

Installation in RAM

See Garry Lancaster's application or BASIC Installer.


Press the X key to select Xmodem and the Y key to select Ymodem.

Press the C key to toggle between Checksum and CRC error checking mode.
The receiving program controls the type of error checking to be used in a transfer.
CRC provides better protection against errors in received files.
Please note that Xmodem -1K often implies use of CRC.

Press the K key to toggle between 128 byte and 1K blocksizes.
The sending program controls the blocksize to be used in a transfer.
1K blocks are faster to transfer.

The remote receiving program controls if the streaming -G mode should be used for sending from XY-Modem.

An X- or Ymodem program receiving or sending, or trying to, can be stopped by sending at least two CAN characters from the remote computer. I.e. to stop Z88 XY-Modem, hold the Ctrl key and press X several times in the remote terminal window. To stop a remote X- or Ymodem program, goto Terminal []V, hold the diamond <> key and press X until the transfer is stopped.

Unsuccessful transfers can be aborted by pressing Esc.

Note that proper X- and Ymodem programs expect the sending side to be started first and then the receiving side. Else you have to wait up to ten seconds for the receiver to timeout and retry.

The XY-Modem program is closed by pressing Shift+Enter like in []V Terminal.

Back to Cambridge Computer Z88