MS-DOS ChatGPT Client Arrives for 1984 IBM PC
Developer succeeds in extremely old meets new feat.
A hobbyist software developer and retro computing enthusiast has succeeded in bridging the ChatGPT and IBM PC-XT computing divide. On the lookout for a challenge, Yo Kheng Meng wondered if he could write a ChatGPT client for MS-DOS. Specifically, he targeted a 1984 vintage IBM 5155 Portable PC, which is powered by a 4.77 MHz Intel 8088 CPU and has 640KB of RAM (enough for anyone, right?). Several technological obstacles needed to be surmounted to make the project a success.
Typically, most people access ChatGPT via a web browser, but it seems to be a growing trend to access this AI resource via a client. We have reported on some notable and fun clients like a ChatGPT Smartwatch powered by a Raspberry Pi and Microsoft’s much maligned Clippy with an AI brain transplant. However, getting ChatGPT to work on one of the most ancient of PCs might be even more ambitious.
Meng started his quest by finding a compiler which could span the 40 years or so gap between the target computer and ChatGPT. The Open Watcom C/C++ compiler fit the bill. To test the DOS application during development he decided to run it in a virtual machine (Virtualbox virtual machine running DOS 6.22) on a modern PC.
One of the biggest hurdles with DOS was with the networking required to connect to the ChatGPT service. Meng found that MTCP, written by Michael B. Brutman, would facilitate the connection to ChatGPT’s Chat Completion API. However, to communicate with this API required the developer to “construct the entire POST request by hand in C.”
A few further hurdles the developer had to pass included JSON parsing, changing the ChatGPT output from HTTPS to HTTP, and working with the lack of multi-threading in DOS. You can read more about how this was achieved in his full blog post.
OpenAI’s conversational AI ChatGPT (Chat Generative Pre-Trained Transformer) has gained lots of attention in and outside of the tech world since its debut late last year. It has spurred intense new competition between web titans like Google and Microsoft, it has helped clarify the potential of AI (and some downsides), and it has caused a mini-boom for many related businesses.
Stay On the Cutting Edge: Get the Tom's Hardware Newsletter
Get Tom's Hardware's best news and in-depth reviews, straight to your inbox.
Mark Tyson is a news editor at Tom's Hardware. He enjoys covering the full breadth of PC tech; from business and semiconductor design to products approaching the edge of reason.
-
bit_user This isn't really about ChatGPT, at all, but really more about what it takes to write a networked app on DOS. My very first thought was to wonder what the developer used for a TCP/IP stack. My second thought was what sort of network adapter he used. Best case: maybe old 10 Mbps ethernet over coax? Don't forget your 150 ohm terminators!Reply
I don't really get the point about threading. If I were writing a simple, command line network client app on Linux, it probably wouldn't be multi-threaded.
Also, I'd be surprised if there isn't some C89-compliant JSON parser out there, somewhere. It's easy enough to parse, but I'd still try to use a library, if I could. -
ex_bubblehead
I've already got the MAC/65 cartridge inserted and well on the way to an Atari XE version! :pUSAFRet said:Oh oh!
Do the Commodore C64 next! -
TerryLaze
What kinda chip you got in there, a Dorito?USAFRet said:Oh oh!
Do the Commodore C64 next!