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”
How about a nice game of chess?
A strange game. The only winning move is not to play.
This would be even better if the system text gave it directions to respond as the IBM 5155 Portable PC, instead of the other way around :)
I had one of those…. man that was a long time ago.
“AI-powered chatbots are clearly the future of computing” – missing tag !
… should have been “sarc” tag, but thos angle brackets hosed everything up. Also missing “edit comment” function :)
Am I the only one that counted to see if his exe was 8.3 compliant? I guess it had to be if computer was that old, though.
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. ;)
I can see you certainly did not tried to run FreeDOS on 808x :)
Wow, the output on this is faster than it is on a web browser on modern hardware :D
hmm, so it actually doesn’t run on an old PC, he is using a modern PC to do the actual talking to the api.. So not sure what the story here is…
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.
Omg yes. Now I can finally chat with MCP on my gas plasma powered “laptop”
“No, no, no, no, no, no!”
Please be kind and respectful to help make the comments section excellent. (Comment Policy)