
On Sunday, Singapore-based retrocomputing enthusiast Yeo Kheng Meng released a ChatGPT client for MS-DOS that can run on 4.77 MHz IBM PCs from 1981 to interact with the popular OpenAI language model. provided a unique method for
Vintage computer development projects come naturally to Yeo, who created a Slack client for Windows 3.1 in 2019. In this case, he had his MS-DOS, a text-only operating system first released in 1981, and in November he had an AI-powered Large Language Model (LLM) released by OpenAI. I turned my attention to one of his ChatGPT.
As a conversational AI model, ChatGPT uses knowledge gleaned from the internet to answer questions and generate text. Thanks to an API launched in his month, anyone with programming skills can connect ChatGPT to their own custom applications.
Thanks to his new app that runs on MS-DOS, Yeo can use a vintage IBM PC compatible computer to chat with ChatGPT over the Internet. It’s a text-only, full-screen application running on an older machine, but it’s a similar interaction to his traditional ChatGPT web interface.
development challenges

MS-DOS was a particularly difficult platform for ChatGPT clients and lacked native networking capabilities. Yeo also targeted computers with very limited processing power. This is his 1984 IBM 5155 portable PC with an Intel 8088 4.77 MHz CPU, 640KB of conventional memory, CGA ISA graphics, and his MS-DOS 6.22.
To create the client, Yeo used Open Watcom C/C++. This is a modern compiler running on Windows 11 that can target 16-bit DOS platforms. For testing purposes, he used his VirtualBox virtual machine running DOS 6.22 to streamline the development process and transferred the compiled binaries to his target IBM DOS PC for testing.
To handle the network on the IBM PC, Yeo had to go through several layers. First, Yeo took advantage of his 1983 invented “Packet Driver API” standard. He integrated the open source MTCP library by Michael B. Brutman into his application to communicate with the Packet Driver and enable networking capabilities for the client.
For the ChatGPT API, Yeo used OpenAI’s Chat Completion API to manually construct the POST request (and parse the JSON-formatted response) in C.
However, Yeo had a major stumbling block. ChatGPT API requires an encrypted HTTPS connection. In the absence of a native HTTPS library for MS-DOS, Yeo created an HTTP-to-HTTPS proxy that can run on modern computers, translating requests and responses between MS-DOS clients and ChatGPT’s secure API, Acts as a transparent middleman. in the communication process.
According to Yeo, reading and writing input to the console presented another challenge due to the single-threaded nature of DOS applications. He consulted the MTCP page and online samples to come up with a way to acknowledge and receive keypresses without pausing the program.
In the end, the client performed better than Yeo expected, and he’s looking forward to future retro challenges. More on his development process.
Yeo has released his code (called “doschgpt”) on GitHub. Other users may wish to do so, or improve or extend the code in the future. With a little creativity, the state of the art in AI language models need not be limited to state-of-the-art machines.