Classic Computer Magazine Archive COMPUTE! ISSUE 88 / SEPTEMBER 1987 / PAGE 8

Transferring Files From Commodore To IBM PC

I would like to convert three years of files from the Commodore 64 and 128 to my IBM PC. These files were created with SuperScript and Easyscript. I also have some files from Multiplan and Superbase.

A.G. Farkas

I would like to convert some of my Commodore 64 programs to my IBM PC. How should I proceed?

H.W. Martens

Transferring text files is relatively easy, while program file transfers are somewhat more difficult.

Before a text file can be transferred, it must be converted into an ASCII file to remove any special formatting instructions that may be embedded in the file. Most word processors can do the conversion for you. Load the file into your word processor and then select the save option which creates an ASCII file. Of course, any special features, such as special fonts or underlining, will be lost.

Database and spreadsheet programs are more difficult to transfer. First, you must make certain that the fields are set up exactly the same on both programs that will use the data. This may require a bit of trial and error. Applications which use relative files may be especially difficult to transfer.

Program files must also be converted to ASCII before being sent. Load the program into your Commodore and then type

OPEN 1, 8, 2, "0 : filename, S, W" : CMD1 : LIST

When the cursor reappears, type

PRINT #1 : CLOSE 1

This creates an ASCII (nontokenized version) of your program file on your disk.

After transferring the file to another computer, you'll have to go through the program and convert Commodore-specific instructions into instructions acceptable to the new computer. This is trivial for the simplest BASIC programs, but becomes increasingly difficult as the programs become more specialized and optimized for a particular computer.

Most game programs, even those written in BASIC, are very difficult to convert from machine to machine. As a general rule, the more graphics commands contained in the program, and the more PEEK, POKE, and SYS commands there are, the more difficult the translation. Programs written in machine language, or which contain machine language modules, are nearly impossible to transfer between dissimilar computers; 6502 machine language is quite different from 8088 machine language, and whole sections of machine code would need to be rewritten. Even if the two machines shared the same processor, the differing video and audio hardware would make translation difficult.

The easiest way to physically transfer files between computers is by attaching a modem to each computer, then connecting the two modems. You may use any telecommunications program (you'll need one for each computer) to transfer the data.

Usually a straight ASCII transfer is all that's necessary, but if the line connecting the computers is at all noisy, you may find that the XMODEM protocol is more reliable. Select a baud rate for the transfer which is supported by both communications programs, and be sure the parameters for both computers are set the same. Refer to the user's manuals for your modem and telecommunications programs for specific details.

Select the send file option for your telecommuncations program on your Commodore and the receive file option on your IBM PC, and the transfer of data will begin.

Another way of connecting the RS-232 ports of the computers is via a null modem cable. This method is usually the quickest way to transfer data, since it requires the least hardware. There's one potential problem, however. Commodore computers don't supply true RS-232 levels to the user port. Only TTL levels (0-+5 volts) are provided. An RS-232 level converter is required on the Commodore computer to supply the correct voltage levels to the RS-232 port of the IBM (and most other computers) when using a null modem connection.

The simplest null modem cable attaches the transmit data line of one computer to the receive data line of the other computer, and vice versa, while connecting the ground lines of both computers. The other pins are not used and need not be connected for a simple null modem cable. More sophisticated null modem cables cross-connect several of the RS-232 port's handshaking lines. If you are not skilled in making cables, buy a readymade cable or have a professional make one for you. An improperly wired cable could cause damage to both computers.