7

I have a modern Linux computer and a 286 computer running DOS. I would like to transfer files from the Linux computer to the DOS computer over a null modem serial cable. I know you can use INTERLINK.EXE/INTERSVR.EXE for DOS-to-DOS, but what about Linux-to-DOS (or Linux-to-FreeDOS)?

  • 4
    I'd install a terminal emulator program (of the sort used to connect to BBS'es) on the DOS computer and Zmodem on the Linux computer. You'd also need to setup the serial port on the Linux computer to allow log ins. – Ross Ridge Dec 17 '17 at 0:59
  • I can't point to exact tools, but I would look for terminal programs for Dos and Linux that both support Xmodem. Ymodem or Zmodem are even better protocols for file transfers, but Xmodem works just fine. – Geo... Dec 17 '17 at 1:31
  • 1
    @Geo... on the Linux side, minicom has been the de-facto standard for this since the last time I regularly used a Linux system as a serial terminal, which was probably in 1994. Not so sure about DOS, however. – Jules Dec 17 '17 at 1:38
  • What distribution and version of Linux are you using? – Ross Ridge Dec 17 '17 at 4:23
  • 1
    @Geo...: if using Xmodem, I'd recommend the first thing to transfer to be Zmodem, since Xmodem is latency limited (stop-response protocol). IIRC, I got ~300 Bps with Xmodem and ~900 Bps with Zmodem on a 9600 bps null-modem connection. – ninjalj Dec 19 '17 at 12:01
9

Some sort of comms program that supports Zmodem on the 286 end and use "sz" to send from the unix end. Zmodem has some advantages in that usually the receiving computer will auto start reception of a file when it sees a Zmodem start sequence (there's a random number handshake to stop spoofing)

The reason for recommending Zmodem is means you don't need to start the receiving process on the other computer (so no need to flip between keyboards).

7

You can also use dosbox or dosemu to run a simulated DOS environment, give it access to whatever ttyS* or ttyUSB* you have, and then use the DOS-to-DOS transfer methods.

Personally, I prefer Laplink, which offers a convenient Norton-Commander like interface for file transfer. It can also bootstrap via the CTTY command on the remote computer, which is handy if you've no other way to install something on the DOS computer.

  • 1
    This would probably be the easiest approach. – mathreadler Dec 17 '17 at 9:03
  • 1
    Blimey. Laplink, there's a ghost from the past. – JeremyP Apr 20 at 16:21
6

Is it text? In that case just pipe it from COMx into a file. Otherwise get some simple terminal program like @RossRidge already suggested. Or maybe Kermit. Kermit is a great start if you really want to start from scratch on the PC side since you may really bootstrap with a few lines of code. Or use BASIC to write your own receiving program :) Might be a real fun task.

  • Fun task... I recall circa 1996 or so deciding I needed a parallel port DOS -> Linux transfer capability, grabbing the port descriptions of the PC parallel port (probably from the collection of documents I'd accumulated around that time that included Ralf Brown's interrupt list and a whole load of other similar things -- I think there was a "DOS Games Programmer's Encyclopedia" or something similar in there too) and figuring out how to do it on the DOS side (that was probably the last significant program I wrote purely in assembly, I think), but failing to get it to work in Linux... – Jules Dec 17 '17 at 1:29
  • 2
    ... think I gave in and just bought ethernet cards instead. :) – Jules Dec 17 '17 at 1:36
  • @Jules Yeah :)) Well, I had to force myself staying with the restriction the OP put on this by making it a question about serial/nullmodem transmission :)) Using LAN cards is ofc the easy way out. Personally I wouldn't have even thought about parallel port at all when there's a serial arround. – Raffzahn Dec 17 '17 at 1:49
  • 1
    @Jules the PCGPE? bespin.org/~qz/pc-gpe – Tommy Dec 18 '17 at 2:02
  • @tommy ... That's the one, yes. – Jules Dec 18 '17 at 12:32
4

This has already been well answered, but I wanted to respond with a couple of bootstrap solutions: that is, if all you have is a Linux box connected to a DOS box via a null-modem cable.

  • minicom on Linux includes the ascii-xfr program. It's used as the default text file transfer protocol. By using its [-l linedelay] and [-c characterdelay] options it can be slowed down to mimic typing even on the slowest serial port. As long as the text file ends with an EOF (Ctrl-Z), you should be able to enter this on the MS-DOS machine COPY COM1 FILE.EXT and it will correctly receive the file sent via ascii-xfr.

  • if your MS-DOS machine has BASIC, you should be able to send it (or type in) msbrcv.bas, a simple 1200 baud receive-only Kermit. It can receive binary files — admittedly slowly — via Kermit. You'll probably want to send rz as your first program.

  • the intriguingly tiny and 7-bit ASCII TCOM.COM executable can be typed in directly as COPY CON TCOM.COM followed by Ctrl-Z. This will receive binaries at 300 baud, again via the Kermit protocol. The entire contents of TCOM.COM are apparently XPHPD[0GG0G,0G51G31GB'(G+(G:u'0g?(G>(GE1G@arwIV_F*=US@<1|_,5wXNg-7muTu(41m0ss1k260s@3G1g360@3G0i7t2g3A1g350@3G2E1=0C1g350@3T2M0^\1g3>0@3T=1s2g0T1g3;0@3ToN2g391g0t@3G0^F1k0s2?0@3T4

  • another option documented by John Coppens in Accesing a DOS machine without floppy [sic] is to send a very tiny terminal emulator via hex encoded files decoded by a small QBasic program. This limits the process to MS-DOS 5 and above. Again, this terminal program uses the Kermit protocol.

You'll note that Kermit is a constant in all of these processes. The team at Columbia University put a huge amount of effort into making sure that Kermit could run on almost any system and in turn, be bootstrapped to run on any connected system.

1

In addition to the suggestions above, you can run the terminal program "minicom" on Linux, and use a PC terminal package (e.g. ProComm), and transfer the files between the two machines using zmodem or another file exchange protocol (zmodem is very time-efficient over serial ports).

1

On the 286 PC DOS side, you should be able to use Telix (SIMTEL mirror), it has all the standard protocols plus a very good scripting language.

The SIMTEL mirror has several scripts that can be used to setup the old PC in unattended host mode, allowing to do all the transfers from the Linux side.

And for reliable transfers at 115200bps, get a good FOSSIL driver.

0

If you wish to use ethernet instead of serial, there is a program that was obtainable from MS at one time called MSWGCN.exe (Microsoft Workgroup Connect). It allowed a network to be set up on a DOS box. It only works on the NETBEUI protocol so you'll have to install that on Linux too.

Once both sides have NETBEUI, it works quite well. It is a bit slow but faster than either the serial or parallel cable (interlnk also worked on the parallel cable).

I used it to transfer all my C sources from DOS to Linux, only to find that the linefeed-carriage return caused no end of problems with the compiler.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.