MS-DOS Client Brings ChatGPT To The IBM PC

A ChatGPT client running on an IBM Portable PC

AI-powered chatbots are clearly the future of computing, and it’s only a matter of time before you’ll see them appear on every internet-connected gadget. If you thought you were safe from this by sticking to an ancient MS-DOS PC though, think again: [Yeo Kheng Meng] has recently written a ChatGPT client that runs on DOS.

[Yeo Kheng Meng] didn’t cheat by simply running MS-DOS on a modern PC, either: he tested the client on a real 1984 vintage IBM 5155 Portable PC. This semi-portable PC/XT model sports a 4.77 MHz 8088 CPU, 640 kB of RAM and a CGA video card with a built-in monochrome monitor. An NE2000 ISA network card, running in 8-bit mode, enables the Portable to connect to the internet.

Running the client couldn’t be simpler: just run doschgpt.exe and type in your question. [Yeo Kheng Meng] developed this program using the Open Watcom C/C++ compiler, which was the compiler of choice for most DOS game developers back in the day. Networking support was provided by an era-appropriate packet driver together with MTCP, a TCP/IP stack developed by [Michael Brutman] for DOS-based internet applications.

Connecting to the ChatGPT API and parsing the results was pretty straightforward, but implementing the required TLS encryption was not. Even if there was a library available for MS-DOS, the 5155 wouldn’t have enough CPU power to run it in real time, so [Yeo Kheng Meng] decided to run that bit of the networking stack on a modern PC and send an unencrypted HTTP stream to the DOS client.

The end result is a delightful retro-futuristic setup that seems to have come straight out of a 1980s science fiction movie. We can already picture it together with a Commodore 64 reporting the news and an IRC server running on an IBM PC.

16 thoughts on “MS-DOS Client Brings ChatGPT To The IBM PC

    1. Technically, yes, DOS files are in 8+3 Format.
      However, some versions, like FreeDOS for example, do support LFNs. Running FreeDOS on 808x system is a bit of a slow experience, I assume. Especially if FAT32 is being used. Nevertheless, there’s a pure 16-Bit build, AFAIK. I’d rather use an 80286 system for that, though. But an 80286 could run OS/2, too. ;)

    1. The old PC is doing the work of forming requests and parsing responses. The proxy is just to handle the HTTPS security; it’s transparent except for that. The machine is doing full TCP/IP too.

      If ChatGPT had open HTTP endpoints it would work directly.

Leave a Reply to Michael BrutmanCancel reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.